├── CmakeLists.txt ├── README.md ├── glew ├── CMakeLists.txt ├── README.md ├── include │ └── GL │ │ ├── eglew.h │ │ ├── glew.h │ │ ├── glxew.h │ │ ├── glxew.h.bak │ │ └── wglew.h └── src │ ├── glew.c │ ├── glewinfo.c │ └── visualinfo.c ├── screenshots └── result.gif └── shader++ ├── CMakeLists.txt ├── include ├── CodeEditor.h ├── FindWidget.h ├── GLSLCompleter.h ├── GLSLHighlighter.h ├── HighlightBlockRule.h ├── HighlightRule.h ├── Language.h ├── LineNumberArea.h ├── MainWindow.h ├── Openglwidget.h ├── StyleSyntaxHighlighter.h └── SyntaxStyle.h ├── resources ├── code_samples │ ├── shader_00.glsl │ ├── shader_01.glsl │ ├── shader_02.glsl │ ├── shader_03.glsl │ └── shader_04.glsl ├── icons │ ├── about.png │ ├── exit.png │ ├── icon.png │ ├── new.png │ ├── open.png │ └── save.png ├── languages │ └── glsl.xml ├── shaderPlusPlus_resources.qrc └── styles │ ├── default_style.xml │ └── drakula.xml └── src ├── CodeEditor.cpp ├── FindWidget.cpp ├── GLSLCompleter.cpp ├── GLSLHighlighter.cpp ├── Language.cpp ├── LineNumberArea.cpp ├── MainWindow.cpp ├── Openglwidget.cpp ├── StyleSyntaxHighlighter.cpp ├── SyntaxStyle.cpp └── main.cpp /CmakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.9) 2 | 3 | project ("Shader++") 4 | 5 | #excutable 6 | add_subdirectory(glew) 7 | add_subdirectory(shader++) -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ShaderPlusPlus 2 | shader editor software 3 | 4 | [TODO List](https://trello.com/b/barsIub8) 5 | 6 | ![alt text](https://github.com/sho3la/ShaderPlusPlus/blob/master/screenshots/result.gif) -------------------------------------------------------------------------------- /glew/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.9) 2 | 3 | # list the header files 4 | set(HEADER_FILES 5 | include/GL/eglew.h 6 | include/GL/glew.h 7 | include/GL/glxew.h 8 | include/GL/wglew.h 9 | ) 10 | 11 | # list the source files 12 | set(SOURCE_FILES 13 | src/glew.c 14 | src/glewinfo.c 15 | src/visualinfo.c 16 | ) 17 | 18 | 19 | # add library target 20 | add_library(glew 21 | ${HEADER_FILES} 22 | ${SOURCE_FILES} 23 | ) 24 | 25 | # make it reflect the same structure as the one on disk 26 | source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${HEADER_FILES}) 27 | source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${SOURCE_FILES}) 28 | 29 | 30 | if(BUILD_SHARED_LIBS) 31 | target_compile_definitions(glew 32 | PRIVATE 33 | GLEW_BUILD=1 34 | ) 35 | else() 36 | target_compile_definitions(glew 37 | PUBLIC 38 | GLEW_STATIC=1 39 | ) 40 | endif() 41 | 42 | # Windows specfic flags to enable W variations of winapi 43 | if(WIN32) 44 | target_link_libraries(glew 45 | PUBLIC 46 | opengl32 47 | ) 48 | elseif(UNIX) 49 | target_link_libraries(glew 50 | PUBLIC 51 | X11 52 | GL 53 | GLU 54 | ) 55 | endif() 56 | 57 | 58 | # add d suffix in debug mode 59 | set_target_properties(glew PROPERTIES DEBUG_POSTFIX d) 60 | 61 | # define debug macro 62 | target_compile_definitions(glew PRIVATE "$<$:DEBUG>") 63 | 64 | # list include directories 65 | target_include_directories(glew 66 | PUBLIC 67 | ${CMAKE_CURRENT_SOURCE_DIR}/include 68 | ) 69 | -------------------------------------------------------------------------------- /glew/README.md: -------------------------------------------------------------------------------- 1 | # GLEW - The OpenGL Extension Wrangler Library 2 | 3 | The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library. GLEW provides efficient run-time mechanisms for determining which OpenGL extensions are supported on the target platform. OpenGL core and extension functionality is exposed in a single header file. GLEW has been tested on a variety of operating systems, including Windows, Linux, Mac OS X, FreeBSD, Irix, and Solaris. 4 | 5 | ![](http://glew.sourceforge.net/glew.png) 6 | 7 | http://glew.sourceforge.net/ 8 | 9 | https://github.com/nigels-com/glew 10 | 11 | [![Build Status](https://travis-ci.org/nigels-com/glew.svg?branch=master)](https://travis-ci.org/nigels-com/glew) 12 | [![Gitter](https://badges.gitter.im/nigels-com/glew.svg)](https://gitter.im/nigels-com/glew?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) 13 | [![Download](https://img.shields.io/sourceforge/dm/glew.svg)](https://sourceforge.net/projects/glew/files/latest/download) 14 | 15 | ## Downloads 16 | 17 | Current release is [2.1.0](https://sourceforge.net/projects/glew/files/glew/2.1.0/). 18 | [(Change Log)](http://glew.sourceforge.net/log.html) 19 | 20 | Sources available as 21 | [ZIP](https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0.zip/download) or 22 | [TGZ](https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0.tgz/download). 23 | 24 | Windows binaries for [32-bit and 64-bit](https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0-win32.zip/download). 25 | 26 | ### Recent snapshots 27 | 28 | Snapshots may contain new features, bug-fixes or new OpenGL extensions ahead of tested, official releases. 29 | 30 | ## Build 31 | 32 | It is highly recommended to build from a tgz or zip release snapshot. 33 | The code generation workflow is a complex brew of gnu make, perl and python, that works best on Linux or Mac. 34 | For most end-users of GLEW the official releases are the best choice, with first class support. 35 | 36 | ### Linux and Mac 37 | 38 | #### Using GNU Make 39 | 40 | ##### Install build tools 41 | 42 | Debian/Ubuntu/Mint: `$ sudo apt-get install build-essential libxmu-dev libxi-dev libgl-dev libosmesa-dev` 43 | 44 | RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel` 45 | 46 | ##### Build 47 | 48 | $ make 49 | $ sudo make install 50 | $ make clean 51 | 52 | Targets: `all, glew.lib (sub-targets: glew.lib.shared, glew.lib.static), glew.bin, clean, install, uninstall` 53 | 54 | Variables: `SYSTEM=linux-clang, GLEW_DEST=/usr/local, STRIP=` 55 | 56 | _Note: may need to make **auto** folder_ 57 | 58 | #### Using cmake 59 | 60 | *CMake 2.8.12 or higher is required.* 61 | 62 | ##### Install build tools 63 | 64 | Debian/Ubuntu/Mint: `$ sudo apt-get install build-essential libXmu-dev libXi-dev libgl-dev cmake` 65 | 66 | RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel cmake` 67 | 68 | ##### Build 69 | 70 | $ cd build 71 | $ cmake ./cmake 72 | $ make -j4 73 | 74 | | Target | Description | 75 | | ---------- | ----------- | 76 | | glew | Build the glew shared library. | 77 | | glew_s | Build the glew static library. | 78 | | glewinfo | Build the `glewinfo` executable (requires `BUILD_UTILS` to be `ON`). | 79 | | visualinfo | Build the `visualinfo` executable (requires `BUILD_UTILS` to be `ON`). | 80 | | install | Install all enabled targets into `CMAKE_INSTALL_PREFIX`. | 81 | | clean | Clean up build artifacts. | 82 | | all | Build all enabled targets (default target). | 83 | 84 | | Variables | Description | 85 | | --------------- | ----------- | 86 | | BUILD_UTILS | Build the `glewinfo` and `visualinfo` executables. | 87 | | GLEW_REGAL | Build in Regal mode. | 88 | | GLEW_OSMESA | Build in off-screen Mesa mode. | 89 | | BUILD_FRAMEWORK | Build as MacOSX Framework. Setting `CMAKE_INSTALL_PREFIX` to `/Library/Frameworks` is recommended. | 90 | 91 | ### Windows 92 | 93 | #### Visual Studio 94 | 95 | Use the provided Visual Studio project file in build/vc15/ 96 | 97 | Projects for vc6, vc10, vc12 and vc14 are also provided 98 | 99 | #### MSYS/Mingw 100 | 101 | Available from [Mingw](http://www.mingw.org/) 102 | 103 | Requirements: bash, make, gcc 104 | 105 | $ mingw32-make 106 | $ mingw32-make install 107 | $ mingw32-make install.all 108 | 109 | Alternative toolchain: `SYSTEM=mingw-win32` 110 | 111 | #### MSYS2/Mingw-w64 112 | 113 | Available from [Msys2](http://msys2.github.io/) and/or [Mingw-w64](http://mingw-w64.org/) 114 | 115 | Requirements: bash, make, gcc 116 | 117 | $ pacman -S gcc make mingw-w64-i686-gcc mingw-w64-x86_64-gcc 118 | $ make 119 | $ make install 120 | $ make install.all 121 | 122 | Alternative toolchain: `SYSTEM=msys, SYSTEM=msys-win32, SYSTEM=msys-win64` 123 | 124 | ## glewinfo 125 | 126 | `glewinfo` is a command-line tool useful for inspecting the capabilities of an 127 | OpenGL implementation and GLEW support for that. Please include `glewinfo.txt` 128 | with bug reports, as appropriate. 129 | 130 | --------------------------- 131 | GLEW Extension Info 132 | --------------------------- 133 | 134 | GLEW version 2.0.0 135 | Reporting capabilities of pixelformat 3 136 | Running on a Intel(R) HD Graphics 3000 from Intel 137 | OpenGL version 3.1.0 - Build 9.17.10.4229 is supported 138 | 139 | GL_VERSION_1_1: OK 140 | --------------- 141 | 142 | GL_VERSION_1_2: OK 143 | --------------- 144 | glCopyTexSubImage3D: OK 145 | glDrawRangeElements: OK 146 | glTexImage3D: OK 147 | glTexSubImage3D: OK 148 | 149 | ... 150 | 151 | ## Code Generation 152 | 153 | A Unix or Mac environment is needed for building GLEW from scratch to 154 | include new extensions, or customize the code generation. The extension 155 | data is regenerated from the top level source directory with: 156 | 157 | make extensions 158 | 159 | An alternative to generating the GLEW sources from scratch is to 160 | download a pre-generated (unsupported) snapshot: 161 | 162 | https://sourceforge.net/projects/glew/files/glew/snapshots/ 163 | 164 | Travis-built snapshots are also available: 165 | 166 | https://glew.s3.amazonaws.com/index.html 167 | 168 | ## Authors 169 | 170 | GLEW is currently maintained by [Nigel Stewart](https://github.com/nigels-com) 171 | with bug fixes, new OpenGL extension support and new releases. 172 | 173 | GLEW was developed by [Milan Ikits](http://www.cs.utah.edu/~ikits/) 174 | and [Marcelo Magallon](http://wwwvis.informatik.uni-stuttgart.de/~magallon/). 175 | Aaron Lefohn, Joe Kniss, and Chris Wyman were the first users and also 176 | assisted with the design and debugging process. 177 | 178 | The acronym GLEW originates from Aaron Lefohn. 179 | Pasi Kärkkäinen identified and fixed several problems with 180 | GLX and SDL. Nate Robins created the `wglinfo` utility, to 181 | which modifications were made by Michael Wimmer. 182 | 183 | ## Copyright and Licensing 184 | 185 | GLEW is originally derived from the EXTGL project by Lev Povalahev. 186 | The source code is licensed under the 187 | [Modified BSD License](http://glew.sourceforge.net/glew.txt), the 188 | [Mesa 3-D License](http://glew.sourceforge.net/mesa.txt) (MIT) and the 189 | [Khronos License](http://glew.sourceforge.net/khronos.txt) (MIT). 190 | 191 | The automatic code generation scripts are released under the 192 | [GNU GPL](http://glew.sourceforge.net/gpl.txt). 193 | -------------------------------------------------------------------------------- /glew/include/GL/eglew.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** The OpenGL Extension Wrangler Library 3 | ** Copyright (C) 2008-2017, Nigel Stewart 4 | ** Copyright (C) 2002-2008, Milan Ikits 5 | ** Copyright (C) 2002-2008, Marcelo E. Magallon 6 | ** Copyright (C) 2002, Lev Povalahev 7 | ** All rights reserved. 8 | ** 9 | ** Redistribution and use in source and binary forms, with or without 10 | ** modification, are permitted provided that the following conditions are met: 11 | ** 12 | ** * Redistributions of source code must retain the above copyright notice, 13 | ** this list of conditions and the following disclaimer. 14 | ** * Redistributions in binary form must reproduce the above copyright notice, 15 | ** this list of conditions and the following disclaimer in the documentation 16 | ** and/or other materials provided with the distribution. 17 | ** * The name of the author may be used to endorse or promote products 18 | ** derived from this software without specific prior written permission. 19 | ** 20 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | ** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | ** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 24 | ** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 | ** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 | ** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 | ** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 | ** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | ** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 | ** THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | /* 34 | * Mesa 3-D graphics library 35 | * Version: 7.0 36 | * 37 | * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. 38 | * 39 | * Permission is hereby granted, free of charge, to any person obtaining a 40 | * copy of this software and associated documentation files (the "Software"), 41 | * to deal in the Software without restriction, including without limitation 42 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 43 | * and/or sell copies of the Software, and to permit persons to whom the 44 | * Software is furnished to do so, subject to the following conditions: 45 | * 46 | * The above copyright notice and this permission notice shall be included 47 | * in all copies or substantial portions of the Software. 48 | * 49 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 50 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 51 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 52 | * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 53 | * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 54 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 55 | */ 56 | 57 | /* 58 | ** Copyright (c) 2007 The Khronos Group Inc. 59 | ** 60 | ** Permission is hereby granted, free of charge, to any person obtaining a 61 | ** copy of this software and/or associated documentation files (the 62 | ** "Materials"), to deal in the Materials without restriction, including 63 | ** without limitation the rights to use, copy, modify, merge, publish, 64 | ** distribute, sublicense, and/or sell copies of the Materials, and to 65 | ** permit persons to whom the Materials are furnished to do so, subject to 66 | ** the following conditions: 67 | ** 68 | ** The above copyright notice and this permission notice shall be included 69 | ** in all copies or substantial portions of the Materials. 70 | ** 71 | ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 72 | ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 73 | ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 74 | ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 75 | ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 76 | ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 77 | ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. 78 | */ 79 | 80 | #ifndef __eglew_h__ 81 | #define __eglew_h__ 82 | #define __EGLEW_H__ 83 | 84 | #ifdef __eglext_h_ 85 | #error eglext.h included before eglew.h 86 | #endif 87 | 88 | #if defined(__egl_h_) 89 | #error egl.h included before eglew.h 90 | #endif 91 | 92 | #define __eglext_h_ 93 | 94 | #define __egl_h_ 95 | 96 | #ifndef EGLAPIENTRY 97 | #define EGLAPIENTRY 98 | #endif 99 | #ifndef EGLAPI 100 | #define EGLAPI extern 101 | #endif 102 | 103 | /* EGL Types */ 104 | #include 105 | 106 | #include 107 | #include 108 | 109 | #include 110 | 111 | #ifdef __cplusplus 112 | extern "C" { 113 | #endif 114 | 115 | typedef int32_t EGLint; 116 | 117 | typedef unsigned int EGLBoolean; 118 | typedef void *EGLDisplay; 119 | typedef void *EGLConfig; 120 | typedef void *EGLSurface; 121 | typedef void *EGLContext; 122 | typedef void (*__eglMustCastToProperFunctionPointerType)(void); 123 | 124 | typedef unsigned int EGLenum; 125 | typedef void *EGLClientBuffer; 126 | 127 | typedef void *EGLSync; 128 | typedef intptr_t EGLAttrib; 129 | typedef khronos_utime_nanoseconds_t EGLTime; 130 | typedef void *EGLImage; 131 | 132 | typedef void *EGLSyncKHR; 133 | typedef intptr_t EGLAttribKHR; 134 | typedef void *EGLLabelKHR; 135 | typedef void *EGLObjectKHR; 136 | typedef void (EGLAPIENTRY *EGLDEBUGPROCKHR)(EGLenum error,const char *command,EGLint messageType,EGLLabelKHR threadLabel,EGLLabelKHR objectLabel,const char* message); 137 | typedef khronos_utime_nanoseconds_t EGLTimeKHR; 138 | typedef void *EGLImageKHR; 139 | typedef void *EGLStreamKHR; 140 | typedef khronos_uint64_t EGLuint64KHR; 141 | typedef int EGLNativeFileDescriptorKHR; 142 | typedef khronos_ssize_t EGLsizeiANDROID; 143 | typedef void (*EGLSetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, const void *value, EGLsizeiANDROID valueSize); 144 | typedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, void *value, EGLsizeiANDROID valueSize); 145 | typedef void *EGLDeviceEXT; 146 | typedef void *EGLOutputLayerEXT; 147 | typedef void *EGLOutputPortEXT; 148 | typedef void *EGLSyncNV; 149 | typedef khronos_utime_nanoseconds_t EGLTimeNV; 150 | typedef khronos_utime_nanoseconds_t EGLuint64NV; 151 | typedef khronos_stime_nanoseconds_t EGLnsecsANDROID; 152 | 153 | struct EGLClientPixmapHI; 154 | 155 | #define EGL_DONT_CARE ((EGLint)-1) 156 | 157 | #define EGL_NO_CONTEXT ((EGLContext)0) 158 | #define EGL_NO_DISPLAY ((EGLDisplay)0) 159 | #define EGL_NO_IMAGE ((EGLImage)0) 160 | #define EGL_NO_SURFACE ((EGLSurface)0) 161 | #define EGL_NO_SYNC ((EGLSync)0) 162 | 163 | #define EGL_UNKNOWN ((EGLint)-1) 164 | 165 | #define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0) 166 | 167 | EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress (const char *procname); 168 | /* ---------------------------- EGL_VERSION_1_0 --------------------------- */ 169 | 170 | #ifndef EGL_VERSION_1_0 171 | #define EGL_VERSION_1_0 1 172 | 173 | #define EGLEW_VERSION_1_0 EGLEW_GET_VAR(__EGLEW_VERSION_1_0 ) 174 | 175 | #endif /* EGL_VERSION_1_0 */ 176 | 177 | /* ---------------------------- EGL_VERSION_1_1 --------------------------- */ 178 | 179 | #ifndef EGL_VERSION_1_1 180 | #define EGL_VERSION_1_1 1 181 | 182 | #define EGLEW_VERSION_1_1 EGLEW_GET_VAR(__EGLEW_VERSION_1_1 ) 183 | 184 | #endif /* EGL_VERSION_1_1 */ 185 | 186 | /* ---------------------------- EGL_VERSION_1_2 --------------------------- */ 187 | 188 | #ifndef EGL_VERSION_1_2 189 | #define EGL_VERSION_1_2 1 190 | 191 | #define EGLEW_VERSION_1_2 EGLEW_GET_VAR(__EGLEW_VERSION_1_2 ) 192 | 193 | #endif /* EGL_VERSION_1_2 */ 194 | 195 | /* ---------------------------- EGL_VERSION_1_3 --------------------------- */ 196 | 197 | #ifndef EGL_VERSION_1_3 198 | #define EGL_VERSION_1_3 1 199 | 200 | #define EGLEW_VERSION_1_3 EGLEW_GET_VAR(__EGLEW_VERSION_1_3 ) 201 | 202 | #endif /* EGL_VERSION_1_3 */ 203 | 204 | /* ---------------------------- EGL_VERSION_1_4 --------------------------- */ 205 | 206 | #ifndef EGL_VERSION_1_4 207 | #define EGL_VERSION_1_4 1 208 | 209 | #define EGLEW_VERSION_1_4 EGLEW_GET_VAR(__EGLEW_VERSION_1_4 ) 210 | 211 | #endif /* EGL_VERSION_1_4 */ 212 | 213 | /* ---------------------------- EGL_VERSION_1_5 --------------------------- */ 214 | 215 | #ifndef EGL_VERSION_1_5 216 | #define EGL_VERSION_1_5 1 217 | 218 | #define EGLEW_VERSION_1_5 EGLEW_GET_VAR(__EGLEW_VERSION_1_5 ) 219 | 220 | #endif /* EGL_VERSION_1_5 */ 221 | 222 | /* ------------------------ EGL_ANDROID_blob_cache ------------------------ */ 223 | 224 | #ifndef EGL_ANDROID_blob_cache 225 | #define EGL_ANDROID_blob_cache 1 226 | 227 | #define EGLEW_ANDROID_blob_cache EGLEW_GET_VAR(__EGLEW_ANDROID_blob_cache ) 228 | 229 | #endif /* EGL_ANDROID_blob_cache */ 230 | 231 | /* ---------------- EGL_ANDROID_create_native_client_buffer --------------- */ 232 | 233 | #ifndef EGL_ANDROID_create_native_client_buffer 234 | #define EGL_ANDROID_create_native_client_buffer 1 235 | 236 | #define EGLEW_ANDROID_create_native_client_buffer EGLEW_GET_VAR(__EGLEW_ANDROID_create_native_client_buffer ) 237 | 238 | #endif /* EGL_ANDROID_create_native_client_buffer */ 239 | 240 | /* -------------------- EGL_ANDROID_framebuffer_target -------------------- */ 241 | 242 | #ifndef EGL_ANDROID_framebuffer_target 243 | #define EGL_ANDROID_framebuffer_target 1 244 | 245 | #define EGLEW_ANDROID_framebuffer_target EGLEW_GET_VAR(__EGLEW_ANDROID_framebuffer_target ) 246 | 247 | #endif /* EGL_ANDROID_framebuffer_target */ 248 | 249 | /* ----------------- EGL_ANDROID_front_buffer_auto_refresh ---------------- */ 250 | 251 | #ifndef EGL_ANDROID_front_buffer_auto_refresh 252 | #define EGL_ANDROID_front_buffer_auto_refresh 1 253 | 254 | #define EGLEW_ANDROID_front_buffer_auto_refresh EGLEW_GET_VAR(__EGLEW_ANDROID_front_buffer_auto_refresh ) 255 | 256 | #endif /* EGL_ANDROID_front_buffer_auto_refresh */ 257 | 258 | /* -------------------- EGL_ANDROID_image_native_buffer ------------------- */ 259 | 260 | #ifndef EGL_ANDROID_image_native_buffer 261 | #define EGL_ANDROID_image_native_buffer 1 262 | 263 | #define EGLEW_ANDROID_image_native_buffer EGLEW_GET_VAR(__EGLEW_ANDROID_image_native_buffer ) 264 | 265 | #endif /* EGL_ANDROID_image_native_buffer */ 266 | 267 | /* --------------------- EGL_ANDROID_native_fence_sync -------------------- */ 268 | 269 | #ifndef EGL_ANDROID_native_fence_sync 270 | #define EGL_ANDROID_native_fence_sync 1 271 | 272 | #define EGLEW_ANDROID_native_fence_sync EGLEW_GET_VAR(__EGLEW_ANDROID_native_fence_sync ) 273 | 274 | #endif /* EGL_ANDROID_native_fence_sync */ 275 | 276 | /* --------------------- EGL_ANDROID_presentation_time -------------------- */ 277 | 278 | #ifndef EGL_ANDROID_presentation_time 279 | #define EGL_ANDROID_presentation_time 1 280 | 281 | #define EGLEW_ANDROID_presentation_time EGLEW_GET_VAR(__EGLEW_ANDROID_presentation_time ) 282 | 283 | #endif /* EGL_ANDROID_presentation_time */ 284 | 285 | /* ------------------------ EGL_ANDROID_recordable ------------------------ */ 286 | 287 | #ifndef EGL_ANDROID_recordable 288 | #define EGL_ANDROID_recordable 1 289 | 290 | #define EGLEW_ANDROID_recordable EGLEW_GET_VAR(__EGLEW_ANDROID_recordable ) 291 | 292 | #endif /* EGL_ANDROID_recordable */ 293 | 294 | /* --------------- EGL_ANGLE_d3d_share_handle_client_buffer --------------- */ 295 | 296 | #ifndef EGL_ANGLE_d3d_share_handle_client_buffer 297 | #define EGL_ANGLE_d3d_share_handle_client_buffer 1 298 | 299 | #define EGLEW_ANGLE_d3d_share_handle_client_buffer EGLEW_GET_VAR(__EGLEW_ANGLE_d3d_share_handle_client_buffer ) 300 | 301 | #endif /* EGL_ANGLE_d3d_share_handle_client_buffer */ 302 | 303 | /* ------------------------- EGL_ANGLE_device_d3d ------------------------- */ 304 | 305 | #ifndef EGL_ANGLE_device_d3d 306 | #define EGL_ANGLE_device_d3d 1 307 | 308 | #define EGLEW_ANGLE_device_d3d EGLEW_GET_VAR(__EGLEW_ANGLE_device_d3d ) 309 | 310 | #endif /* EGL_ANGLE_device_d3d */ 311 | 312 | /* -------------------- EGL_ANGLE_query_surface_pointer ------------------- */ 313 | 314 | #ifndef EGL_ANGLE_query_surface_pointer 315 | #define EGL_ANGLE_query_surface_pointer 1 316 | 317 | #define EGLEW_ANGLE_query_surface_pointer EGLEW_GET_VAR(__EGLEW_ANGLE_query_surface_pointer ) 318 | 319 | #endif /* EGL_ANGLE_query_surface_pointer */ 320 | 321 | /* ------------- EGL_ANGLE_surface_d3d_texture_2d_share_handle ------------ */ 322 | 323 | #ifndef EGL_ANGLE_surface_d3d_texture_2d_share_handle 324 | #define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1 325 | 326 | #define EGLEW_ANGLE_surface_d3d_texture_2d_share_handle EGLEW_GET_VAR(__EGLEW_ANGLE_surface_d3d_texture_2d_share_handle ) 327 | 328 | #endif /* EGL_ANGLE_surface_d3d_texture_2d_share_handle */ 329 | 330 | /* ---------------------- EGL_ANGLE_window_fixed_size --------------------- */ 331 | 332 | #ifndef EGL_ANGLE_window_fixed_size 333 | #define EGL_ANGLE_window_fixed_size 1 334 | 335 | #define EGLEW_ANGLE_window_fixed_size EGLEW_GET_VAR(__EGLEW_ANGLE_window_fixed_size ) 336 | 337 | #endif /* EGL_ANGLE_window_fixed_size */ 338 | 339 | /* -------------------- EGL_ARM_implicit_external_sync -------------------- */ 340 | 341 | #ifndef EGL_ARM_implicit_external_sync 342 | #define EGL_ARM_implicit_external_sync 1 343 | 344 | #define EGLEW_ARM_implicit_external_sync EGLEW_GET_VAR(__EGLEW_ARM_implicit_external_sync ) 345 | 346 | #endif /* EGL_ARM_implicit_external_sync */ 347 | 348 | /* ------------------ EGL_ARM_pixmap_multisample_discard ------------------ */ 349 | 350 | #ifndef EGL_ARM_pixmap_multisample_discard 351 | #define EGL_ARM_pixmap_multisample_discard 1 352 | 353 | #define EGLEW_ARM_pixmap_multisample_discard EGLEW_GET_VAR(__EGLEW_ARM_pixmap_multisample_discard ) 354 | 355 | #endif /* EGL_ARM_pixmap_multisample_discard */ 356 | 357 | /* -------------------------- EGL_EXT_buffer_age -------------------------- */ 358 | 359 | #ifndef EGL_EXT_buffer_age 360 | #define EGL_EXT_buffer_age 1 361 | 362 | #define EGLEW_EXT_buffer_age EGLEW_GET_VAR(__EGLEW_EXT_buffer_age ) 363 | 364 | #endif /* EGL_EXT_buffer_age */ 365 | 366 | /* ----------------------- EGL_EXT_client_extensions ---------------------- */ 367 | 368 | #ifndef EGL_EXT_client_extensions 369 | #define EGL_EXT_client_extensions 1 370 | 371 | #define EGLEW_EXT_client_extensions EGLEW_GET_VAR(__EGLEW_EXT_client_extensions ) 372 | 373 | #endif /* EGL_EXT_client_extensions */ 374 | 375 | /* ------------------- EGL_EXT_create_context_robustness ------------------ */ 376 | 377 | #ifndef EGL_EXT_create_context_robustness 378 | #define EGL_EXT_create_context_robustness 1 379 | 380 | #define EGLEW_EXT_create_context_robustness EGLEW_GET_VAR(__EGLEW_EXT_create_context_robustness ) 381 | 382 | #endif /* EGL_EXT_create_context_robustness */ 383 | 384 | /* -------------------------- EGL_EXT_device_base ------------------------- */ 385 | 386 | #ifndef EGL_EXT_device_base 387 | #define EGL_EXT_device_base 1 388 | 389 | #define EGLEW_EXT_device_base EGLEW_GET_VAR(__EGLEW_EXT_device_base ) 390 | 391 | #endif /* EGL_EXT_device_base */ 392 | 393 | /* -------------------------- EGL_EXT_device_drm -------------------------- */ 394 | 395 | #ifndef EGL_EXT_device_drm 396 | #define EGL_EXT_device_drm 1 397 | 398 | #define EGLEW_EXT_device_drm EGLEW_GET_VAR(__EGLEW_EXT_device_drm ) 399 | 400 | #endif /* EGL_EXT_device_drm */ 401 | 402 | /* ---------------------- EGL_EXT_device_enumeration ---------------------- */ 403 | 404 | #ifndef EGL_EXT_device_enumeration 405 | #define EGL_EXT_device_enumeration 1 406 | 407 | #define EGLEW_EXT_device_enumeration EGLEW_GET_VAR(__EGLEW_EXT_device_enumeration ) 408 | 409 | #endif /* EGL_EXT_device_enumeration */ 410 | 411 | /* ------------------------- EGL_EXT_device_openwf ------------------------ */ 412 | 413 | #ifndef EGL_EXT_device_openwf 414 | #define EGL_EXT_device_openwf 1 415 | 416 | #define EGLEW_EXT_device_openwf EGLEW_GET_VAR(__EGLEW_EXT_device_openwf ) 417 | 418 | #endif /* EGL_EXT_device_openwf */ 419 | 420 | /* ------------------------- EGL_EXT_device_query ------------------------- */ 421 | 422 | #ifndef EGL_EXT_device_query 423 | #define EGL_EXT_device_query 1 424 | 425 | #define EGLEW_EXT_device_query EGLEW_GET_VAR(__EGLEW_EXT_device_query ) 426 | 427 | #endif /* EGL_EXT_device_query */ 428 | 429 | /* ------------------ EGL_EXT_gl_colorspace_bt2020_linear ----------------- */ 430 | 431 | #ifndef EGL_EXT_gl_colorspace_bt2020_linear 432 | #define EGL_EXT_gl_colorspace_bt2020_linear 1 433 | 434 | #define EGLEW_EXT_gl_colorspace_bt2020_linear EGLEW_GET_VAR(__EGLEW_EXT_gl_colorspace_bt2020_linear ) 435 | 436 | #endif /* EGL_EXT_gl_colorspace_bt2020_linear */ 437 | 438 | /* -------------------- EGL_EXT_gl_colorspace_bt2020_pq ------------------- */ 439 | 440 | #ifndef EGL_EXT_gl_colorspace_bt2020_pq 441 | #define EGL_EXT_gl_colorspace_bt2020_pq 1 442 | 443 | #define EGLEW_EXT_gl_colorspace_bt2020_pq EGLEW_GET_VAR(__EGLEW_EXT_gl_colorspace_bt2020_pq ) 444 | 445 | #endif /* EGL_EXT_gl_colorspace_bt2020_pq */ 446 | 447 | /* ------------------ EGL_EXT_gl_colorspace_scrgb_linear ------------------ */ 448 | 449 | #ifndef EGL_EXT_gl_colorspace_scrgb_linear 450 | #define EGL_EXT_gl_colorspace_scrgb_linear 1 451 | 452 | #define EGLEW_EXT_gl_colorspace_scrgb_linear EGLEW_GET_VAR(__EGLEW_EXT_gl_colorspace_scrgb_linear ) 453 | 454 | #endif /* EGL_EXT_gl_colorspace_scrgb_linear */ 455 | 456 | /* --------------------- EGL_EXT_image_dma_buf_import --------------------- */ 457 | 458 | #ifndef EGL_EXT_image_dma_buf_import 459 | #define EGL_EXT_image_dma_buf_import 1 460 | 461 | #define EGLEW_EXT_image_dma_buf_import EGLEW_GET_VAR(__EGLEW_EXT_image_dma_buf_import ) 462 | 463 | #endif /* EGL_EXT_image_dma_buf_import */ 464 | 465 | /* ---------------- EGL_EXT_image_dma_buf_import_modifiers ---------------- */ 466 | 467 | #ifndef EGL_EXT_image_dma_buf_import_modifiers 468 | #define EGL_EXT_image_dma_buf_import_modifiers 1 469 | 470 | #define EGLEW_EXT_image_dma_buf_import_modifiers EGLEW_GET_VAR(__EGLEW_EXT_image_dma_buf_import_modifiers ) 471 | 472 | #endif /* EGL_EXT_image_dma_buf_import_modifiers */ 473 | 474 | /* ----------------------- EGL_EXT_multiview_window ----------------------- */ 475 | 476 | #ifndef EGL_EXT_multiview_window 477 | #define EGL_EXT_multiview_window 1 478 | 479 | #define EGLEW_EXT_multiview_window EGLEW_GET_VAR(__EGLEW_EXT_multiview_window ) 480 | 481 | #endif /* EGL_EXT_multiview_window */ 482 | 483 | /* -------------------------- EGL_EXT_output_base ------------------------- */ 484 | 485 | #ifndef EGL_EXT_output_base 486 | #define EGL_EXT_output_base 1 487 | 488 | #define EGLEW_EXT_output_base EGLEW_GET_VAR(__EGLEW_EXT_output_base ) 489 | 490 | #endif /* EGL_EXT_output_base */ 491 | 492 | /* -------------------------- EGL_EXT_output_drm -------------------------- */ 493 | 494 | #ifndef EGL_EXT_output_drm 495 | #define EGL_EXT_output_drm 1 496 | 497 | #define EGLEW_EXT_output_drm EGLEW_GET_VAR(__EGLEW_EXT_output_drm ) 498 | 499 | #endif /* EGL_EXT_output_drm */ 500 | 501 | /* ------------------------- EGL_EXT_output_openwf ------------------------ */ 502 | 503 | #ifndef EGL_EXT_output_openwf 504 | #define EGL_EXT_output_openwf 1 505 | 506 | #define EGLEW_EXT_output_openwf EGLEW_GET_VAR(__EGLEW_EXT_output_openwf ) 507 | 508 | #endif /* EGL_EXT_output_openwf */ 509 | 510 | /* ---------------------- EGL_EXT_pixel_format_float ---------------------- */ 511 | 512 | #ifndef EGL_EXT_pixel_format_float 513 | #define EGL_EXT_pixel_format_float 1 514 | 515 | #define EGLEW_EXT_pixel_format_float EGLEW_GET_VAR(__EGLEW_EXT_pixel_format_float ) 516 | 517 | #endif /* EGL_EXT_pixel_format_float */ 518 | 519 | /* ------------------------- EGL_EXT_platform_base ------------------------ */ 520 | 521 | #ifndef EGL_EXT_platform_base 522 | #define EGL_EXT_platform_base 1 523 | 524 | #define EGLEW_EXT_platform_base EGLEW_GET_VAR(__EGLEW_EXT_platform_base ) 525 | 526 | #endif /* EGL_EXT_platform_base */ 527 | 528 | /* ------------------------ EGL_EXT_platform_device ----------------------- */ 529 | 530 | #ifndef EGL_EXT_platform_device 531 | #define EGL_EXT_platform_device 1 532 | 533 | #define EGLEW_EXT_platform_device EGLEW_GET_VAR(__EGLEW_EXT_platform_device ) 534 | 535 | #endif /* EGL_EXT_platform_device */ 536 | 537 | /* ----------------------- EGL_EXT_platform_wayland ----------------------- */ 538 | 539 | #ifndef EGL_EXT_platform_wayland 540 | #define EGL_EXT_platform_wayland 1 541 | 542 | #define EGLEW_EXT_platform_wayland EGLEW_GET_VAR(__EGLEW_EXT_platform_wayland ) 543 | 544 | #endif /* EGL_EXT_platform_wayland */ 545 | 546 | /* ------------------------- EGL_EXT_platform_x11 ------------------------- */ 547 | 548 | #ifndef EGL_EXT_platform_x11 549 | #define EGL_EXT_platform_x11 1 550 | 551 | #define EGLEW_EXT_platform_x11 EGLEW_GET_VAR(__EGLEW_EXT_platform_x11 ) 552 | 553 | #endif /* EGL_EXT_platform_x11 */ 554 | 555 | /* ----------------------- EGL_EXT_protected_content ---------------------- */ 556 | 557 | #ifndef EGL_EXT_protected_content 558 | #define EGL_EXT_protected_content 1 559 | 560 | #define EGLEW_EXT_protected_content EGLEW_GET_VAR(__EGLEW_EXT_protected_content ) 561 | 562 | #endif /* EGL_EXT_protected_content */ 563 | 564 | /* ----------------------- EGL_EXT_protected_surface ---------------------- */ 565 | 566 | #ifndef EGL_EXT_protected_surface 567 | #define EGL_EXT_protected_surface 1 568 | 569 | #define EGLEW_EXT_protected_surface EGLEW_GET_VAR(__EGLEW_EXT_protected_surface ) 570 | 571 | #endif /* EGL_EXT_protected_surface */ 572 | 573 | /* ------------------- EGL_EXT_stream_consumer_egloutput ------------------ */ 574 | 575 | #ifndef EGL_EXT_stream_consumer_egloutput 576 | #define EGL_EXT_stream_consumer_egloutput 1 577 | 578 | #define EGLEW_EXT_stream_consumer_egloutput EGLEW_GET_VAR(__EGLEW_EXT_stream_consumer_egloutput ) 579 | 580 | #endif /* EGL_EXT_stream_consumer_egloutput */ 581 | 582 | /* ------------------ EGL_EXT_surface_SMPTE2086_metadata ------------------ */ 583 | 584 | #ifndef EGL_EXT_surface_SMPTE2086_metadata 585 | #define EGL_EXT_surface_SMPTE2086_metadata 1 586 | 587 | #define EGLEW_EXT_surface_SMPTE2086_metadata EGLEW_GET_VAR(__EGLEW_EXT_surface_SMPTE2086_metadata ) 588 | 589 | #endif /* EGL_EXT_surface_SMPTE2086_metadata */ 590 | 591 | /* ------------------- EGL_EXT_swap_buffers_with_damage ------------------- */ 592 | 593 | #ifndef EGL_EXT_swap_buffers_with_damage 594 | #define EGL_EXT_swap_buffers_with_damage 1 595 | 596 | #define EGLEW_EXT_swap_buffers_with_damage EGLEW_GET_VAR(__EGLEW_EXT_swap_buffers_with_damage ) 597 | 598 | #endif /* EGL_EXT_swap_buffers_with_damage */ 599 | 600 | /* -------------------------- EGL_EXT_yuv_surface ------------------------- */ 601 | 602 | #ifndef EGL_EXT_yuv_surface 603 | #define EGL_EXT_yuv_surface 1 604 | 605 | #define EGLEW_EXT_yuv_surface EGLEW_GET_VAR(__EGLEW_EXT_yuv_surface ) 606 | 607 | #endif /* EGL_EXT_yuv_surface */ 608 | 609 | /* -------------------------- EGL_HI_clientpixmap ------------------------- */ 610 | 611 | #ifndef EGL_HI_clientpixmap 612 | #define EGL_HI_clientpixmap 1 613 | 614 | #define EGLEW_HI_clientpixmap EGLEW_GET_VAR(__EGLEW_HI_clientpixmap ) 615 | 616 | #endif /* EGL_HI_clientpixmap */ 617 | 618 | /* -------------------------- EGL_HI_colorformats ------------------------- */ 619 | 620 | #ifndef EGL_HI_colorformats 621 | #define EGL_HI_colorformats 1 622 | 623 | #define EGLEW_HI_colorformats EGLEW_GET_VAR(__EGLEW_HI_colorformats ) 624 | 625 | #endif /* EGL_HI_colorformats */ 626 | 627 | /* ----------------------- EGL_IMG_context_priority ----------------------- */ 628 | 629 | #ifndef EGL_IMG_context_priority 630 | #define EGL_IMG_context_priority 1 631 | 632 | #define EGLEW_IMG_context_priority EGLEW_GET_VAR(__EGLEW_IMG_context_priority ) 633 | 634 | #endif /* EGL_IMG_context_priority */ 635 | 636 | /* ---------------------- EGL_IMG_image_plane_attribs --------------------- */ 637 | 638 | #ifndef EGL_IMG_image_plane_attribs 639 | #define EGL_IMG_image_plane_attribs 1 640 | 641 | #define EGLEW_IMG_image_plane_attribs EGLEW_GET_VAR(__EGLEW_IMG_image_plane_attribs ) 642 | 643 | #endif /* EGL_IMG_image_plane_attribs */ 644 | 645 | /* --------------------------- EGL_KHR_cl_event --------------------------- */ 646 | 647 | #ifndef EGL_KHR_cl_event 648 | #define EGL_KHR_cl_event 1 649 | 650 | #define EGLEW_KHR_cl_event EGLEW_GET_VAR(__EGLEW_KHR_cl_event ) 651 | 652 | #endif /* EGL_KHR_cl_event */ 653 | 654 | /* --------------------------- EGL_KHR_cl_event2 -------------------------- */ 655 | 656 | #ifndef EGL_KHR_cl_event2 657 | #define EGL_KHR_cl_event2 1 658 | 659 | #define EGLEW_KHR_cl_event2 EGLEW_GET_VAR(__EGLEW_KHR_cl_event2 ) 660 | 661 | #endif /* EGL_KHR_cl_event2 */ 662 | 663 | /* ----------------- EGL_KHR_client_get_all_proc_addresses ---------------- */ 664 | 665 | #ifndef EGL_KHR_client_get_all_proc_addresses 666 | #define EGL_KHR_client_get_all_proc_addresses 1 667 | 668 | #define EGLEW_KHR_client_get_all_proc_addresses EGLEW_GET_VAR(__EGLEW_KHR_client_get_all_proc_addresses ) 669 | 670 | #endif /* EGL_KHR_client_get_all_proc_addresses */ 671 | 672 | /* ------------------------ EGL_KHR_config_attribs ------------------------ */ 673 | 674 | #ifndef EGL_KHR_config_attribs 675 | #define EGL_KHR_config_attribs 1 676 | 677 | #define EGLEW_KHR_config_attribs EGLEW_GET_VAR(__EGLEW_KHR_config_attribs ) 678 | 679 | #endif /* EGL_KHR_config_attribs */ 680 | 681 | /* --------------------- EGL_KHR_context_flush_control -------------------- */ 682 | 683 | #ifndef EGL_KHR_context_flush_control 684 | #define EGL_KHR_context_flush_control 1 685 | 686 | #define EGLEW_KHR_context_flush_control EGLEW_GET_VAR(__EGLEW_KHR_context_flush_control ) 687 | 688 | #endif /* EGL_KHR_context_flush_control */ 689 | 690 | /* ------------------------ EGL_KHR_create_context ------------------------ */ 691 | 692 | #ifndef EGL_KHR_create_context 693 | #define EGL_KHR_create_context 1 694 | 695 | #define EGLEW_KHR_create_context EGLEW_GET_VAR(__EGLEW_KHR_create_context ) 696 | 697 | #endif /* EGL_KHR_create_context */ 698 | 699 | /* -------------------- EGL_KHR_create_context_no_error ------------------- */ 700 | 701 | #ifndef EGL_KHR_create_context_no_error 702 | #define EGL_KHR_create_context_no_error 1 703 | 704 | #define EGLEW_KHR_create_context_no_error EGLEW_GET_VAR(__EGLEW_KHR_create_context_no_error ) 705 | 706 | #endif /* EGL_KHR_create_context_no_error */ 707 | 708 | /* ----------------------------- EGL_KHR_debug ---------------------------- */ 709 | 710 | #ifndef EGL_KHR_debug 711 | #define EGL_KHR_debug 1 712 | 713 | #define EGLEW_KHR_debug EGLEW_GET_VAR(__EGLEW_KHR_debug ) 714 | 715 | #endif /* EGL_KHR_debug */ 716 | 717 | /* -------------------------- EGL_KHR_fence_sync -------------------------- */ 718 | 719 | #ifndef EGL_KHR_fence_sync 720 | #define EGL_KHR_fence_sync 1 721 | 722 | #define EGLEW_KHR_fence_sync EGLEW_GET_VAR(__EGLEW_KHR_fence_sync ) 723 | 724 | #endif /* EGL_KHR_fence_sync */ 725 | 726 | /* -------------------- EGL_KHR_get_all_proc_addresses -------------------- */ 727 | 728 | #ifndef EGL_KHR_get_all_proc_addresses 729 | #define EGL_KHR_get_all_proc_addresses 1 730 | 731 | #define EGLEW_KHR_get_all_proc_addresses EGLEW_GET_VAR(__EGLEW_KHR_get_all_proc_addresses ) 732 | 733 | #endif /* EGL_KHR_get_all_proc_addresses */ 734 | 735 | /* ------------------------- EGL_KHR_gl_colorspace ------------------------ */ 736 | 737 | #ifndef EGL_KHR_gl_colorspace 738 | #define EGL_KHR_gl_colorspace 1 739 | 740 | #define EGLEW_KHR_gl_colorspace EGLEW_GET_VAR(__EGLEW_KHR_gl_colorspace ) 741 | 742 | #endif /* EGL_KHR_gl_colorspace */ 743 | 744 | /* --------------------- EGL_KHR_gl_renderbuffer_image -------------------- */ 745 | 746 | #ifndef EGL_KHR_gl_renderbuffer_image 747 | #define EGL_KHR_gl_renderbuffer_image 1 748 | 749 | #define EGLEW_KHR_gl_renderbuffer_image EGLEW_GET_VAR(__EGLEW_KHR_gl_renderbuffer_image ) 750 | 751 | #endif /* EGL_KHR_gl_renderbuffer_image */ 752 | 753 | /* ---------------------- EGL_KHR_gl_texture_2D_image --------------------- */ 754 | 755 | #ifndef EGL_KHR_gl_texture_2D_image 756 | #define EGL_KHR_gl_texture_2D_image 1 757 | 758 | #define EGLEW_KHR_gl_texture_2D_image EGLEW_GET_VAR(__EGLEW_KHR_gl_texture_2D_image ) 759 | 760 | #endif /* EGL_KHR_gl_texture_2D_image */ 761 | 762 | /* ---------------------- EGL_KHR_gl_texture_3D_image --------------------- */ 763 | 764 | #ifndef EGL_KHR_gl_texture_3D_image 765 | #define EGL_KHR_gl_texture_3D_image 1 766 | 767 | #define EGLEW_KHR_gl_texture_3D_image EGLEW_GET_VAR(__EGLEW_KHR_gl_texture_3D_image ) 768 | 769 | #endif /* EGL_KHR_gl_texture_3D_image */ 770 | 771 | /* ------------------- EGL_KHR_gl_texture_cubemap_image ------------------- */ 772 | 773 | #ifndef EGL_KHR_gl_texture_cubemap_image 774 | #define EGL_KHR_gl_texture_cubemap_image 1 775 | 776 | #define EGLEW_KHR_gl_texture_cubemap_image EGLEW_GET_VAR(__EGLEW_KHR_gl_texture_cubemap_image ) 777 | 778 | #endif /* EGL_KHR_gl_texture_cubemap_image */ 779 | 780 | /* ----------------------------- EGL_KHR_image ---------------------------- */ 781 | 782 | #ifndef EGL_KHR_image 783 | #define EGL_KHR_image 1 784 | 785 | #define EGLEW_KHR_image EGLEW_GET_VAR(__EGLEW_KHR_image ) 786 | 787 | #endif /* EGL_KHR_image */ 788 | 789 | /* -------------------------- EGL_KHR_image_base -------------------------- */ 790 | 791 | #ifndef EGL_KHR_image_base 792 | #define EGL_KHR_image_base 1 793 | 794 | #define EGLEW_KHR_image_base EGLEW_GET_VAR(__EGLEW_KHR_image_base ) 795 | 796 | #endif /* EGL_KHR_image_base */ 797 | 798 | /* ------------------------- EGL_KHR_image_pixmap ------------------------- */ 799 | 800 | #ifndef EGL_KHR_image_pixmap 801 | #define EGL_KHR_image_pixmap 1 802 | 803 | #define EGLEW_KHR_image_pixmap EGLEW_GET_VAR(__EGLEW_KHR_image_pixmap ) 804 | 805 | #endif /* EGL_KHR_image_pixmap */ 806 | 807 | /* ------------------------- EGL_KHR_lock_surface ------------------------- */ 808 | 809 | #ifndef EGL_KHR_lock_surface 810 | #define EGL_KHR_lock_surface 1 811 | 812 | #define EGLEW_KHR_lock_surface EGLEW_GET_VAR(__EGLEW_KHR_lock_surface ) 813 | 814 | #endif /* EGL_KHR_lock_surface */ 815 | 816 | /* ------------------------- EGL_KHR_lock_surface2 ------------------------ */ 817 | 818 | #ifndef EGL_KHR_lock_surface2 819 | #define EGL_KHR_lock_surface2 1 820 | 821 | #define EGLEW_KHR_lock_surface2 EGLEW_GET_VAR(__EGLEW_KHR_lock_surface2 ) 822 | 823 | #endif /* EGL_KHR_lock_surface2 */ 824 | 825 | /* ------------------------- EGL_KHR_lock_surface3 ------------------------ */ 826 | 827 | #ifndef EGL_KHR_lock_surface3 828 | #define EGL_KHR_lock_surface3 1 829 | 830 | #define EGLEW_KHR_lock_surface3 EGLEW_GET_VAR(__EGLEW_KHR_lock_surface3 ) 831 | 832 | #endif /* EGL_KHR_lock_surface3 */ 833 | 834 | /* --------------------- EGL_KHR_mutable_render_buffer -------------------- */ 835 | 836 | #ifndef EGL_KHR_mutable_render_buffer 837 | #define EGL_KHR_mutable_render_buffer 1 838 | 839 | #define EGLEW_KHR_mutable_render_buffer EGLEW_GET_VAR(__EGLEW_KHR_mutable_render_buffer ) 840 | 841 | #endif /* EGL_KHR_mutable_render_buffer */ 842 | 843 | /* ----------------------- EGL_KHR_no_config_context ---------------------- */ 844 | 845 | #ifndef EGL_KHR_no_config_context 846 | #define EGL_KHR_no_config_context 1 847 | 848 | #define EGLEW_KHR_no_config_context EGLEW_GET_VAR(__EGLEW_KHR_no_config_context ) 849 | 850 | #endif /* EGL_KHR_no_config_context */ 851 | 852 | /* ------------------------ EGL_KHR_partial_update ------------------------ */ 853 | 854 | #ifndef EGL_KHR_partial_update 855 | #define EGL_KHR_partial_update 1 856 | 857 | #define EGLEW_KHR_partial_update EGLEW_GET_VAR(__EGLEW_KHR_partial_update ) 858 | 859 | #endif /* EGL_KHR_partial_update */ 860 | 861 | /* ----------------------- EGL_KHR_platform_android ----------------------- */ 862 | 863 | #ifndef EGL_KHR_platform_android 864 | #define EGL_KHR_platform_android 1 865 | 866 | #define EGLEW_KHR_platform_android EGLEW_GET_VAR(__EGLEW_KHR_platform_android ) 867 | 868 | #endif /* EGL_KHR_platform_android */ 869 | 870 | /* ------------------------- EGL_KHR_platform_gbm ------------------------- */ 871 | 872 | #ifndef EGL_KHR_platform_gbm 873 | #define EGL_KHR_platform_gbm 1 874 | 875 | #define EGLEW_KHR_platform_gbm EGLEW_GET_VAR(__EGLEW_KHR_platform_gbm ) 876 | 877 | #endif /* EGL_KHR_platform_gbm */ 878 | 879 | /* ----------------------- EGL_KHR_platform_wayland ----------------------- */ 880 | 881 | #ifndef EGL_KHR_platform_wayland 882 | #define EGL_KHR_platform_wayland 1 883 | 884 | #define EGLEW_KHR_platform_wayland EGLEW_GET_VAR(__EGLEW_KHR_platform_wayland ) 885 | 886 | #endif /* EGL_KHR_platform_wayland */ 887 | 888 | /* ------------------------- EGL_KHR_platform_x11 ------------------------- */ 889 | 890 | #ifndef EGL_KHR_platform_x11 891 | #define EGL_KHR_platform_x11 1 892 | 893 | #define EGLEW_KHR_platform_x11 EGLEW_GET_VAR(__EGLEW_KHR_platform_x11 ) 894 | 895 | #endif /* EGL_KHR_platform_x11 */ 896 | 897 | /* ------------------------- EGL_KHR_reusable_sync ------------------------ */ 898 | 899 | #ifndef EGL_KHR_reusable_sync 900 | #define EGL_KHR_reusable_sync 1 901 | 902 | #define EGLEW_KHR_reusable_sync EGLEW_GET_VAR(__EGLEW_KHR_reusable_sync ) 903 | 904 | #endif /* EGL_KHR_reusable_sync */ 905 | 906 | /* ---------------------------- EGL_KHR_stream ---------------------------- */ 907 | 908 | #ifndef EGL_KHR_stream 909 | #define EGL_KHR_stream 1 910 | 911 | #define EGLEW_KHR_stream EGLEW_GET_VAR(__EGLEW_KHR_stream ) 912 | 913 | #endif /* EGL_KHR_stream */ 914 | 915 | /* ------------------------- EGL_KHR_stream_attrib ------------------------ */ 916 | 917 | #ifndef EGL_KHR_stream_attrib 918 | #define EGL_KHR_stream_attrib 1 919 | 920 | #define EGLEW_KHR_stream_attrib EGLEW_GET_VAR(__EGLEW_KHR_stream_attrib ) 921 | 922 | #endif /* EGL_KHR_stream_attrib */ 923 | 924 | /* ------------------- EGL_KHR_stream_consumer_gltexture ------------------ */ 925 | 926 | #ifndef EGL_KHR_stream_consumer_gltexture 927 | #define EGL_KHR_stream_consumer_gltexture 1 928 | 929 | #define EGLEW_KHR_stream_consumer_gltexture EGLEW_GET_VAR(__EGLEW_KHR_stream_consumer_gltexture ) 930 | 931 | #endif /* EGL_KHR_stream_consumer_gltexture */ 932 | 933 | /* -------------------- EGL_KHR_stream_cross_process_fd ------------------- */ 934 | 935 | #ifndef EGL_KHR_stream_cross_process_fd 936 | #define EGL_KHR_stream_cross_process_fd 1 937 | 938 | #define EGLEW_KHR_stream_cross_process_fd EGLEW_GET_VAR(__EGLEW_KHR_stream_cross_process_fd ) 939 | 940 | #endif /* EGL_KHR_stream_cross_process_fd */ 941 | 942 | /* -------------------------- EGL_KHR_stream_fifo ------------------------- */ 943 | 944 | #ifndef EGL_KHR_stream_fifo 945 | #define EGL_KHR_stream_fifo 1 946 | 947 | #define EGLEW_KHR_stream_fifo EGLEW_GET_VAR(__EGLEW_KHR_stream_fifo ) 948 | 949 | #endif /* EGL_KHR_stream_fifo */ 950 | 951 | /* ----------------- EGL_KHR_stream_producer_aldatalocator ---------------- */ 952 | 953 | #ifndef EGL_KHR_stream_producer_aldatalocator 954 | #define EGL_KHR_stream_producer_aldatalocator 1 955 | 956 | #define EGLEW_KHR_stream_producer_aldatalocator EGLEW_GET_VAR(__EGLEW_KHR_stream_producer_aldatalocator ) 957 | 958 | #endif /* EGL_KHR_stream_producer_aldatalocator */ 959 | 960 | /* ------------------ EGL_KHR_stream_producer_eglsurface ------------------ */ 961 | 962 | #ifndef EGL_KHR_stream_producer_eglsurface 963 | #define EGL_KHR_stream_producer_eglsurface 1 964 | 965 | #define EGLEW_KHR_stream_producer_eglsurface EGLEW_GET_VAR(__EGLEW_KHR_stream_producer_eglsurface ) 966 | 967 | #endif /* EGL_KHR_stream_producer_eglsurface */ 968 | 969 | /* ---------------------- EGL_KHR_surfaceless_context --------------------- */ 970 | 971 | #ifndef EGL_KHR_surfaceless_context 972 | #define EGL_KHR_surfaceless_context 1 973 | 974 | #define EGLEW_KHR_surfaceless_context EGLEW_GET_VAR(__EGLEW_KHR_surfaceless_context ) 975 | 976 | #endif /* EGL_KHR_surfaceless_context */ 977 | 978 | /* ------------------- EGL_KHR_swap_buffers_with_damage ------------------- */ 979 | 980 | #ifndef EGL_KHR_swap_buffers_with_damage 981 | #define EGL_KHR_swap_buffers_with_damage 1 982 | 983 | #define EGLEW_KHR_swap_buffers_with_damage EGLEW_GET_VAR(__EGLEW_KHR_swap_buffers_with_damage ) 984 | 985 | #endif /* EGL_KHR_swap_buffers_with_damage */ 986 | 987 | /* ------------------------ EGL_KHR_vg_parent_image ----------------------- */ 988 | 989 | #ifndef EGL_KHR_vg_parent_image 990 | #define EGL_KHR_vg_parent_image 1 991 | 992 | #define EGLEW_KHR_vg_parent_image EGLEW_GET_VAR(__EGLEW_KHR_vg_parent_image ) 993 | 994 | #endif /* EGL_KHR_vg_parent_image */ 995 | 996 | /* --------------------------- EGL_KHR_wait_sync -------------------------- */ 997 | 998 | #ifndef EGL_KHR_wait_sync 999 | #define EGL_KHR_wait_sync 1 1000 | 1001 | #define EGLEW_KHR_wait_sync EGLEW_GET_VAR(__EGLEW_KHR_wait_sync ) 1002 | 1003 | #endif /* EGL_KHR_wait_sync */ 1004 | 1005 | /* -------------------------- EGL_MESA_drm_image -------------------------- */ 1006 | 1007 | #ifndef EGL_MESA_drm_image 1008 | #define EGL_MESA_drm_image 1 1009 | 1010 | #define EGLEW_MESA_drm_image EGLEW_GET_VAR(__EGLEW_MESA_drm_image ) 1011 | 1012 | #endif /* EGL_MESA_drm_image */ 1013 | 1014 | /* --------------------- EGL_MESA_image_dma_buf_export -------------------- */ 1015 | 1016 | #ifndef EGL_MESA_image_dma_buf_export 1017 | #define EGL_MESA_image_dma_buf_export 1 1018 | 1019 | #define EGLEW_MESA_image_dma_buf_export EGLEW_GET_VAR(__EGLEW_MESA_image_dma_buf_export ) 1020 | 1021 | #endif /* EGL_MESA_image_dma_buf_export */ 1022 | 1023 | /* ------------------------- EGL_MESA_platform_gbm ------------------------ */ 1024 | 1025 | #ifndef EGL_MESA_platform_gbm 1026 | #define EGL_MESA_platform_gbm 1 1027 | 1028 | #define EGLEW_MESA_platform_gbm EGLEW_GET_VAR(__EGLEW_MESA_platform_gbm ) 1029 | 1030 | #endif /* EGL_MESA_platform_gbm */ 1031 | 1032 | /* --------------------- EGL_MESA_platform_surfaceless -------------------- */ 1033 | 1034 | #ifndef EGL_MESA_platform_surfaceless 1035 | #define EGL_MESA_platform_surfaceless 1 1036 | 1037 | #define EGLEW_MESA_platform_surfaceless EGLEW_GET_VAR(__EGLEW_MESA_platform_surfaceless ) 1038 | 1039 | #endif /* EGL_MESA_platform_surfaceless */ 1040 | 1041 | /* -------------------------- EGL_NOK_swap_region ------------------------- */ 1042 | 1043 | #ifndef EGL_NOK_swap_region 1044 | #define EGL_NOK_swap_region 1 1045 | 1046 | #define EGLEW_NOK_swap_region EGLEW_GET_VAR(__EGLEW_NOK_swap_region ) 1047 | 1048 | #endif /* EGL_NOK_swap_region */ 1049 | 1050 | /* ------------------------- EGL_NOK_swap_region2 ------------------------- */ 1051 | 1052 | #ifndef EGL_NOK_swap_region2 1053 | #define EGL_NOK_swap_region2 1 1054 | 1055 | #define EGLEW_NOK_swap_region2 EGLEW_GET_VAR(__EGLEW_NOK_swap_region2 ) 1056 | 1057 | #endif /* EGL_NOK_swap_region2 */ 1058 | 1059 | /* ---------------------- EGL_NOK_texture_from_pixmap --------------------- */ 1060 | 1061 | #ifndef EGL_NOK_texture_from_pixmap 1062 | #define EGL_NOK_texture_from_pixmap 1 1063 | 1064 | #define EGLEW_NOK_texture_from_pixmap EGLEW_GET_VAR(__EGLEW_NOK_texture_from_pixmap ) 1065 | 1066 | #endif /* EGL_NOK_texture_from_pixmap */ 1067 | 1068 | /* ------------------------ EGL_NV_3dvision_surface ----------------------- */ 1069 | 1070 | #ifndef EGL_NV_3dvision_surface 1071 | #define EGL_NV_3dvision_surface 1 1072 | 1073 | #define EGLEW_NV_3dvision_surface EGLEW_GET_VAR(__EGLEW_NV_3dvision_surface ) 1074 | 1075 | #endif /* EGL_NV_3dvision_surface */ 1076 | 1077 | /* ------------------------ EGL_NV_coverage_sample ------------------------ */ 1078 | 1079 | #ifndef EGL_NV_coverage_sample 1080 | #define EGL_NV_coverage_sample 1 1081 | 1082 | #define EGLEW_NV_coverage_sample EGLEW_GET_VAR(__EGLEW_NV_coverage_sample ) 1083 | 1084 | #endif /* EGL_NV_coverage_sample */ 1085 | 1086 | /* -------------------- EGL_NV_coverage_sample_resolve -------------------- */ 1087 | 1088 | #ifndef EGL_NV_coverage_sample_resolve 1089 | #define EGL_NV_coverage_sample_resolve 1 1090 | 1091 | #define EGLEW_NV_coverage_sample_resolve EGLEW_GET_VAR(__EGLEW_NV_coverage_sample_resolve ) 1092 | 1093 | #endif /* EGL_NV_coverage_sample_resolve */ 1094 | 1095 | /* --------------------------- EGL_NV_cuda_event -------------------------- */ 1096 | 1097 | #ifndef EGL_NV_cuda_event 1098 | #define EGL_NV_cuda_event 1 1099 | 1100 | #define EGLEW_NV_cuda_event EGLEW_GET_VAR(__EGLEW_NV_cuda_event ) 1101 | 1102 | #endif /* EGL_NV_cuda_event */ 1103 | 1104 | /* ------------------------ EGL_NV_depth_nonlinear ------------------------ */ 1105 | 1106 | #ifndef EGL_NV_depth_nonlinear 1107 | #define EGL_NV_depth_nonlinear 1 1108 | 1109 | #define EGLEW_NV_depth_nonlinear EGLEW_GET_VAR(__EGLEW_NV_depth_nonlinear ) 1110 | 1111 | #endif /* EGL_NV_depth_nonlinear */ 1112 | 1113 | /* -------------------------- EGL_NV_device_cuda -------------------------- */ 1114 | 1115 | #ifndef EGL_NV_device_cuda 1116 | #define EGL_NV_device_cuda 1 1117 | 1118 | #define EGLEW_NV_device_cuda EGLEW_GET_VAR(__EGLEW_NV_device_cuda ) 1119 | 1120 | #endif /* EGL_NV_device_cuda */ 1121 | 1122 | /* -------------------------- EGL_NV_native_query ------------------------- */ 1123 | 1124 | #ifndef EGL_NV_native_query 1125 | #define EGL_NV_native_query 1 1126 | 1127 | #define EGLEW_NV_native_query EGLEW_GET_VAR(__EGLEW_NV_native_query ) 1128 | 1129 | #endif /* EGL_NV_native_query */ 1130 | 1131 | /* --------------------- EGL_NV_post_convert_rounding --------------------- */ 1132 | 1133 | #ifndef EGL_NV_post_convert_rounding 1134 | #define EGL_NV_post_convert_rounding 1 1135 | 1136 | #define EGLEW_NV_post_convert_rounding EGLEW_GET_VAR(__EGLEW_NV_post_convert_rounding ) 1137 | 1138 | #endif /* EGL_NV_post_convert_rounding */ 1139 | 1140 | /* ------------------------ EGL_NV_post_sub_buffer ------------------------ */ 1141 | 1142 | #ifndef EGL_NV_post_sub_buffer 1143 | #define EGL_NV_post_sub_buffer 1 1144 | 1145 | #define EGLEW_NV_post_sub_buffer EGLEW_GET_VAR(__EGLEW_NV_post_sub_buffer ) 1146 | 1147 | #endif /* EGL_NV_post_sub_buffer */ 1148 | 1149 | /* ----------------- EGL_NV_robustness_video_memory_purge ----------------- */ 1150 | 1151 | #ifndef EGL_NV_robustness_video_memory_purge 1152 | #define EGL_NV_robustness_video_memory_purge 1 1153 | 1154 | #define EGLEW_NV_robustness_video_memory_purge EGLEW_GET_VAR(__EGLEW_NV_robustness_video_memory_purge ) 1155 | 1156 | #endif /* EGL_NV_robustness_video_memory_purge */ 1157 | 1158 | /* ----------------- EGL_NV_stream_consumer_gltexture_yuv ----------------- */ 1159 | 1160 | #ifndef EGL_NV_stream_consumer_gltexture_yuv 1161 | #define EGL_NV_stream_consumer_gltexture_yuv 1 1162 | 1163 | #define EGLEW_NV_stream_consumer_gltexture_yuv EGLEW_GET_VAR(__EGLEW_NV_stream_consumer_gltexture_yuv ) 1164 | 1165 | #endif /* EGL_NV_stream_consumer_gltexture_yuv */ 1166 | 1167 | /* ---------------------- EGL_NV_stream_cross_display --------------------- */ 1168 | 1169 | #ifndef EGL_NV_stream_cross_display 1170 | #define EGL_NV_stream_cross_display 1 1171 | 1172 | #define EGLEW_NV_stream_cross_display EGLEW_GET_VAR(__EGLEW_NV_stream_cross_display ) 1173 | 1174 | #endif /* EGL_NV_stream_cross_display */ 1175 | 1176 | /* ---------------------- EGL_NV_stream_cross_object ---------------------- */ 1177 | 1178 | #ifndef EGL_NV_stream_cross_object 1179 | #define EGL_NV_stream_cross_object 1 1180 | 1181 | #define EGLEW_NV_stream_cross_object EGLEW_GET_VAR(__EGLEW_NV_stream_cross_object ) 1182 | 1183 | #endif /* EGL_NV_stream_cross_object */ 1184 | 1185 | /* --------------------- EGL_NV_stream_cross_partition -------------------- */ 1186 | 1187 | #ifndef EGL_NV_stream_cross_partition 1188 | #define EGL_NV_stream_cross_partition 1 1189 | 1190 | #define EGLEW_NV_stream_cross_partition EGLEW_GET_VAR(__EGLEW_NV_stream_cross_partition ) 1191 | 1192 | #endif /* EGL_NV_stream_cross_partition */ 1193 | 1194 | /* ---------------------- EGL_NV_stream_cross_process --------------------- */ 1195 | 1196 | #ifndef EGL_NV_stream_cross_process 1197 | #define EGL_NV_stream_cross_process 1 1198 | 1199 | #define EGLEW_NV_stream_cross_process EGLEW_GET_VAR(__EGLEW_NV_stream_cross_process ) 1200 | 1201 | #endif /* EGL_NV_stream_cross_process */ 1202 | 1203 | /* ---------------------- EGL_NV_stream_cross_system ---------------------- */ 1204 | 1205 | #ifndef EGL_NV_stream_cross_system 1206 | #define EGL_NV_stream_cross_system 1 1207 | 1208 | #define EGLEW_NV_stream_cross_system EGLEW_GET_VAR(__EGLEW_NV_stream_cross_system ) 1209 | 1210 | #endif /* EGL_NV_stream_cross_system */ 1211 | 1212 | /* ------------------------ EGL_NV_stream_fifo_next ----------------------- */ 1213 | 1214 | #ifndef EGL_NV_stream_fifo_next 1215 | #define EGL_NV_stream_fifo_next 1 1216 | 1217 | #define EGLEW_NV_stream_fifo_next EGLEW_GET_VAR(__EGLEW_NV_stream_fifo_next ) 1218 | 1219 | #endif /* EGL_NV_stream_fifo_next */ 1220 | 1221 | /* -------------------- EGL_NV_stream_fifo_synchronous -------------------- */ 1222 | 1223 | #ifndef EGL_NV_stream_fifo_synchronous 1224 | #define EGL_NV_stream_fifo_synchronous 1 1225 | 1226 | #define EGLEW_NV_stream_fifo_synchronous EGLEW_GET_VAR(__EGLEW_NV_stream_fifo_synchronous ) 1227 | 1228 | #endif /* EGL_NV_stream_fifo_synchronous */ 1229 | 1230 | /* ---------------------- EGL_NV_stream_frame_limits ---------------------- */ 1231 | 1232 | #ifndef EGL_NV_stream_frame_limits 1233 | #define EGL_NV_stream_frame_limits 1 1234 | 1235 | #define EGLEW_NV_stream_frame_limits EGLEW_GET_VAR(__EGLEW_NV_stream_frame_limits ) 1236 | 1237 | #endif /* EGL_NV_stream_frame_limits */ 1238 | 1239 | /* ------------------------ EGL_NV_stream_metadata ------------------------ */ 1240 | 1241 | #ifndef EGL_NV_stream_metadata 1242 | #define EGL_NV_stream_metadata 1 1243 | 1244 | #define EGLEW_NV_stream_metadata EGLEW_GET_VAR(__EGLEW_NV_stream_metadata ) 1245 | 1246 | #endif /* EGL_NV_stream_metadata */ 1247 | 1248 | /* ------------------------- EGL_NV_stream_remote ------------------------- */ 1249 | 1250 | #ifndef EGL_NV_stream_remote 1251 | #define EGL_NV_stream_remote 1 1252 | 1253 | #define EGLEW_NV_stream_remote EGLEW_GET_VAR(__EGLEW_NV_stream_remote ) 1254 | 1255 | #endif /* EGL_NV_stream_remote */ 1256 | 1257 | /* -------------------------- EGL_NV_stream_reset ------------------------- */ 1258 | 1259 | #ifndef EGL_NV_stream_reset 1260 | #define EGL_NV_stream_reset 1 1261 | 1262 | #define EGLEW_NV_stream_reset EGLEW_GET_VAR(__EGLEW_NV_stream_reset ) 1263 | 1264 | #endif /* EGL_NV_stream_reset */ 1265 | 1266 | /* ------------------------- EGL_NV_stream_socket ------------------------- */ 1267 | 1268 | #ifndef EGL_NV_stream_socket 1269 | #define EGL_NV_stream_socket 1 1270 | 1271 | #define EGLEW_NV_stream_socket EGLEW_GET_VAR(__EGLEW_NV_stream_socket ) 1272 | 1273 | #endif /* EGL_NV_stream_socket */ 1274 | 1275 | /* ----------------------- EGL_NV_stream_socket_inet ---------------------- */ 1276 | 1277 | #ifndef EGL_NV_stream_socket_inet 1278 | #define EGL_NV_stream_socket_inet 1 1279 | 1280 | #define EGLEW_NV_stream_socket_inet EGLEW_GET_VAR(__EGLEW_NV_stream_socket_inet ) 1281 | 1282 | #endif /* EGL_NV_stream_socket_inet */ 1283 | 1284 | /* ----------------------- EGL_NV_stream_socket_unix ---------------------- */ 1285 | 1286 | #ifndef EGL_NV_stream_socket_unix 1287 | #define EGL_NV_stream_socket_unix 1 1288 | 1289 | #define EGLEW_NV_stream_socket_unix EGLEW_GET_VAR(__EGLEW_NV_stream_socket_unix ) 1290 | 1291 | #endif /* EGL_NV_stream_socket_unix */ 1292 | 1293 | /* -------------------------- EGL_NV_stream_sync -------------------------- */ 1294 | 1295 | #ifndef EGL_NV_stream_sync 1296 | #define EGL_NV_stream_sync 1 1297 | 1298 | #define EGLEW_NV_stream_sync EGLEW_GET_VAR(__EGLEW_NV_stream_sync ) 1299 | 1300 | #endif /* EGL_NV_stream_sync */ 1301 | 1302 | /* ------------------------------ EGL_NV_sync ----------------------------- */ 1303 | 1304 | #ifndef EGL_NV_sync 1305 | #define EGL_NV_sync 1 1306 | 1307 | #define EGLEW_NV_sync EGLEW_GET_VAR(__EGLEW_NV_sync ) 1308 | 1309 | #endif /* EGL_NV_sync */ 1310 | 1311 | /* -------------------------- EGL_NV_system_time -------------------------- */ 1312 | 1313 | #ifndef EGL_NV_system_time 1314 | #define EGL_NV_system_time 1 1315 | 1316 | #define EGLEW_NV_system_time EGLEW_GET_VAR(__EGLEW_NV_system_time ) 1317 | 1318 | #endif /* EGL_NV_system_time */ 1319 | 1320 | /* --------------------- EGL_TIZEN_image_native_buffer -------------------- */ 1321 | 1322 | #ifndef EGL_TIZEN_image_native_buffer 1323 | #define EGL_TIZEN_image_native_buffer 1 1324 | 1325 | #define EGLEW_TIZEN_image_native_buffer EGLEW_GET_VAR(__EGLEW_TIZEN_image_native_buffer ) 1326 | 1327 | #endif /* EGL_TIZEN_image_native_buffer */ 1328 | 1329 | /* -------------------- EGL_TIZEN_image_native_surface -------------------- */ 1330 | 1331 | #ifndef EGL_TIZEN_image_native_surface 1332 | #define EGL_TIZEN_image_native_surface 1 1333 | 1334 | #define EGLEW_TIZEN_image_native_surface EGLEW_GET_VAR(__EGLEW_TIZEN_image_native_surface ) 1335 | 1336 | #endif /* EGL_TIZEN_image_native_surface */ 1337 | 1338 | /* ------------------------------------------------------------------------- */ 1339 | 1340 | #define EGLEW_FUN_EXPORT GLEW_FUN_EXPORT 1341 | #define EGLEW_VAR_EXPORT GLEW_VAR_EXPORT 1342 | EGLEW_VAR_EXPORT GLboolean __EGLEW_VERSION_1_0 ; 1343 | EGLEW_VAR_EXPORT GLboolean __EGLEW_VERSION_1_1 ; 1344 | EGLEW_VAR_EXPORT GLboolean __EGLEW_VERSION_1_2 ; 1345 | EGLEW_VAR_EXPORT GLboolean __EGLEW_VERSION_1_3 ; 1346 | EGLEW_VAR_EXPORT GLboolean __EGLEW_VERSION_1_4 ; 1347 | EGLEW_VAR_EXPORT GLboolean __EGLEW_VERSION_1_5 ; 1348 | EGLEW_VAR_EXPORT GLboolean __EGLEW_ANDROID_blob_cache ; 1349 | EGLEW_VAR_EXPORT GLboolean __EGLEW_ANDROID_create_native_client_buffer ; 1350 | EGLEW_VAR_EXPORT GLboolean __EGLEW_ANDROID_framebuffer_target ; 1351 | EGLEW_VAR_EXPORT GLboolean __EGLEW_ANDROID_front_buffer_auto_refresh ; 1352 | EGLEW_VAR_EXPORT GLboolean __EGLEW_ANDROID_image_native_buffer ; 1353 | EGLEW_VAR_EXPORT GLboolean __EGLEW_ANDROID_native_fence_sync ; 1354 | EGLEW_VAR_EXPORT GLboolean __EGLEW_ANDROID_presentation_time ; 1355 | EGLEW_VAR_EXPORT GLboolean __EGLEW_ANDROID_recordable ; 1356 | EGLEW_VAR_EXPORT GLboolean __EGLEW_ANGLE_d3d_share_handle_client_buffer ; 1357 | EGLEW_VAR_EXPORT GLboolean __EGLEW_ANGLE_device_d3d ; 1358 | EGLEW_VAR_EXPORT GLboolean __EGLEW_ANGLE_query_surface_pointer ; 1359 | EGLEW_VAR_EXPORT GLboolean __EGLEW_ANGLE_surface_d3d_texture_2d_share_handle ; 1360 | EGLEW_VAR_EXPORT GLboolean __EGLEW_ANGLE_window_fixed_size ; 1361 | EGLEW_VAR_EXPORT GLboolean __EGLEW_ARM_implicit_external_sync ; 1362 | EGLEW_VAR_EXPORT GLboolean __EGLEW_ARM_pixmap_multisample_discard ; 1363 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_buffer_age ; 1364 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_client_extensions ; 1365 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_create_context_robustness ; 1366 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_device_base ; 1367 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_device_drm ; 1368 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_device_enumeration ; 1369 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_device_openwf ; 1370 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_device_query ; 1371 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_gl_colorspace_bt2020_linear ; 1372 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_gl_colorspace_bt2020_pq ; 1373 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_gl_colorspace_scrgb_linear ; 1374 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_image_dma_buf_import ; 1375 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_image_dma_buf_import_modifiers ; 1376 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_multiview_window ; 1377 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_output_base ; 1378 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_output_drm ; 1379 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_output_openwf ; 1380 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_pixel_format_float ; 1381 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_platform_base ; 1382 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_platform_device ; 1383 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_platform_wayland ; 1384 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_platform_x11 ; 1385 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_protected_content ; 1386 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_protected_surface ; 1387 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_stream_consumer_egloutput ; 1388 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_surface_SMPTE2086_metadata ; 1389 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_swap_buffers_with_damage ; 1390 | EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_yuv_surface ; 1391 | EGLEW_VAR_EXPORT GLboolean __EGLEW_HI_clientpixmap ; 1392 | EGLEW_VAR_EXPORT GLboolean __EGLEW_HI_colorformats ; 1393 | EGLEW_VAR_EXPORT GLboolean __EGLEW_IMG_context_priority ; 1394 | EGLEW_VAR_EXPORT GLboolean __EGLEW_IMG_image_plane_attribs ; 1395 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_cl_event ; 1396 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_cl_event2 ; 1397 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_client_get_all_proc_addresses ; 1398 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_config_attribs ; 1399 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_context_flush_control ; 1400 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_create_context ; 1401 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_create_context_no_error ; 1402 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_debug ; 1403 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_fence_sync ; 1404 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_get_all_proc_addresses ; 1405 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_gl_colorspace ; 1406 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_gl_renderbuffer_image ; 1407 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_gl_texture_2D_image ; 1408 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_gl_texture_3D_image ; 1409 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_gl_texture_cubemap_image ; 1410 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_image ; 1411 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_image_base ; 1412 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_image_pixmap ; 1413 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_lock_surface ; 1414 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_lock_surface2 ; 1415 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_lock_surface3 ; 1416 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_mutable_render_buffer ; 1417 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_no_config_context ; 1418 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_partial_update ; 1419 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_platform_android ; 1420 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_platform_gbm ; 1421 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_platform_wayland ; 1422 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_platform_x11 ; 1423 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_reusable_sync ; 1424 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_stream ; 1425 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_stream_attrib ; 1426 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_stream_consumer_gltexture ; 1427 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_stream_cross_process_fd ; 1428 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_stream_fifo ; 1429 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_stream_producer_aldatalocator ; 1430 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_stream_producer_eglsurface ; 1431 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_surfaceless_context ; 1432 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_swap_buffers_with_damage ; 1433 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_vg_parent_image ; 1434 | EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_wait_sync ; 1435 | EGLEW_VAR_EXPORT GLboolean __EGLEW_MESA_drm_image ; 1436 | EGLEW_VAR_EXPORT GLboolean __EGLEW_MESA_image_dma_buf_export ; 1437 | EGLEW_VAR_EXPORT GLboolean __EGLEW_MESA_platform_gbm ; 1438 | EGLEW_VAR_EXPORT GLboolean __EGLEW_MESA_platform_surfaceless ; 1439 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NOK_swap_region ; 1440 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NOK_swap_region2 ; 1441 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NOK_texture_from_pixmap ; 1442 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_3dvision_surface ; 1443 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_coverage_sample ; 1444 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_coverage_sample_resolve ; 1445 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_cuda_event ; 1446 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_depth_nonlinear ; 1447 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_device_cuda ; 1448 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_native_query ; 1449 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_post_convert_rounding ; 1450 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_post_sub_buffer ; 1451 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_robustness_video_memory_purge ; 1452 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_stream_consumer_gltexture_yuv ; 1453 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_stream_cross_display ; 1454 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_stream_cross_object ; 1455 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_stream_cross_partition ; 1456 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_stream_cross_process ; 1457 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_stream_cross_system ; 1458 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_stream_fifo_next ; 1459 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_stream_fifo_synchronous ; 1460 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_stream_frame_limits ; 1461 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_stream_metadata ; 1462 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_stream_remote ; 1463 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_stream_reset ; 1464 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_stream_socket ; 1465 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_stream_socket_inet ; 1466 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_stream_socket_unix ; 1467 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_stream_sync ; 1468 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_sync ; 1469 | EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_system_time ; 1470 | EGLEW_VAR_EXPORT GLboolean __EGLEW_TIZEN_image_native_buffer ; 1471 | EGLEW_VAR_EXPORT GLboolean __EGLEW_TIZEN_image_native_surface ; 1472 | /* ------------------------------------------------------------------------ */ 1473 | 1474 | GLEWAPI GLenum GLEWAPIENTRY eglewInit (EGLDisplay display); 1475 | GLEWAPI GLboolean GLEWAPIENTRY eglewIsSupported (const char *name); 1476 | 1477 | #define EGLEW_GET_VAR(x) (*(const GLboolean*)&x) 1478 | #define EGLEW_GET_FUN(x) x 1479 | 1480 | GLEWAPI GLboolean GLEWAPIENTRY eglewGetExtension (const char *name); 1481 | 1482 | #ifdef __cplusplus 1483 | } 1484 | #endif 1485 | 1486 | #endif /* __eglew_h__ */ 1487 | -------------------------------------------------------------------------------- /glew/src/visualinfo.c: -------------------------------------------------------------------------------- 1 | ///* 2 | //** visualinfo.c 3 | //** 4 | //** Copyright (C) Nate Robins, 1997 5 | //** Michael Wimmer, 1999 6 | //** Milan Ikits, 2002-2008 7 | //** Nigel Stewart, 2008-2013 8 | //** 9 | //** visualinfo is a small utility that displays all available visuals, 10 | //** aka. pixelformats, in an OpenGL system along with renderer version 11 | //** information. It shows a table of all the visuals that support OpenGL 12 | //** along with their capabilities. The format of the table is similar to 13 | //** that of glxinfo on Unix systems: 14 | //** 15 | //** visual ~= pixel format descriptor 16 | //** id = visual id (integer from 1 - max visuals) 17 | //** tp = type (wn: window, pb: pbuffer, wp: window & pbuffer, bm: bitmap) 18 | //** ac = acceleration (ge: generic, fu: full, no: none) 19 | //** fm = format (i: integer, f: float, c: color index) 20 | //** db = double buffer (y = yes) 21 | //** sw = swap method (x: exchange, c: copy, u: undefined) 22 | //** st = stereo (y = yes) 23 | //** sz = total # bits 24 | //** r = # bits of red 25 | //** g = # bits of green 26 | //** b = # bits of blue 27 | //** a = # bits of alpha 28 | //** axbf = # aux buffers 29 | //** dpth = # bits of depth 30 | //** stcl = # bits of stencil 31 | //*/ 32 | // 33 | //#include 34 | //#include 35 | //#include 36 | //#include 37 | //#if defined(GLEW_OSMESA) 38 | //#define GLAPI extern 39 | //#include 40 | //#elif defined(GLEW_EGL) 41 | //#include 42 | //#elif defined(_WIN32) 43 | //#include 44 | //#elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX) 45 | //#include 46 | //#include 47 | //#elif !defined(__HAIKU__) 48 | //#include 49 | //#endif 50 | // 51 | //#ifdef GLEW_MX 52 | //GLEWContext _glewctx; 53 | //# define glewGetContext() (&_glewctx) 54 | //# ifdef _WIN32 55 | //WGLEWContext _wglewctx; 56 | //# define wglewGetContext() (&_wglewctx) 57 | //# elif !defined(__APPLE__) && !defined(__HAIKU__) || defined(GLEW_APPLE_GLX) 58 | //GLXEWContext _glxewctx; 59 | //# define glxewGetContext() (&_glxewctx) 60 | //# endif 61 | //#endif /* GLEW_MX */ 62 | // 63 | //typedef struct GLContextStruct 64 | //{ 65 | //#if defined(GLEW_OSMESA) 66 | // OSMesaContext ctx; 67 | //#elif defined(GLEW_EGL) 68 | // EGLContext ctx; 69 | //#elif defined(_WIN32) 70 | // HWND wnd; 71 | // HDC dc; 72 | // HGLRC rc; 73 | //#elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX) 74 | // CGLContextObj ctx, octx; 75 | //#elif !defined(__HAIKU__) 76 | // Display* dpy; 77 | // XVisualInfo* vi; 78 | // GLXContext ctx; 79 | // Window wnd; 80 | // Colormap cmap; 81 | //#endif 82 | //} GLContext; 83 | // 84 | //void InitContext (GLContext* ctx); 85 | //GLboolean CreateContext (GLContext* ctx); 86 | //void DestroyContext (GLContext* ctx); 87 | //void VisualInfo (GLContext* ctx); 88 | //void PrintExtensions (const char* s); 89 | //GLboolean ParseArgs (int argc, char** argv); 90 | // 91 | //int showall = 0; 92 | //int displaystdout = 0; 93 | //int verbose = 0; 94 | //int drawableonly = 0; 95 | // 96 | //char* display = NULL; 97 | //int visual = -1; 98 | // 99 | //FILE* file = 0; 100 | // 101 | //int 102 | //main (int argc, char** argv) 103 | //{ 104 | // GLenum err; 105 | // GLContext ctx; 106 | // 107 | // /* ---------------------------------------------------------------------- */ 108 | // /* parse arguments */ 109 | // if (GL_TRUE == ParseArgs(argc-1, argv+1)) 110 | // { 111 | //#if defined(_WIN32) 112 | // fprintf(stderr, "Usage: visualinfo [-a] [-s] [-h] [-pf ]\n"); 113 | // fprintf(stderr, " -a: show all visuals\n"); 114 | // fprintf(stderr, " -s: display to stdout instead of visualinfo.txt\n"); 115 | // fprintf(stderr, " -pf : use given pixelformat\n"); 116 | // fprintf(stderr, " -h: this screen\n"); 117 | //#else 118 | // fprintf(stderr, "Usage: visualinfo [-h] [-display ] [-visual ]\n"); 119 | // fprintf(stderr, " -h: this screen\n"); 120 | // fprintf(stderr, " -display : use given display\n"); 121 | // fprintf(stderr, " -visual : use given visual\n"); 122 | //#endif 123 | // return 1; 124 | // } 125 | // 126 | // /* ---------------------------------------------------------------------- */ 127 | // /* create OpenGL rendering context */ 128 | // InitContext(&ctx); 129 | // if (GL_TRUE == CreateContext(&ctx)) 130 | // { 131 | // fprintf(stderr, "Error: CreateContext failed\n"); 132 | // DestroyContext(&ctx); 133 | // return 1; 134 | // } 135 | // 136 | // /* ---------------------------------------------------------------------- */ 137 | // /* initialize GLEW */ 138 | // glewExperimental = GL_TRUE; 139 | //#ifdef GLEW_MX 140 | // err = glewContextInit(glewGetContext()); 141 | //# ifdef _WIN32 142 | // err = err || wglewContextInit(wglewGetContext()); 143 | //# elif !defined(__APPLE__) && !defined(__HAIKU__) || defined(GLEW_APPLE_GLX) 144 | // err = err || glxewContextInit(glxewGetContext()); 145 | //# endif 146 | //#else 147 | // err = glewInit(); 148 | //#endif 149 | // if (GLEW_OK != err) 150 | // { 151 | // fprintf(stderr, "Error [main]: glewInit failed: %s\n", glewGetErrorString(err)); 152 | // DestroyContext(&ctx); 153 | // return 1; 154 | // } 155 | // 156 | // /* ---------------------------------------------------------------------- */ 157 | // /* open file */ 158 | //#if defined(_WIN32) 159 | // if (!displaystdout) 160 | // { 161 | //#if defined(_MSC_VER) && (_MSC_VER >= 1400) 162 | // if (fopen_s(&file, "visualinfo.txt", "w") != 0) 163 | // file = stdout; 164 | //#else 165 | // file = fopen("visualinfo.txt", "w"); 166 | //#endif 167 | // } 168 | // if (file == NULL) 169 | // file = stdout; 170 | //#else 171 | // file = stdout; 172 | //#endif 173 | // 174 | // /* ---------------------------------------------------------------------- */ 175 | // /* output header information */ 176 | // /* OpenGL extensions */ 177 | // fprintf(file, "OpenGL vendor string: %s\n", glGetString(GL_VENDOR)); 178 | // fprintf(file, "OpenGL renderer string: %s\n", glGetString(GL_RENDERER)); 179 | // fprintf(file, "OpenGL version string: %s\n", glGetString(GL_VERSION)); 180 | // fprintf(file, "OpenGL extensions (GL_): \n"); 181 | // PrintExtensions((const char*)glGetString(GL_EXTENSIONS)); 182 | // 183 | //#ifndef GLEW_NO_GLU 184 | // /* GLU extensions */ 185 | // fprintf(file, "GLU version string: %s\n", gluGetString(GLU_VERSION)); 186 | // fprintf(file, "GLU extensions (GLU_): \n"); 187 | // PrintExtensions((const char*)gluGetString(GLU_EXTENSIONS)); 188 | //#endif 189 | // 190 | // /* ---------------------------------------------------------------------- */ 191 | // /* extensions string */ 192 | //#if defined(GLEW_OSMESA) 193 | //#elif defined(GLEW_EGL) 194 | //#elif defined(_WIN32) 195 | // /* WGL extensions */ 196 | // if (WGLEW_ARB_extensions_string || WGLEW_EXT_extensions_string) 197 | // { 198 | // fprintf(file, "WGL extensions (WGL_): \n"); 199 | // PrintExtensions(wglGetExtensionsStringARB ? 200 | // (const char*)wglGetExtensionsStringARB(ctx.dc) : 201 | // (const char*)wglGetExtensionsStringEXT()); 202 | // } 203 | //#elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX) 204 | // 205 | //#elif defined(__HAIKU__) 206 | // 207 | // /* TODO */ 208 | // 209 | //#else 210 | // /* GLX extensions */ 211 | // fprintf(file, "GLX extensions (GLX_): \n"); 212 | // PrintExtensions(glXQueryExtensionsString(glXGetCurrentDisplay(), 213 | // DefaultScreen(glXGetCurrentDisplay()))); 214 | //#endif 215 | // 216 | // /* ---------------------------------------------------------------------- */ 217 | // /* enumerate all the formats */ 218 | // VisualInfo(&ctx); 219 | // 220 | // /* ---------------------------------------------------------------------- */ 221 | // /* release resources */ 222 | // DestroyContext(&ctx); 223 | // if (file != stdout) 224 | // fclose(file); 225 | // return 0; 226 | //} 227 | // 228 | ///* do the magic to separate all extensions with comma's, except 229 | // for the last one that _may_ terminate in a space. */ 230 | //void PrintExtensions (const char* s) 231 | //{ 232 | // char t[80]; 233 | // int i=0; 234 | // char* p=0; 235 | // 236 | // t[79] = '\0'; 237 | // while (*s) 238 | // { 239 | // t[i++] = *s; 240 | // if(*s == ' ') 241 | // { 242 | // if (*(s+1) != '\0') { 243 | // t[i-1] = ','; 244 | // t[i] = ' '; 245 | // p = &t[i++]; 246 | // } 247 | // else /* zoinks! last one terminated in a space! */ 248 | // { 249 | // t[i-1] = '\0'; 250 | // } 251 | // } 252 | // if(i > 80 - 5) 253 | // { 254 | // *p = t[i] = '\0'; 255 | // fprintf(file, " %s\n", t); 256 | // p++; 257 | // i = (int)strlen(p); 258 | //#if defined(_MSC_VER) && (_MSC_VER >= 1400) 259 | // strcpy_s(t, sizeof(t), p); 260 | //#else 261 | // strcpy(t, p); 262 | //#endif 263 | // } 264 | // s++; 265 | // } 266 | // t[i] = '\0'; 267 | // fprintf(file, " %s.\n", t); 268 | //} 269 | // 270 | ///* ---------------------------------------------------------------------- */ 271 | // 272 | //#if defined(GLEW_OSMESA) || defined(GLEW_EGL) 273 | // 274 | //void 275 | //VisualInfo (GLContext* ctx) 276 | //{ 277 | //} 278 | // 279 | //#elif defined(_WIN32) 280 | // 281 | //void 282 | //VisualInfoARB (GLContext* ctx) 283 | //{ 284 | // int attrib[32], value[32], n_attrib, n_pbuffer=0, n_float=0; 285 | // int i, pf, maxpf; 286 | // unsigned int c; 287 | // 288 | // /* to get pbuffer capable pixel formats */ 289 | // attrib[0] = WGL_DRAW_TO_PBUFFER_ARB; 290 | // attrib[1] = GL_TRUE; 291 | // attrib[2] = 0; 292 | // wglChoosePixelFormatARB(ctx->dc, attrib, 0, 1, &pf, &c); 293 | // /* query number of pixel formats */ 294 | // attrib[0] = WGL_NUMBER_PIXEL_FORMATS_ARB; 295 | // wglGetPixelFormatAttribivARB(ctx->dc, 0, 0, 1, attrib, value); 296 | // maxpf = value[0]; 297 | // for (i=0; i<32; i++) 298 | // value[i] = 0; 299 | // 300 | // attrib[0] = WGL_SUPPORT_OPENGL_ARB; 301 | // attrib[1] = WGL_DRAW_TO_WINDOW_ARB; 302 | // attrib[2] = WGL_DRAW_TO_BITMAP_ARB; 303 | // attrib[3] = WGL_ACCELERATION_ARB; 304 | // /* WGL_NO_ACCELERATION_ARB, WGL_GENERIC_ACCELERATION_ARB, WGL_FULL_ACCELERATION_ARB */ 305 | // attrib[4] = WGL_SWAP_METHOD_ARB; 306 | // /* WGL_SWAP_EXCHANGE_ARB, WGL_SWAP_COPY_ARB, WGL_SWAP_UNDEFINED_ARB */ 307 | // attrib[5] = WGL_DOUBLE_BUFFER_ARB; 308 | // attrib[6] = WGL_STEREO_ARB; 309 | // attrib[7] = WGL_PIXEL_TYPE_ARB; 310 | // /* WGL_TYPE_RGBA_ARB, WGL_TYPE_COLORINDEX_ARB, 311 | // WGL_TYPE_RGBA_FLOAT_ATI (WGL_ATI_pixel_format_float) */ 312 | // /* Color buffer information */ 313 | // attrib[8] = WGL_COLOR_BITS_ARB; 314 | // attrib[9] = WGL_RED_BITS_ARB; 315 | // attrib[10] = WGL_GREEN_BITS_ARB; 316 | // attrib[11] = WGL_BLUE_BITS_ARB; 317 | // attrib[12] = WGL_ALPHA_BITS_ARB; 318 | // /* Accumulation buffer information */ 319 | // attrib[13] = WGL_ACCUM_BITS_ARB; 320 | // attrib[14] = WGL_ACCUM_RED_BITS_ARB; 321 | // attrib[15] = WGL_ACCUM_GREEN_BITS_ARB; 322 | // attrib[16] = WGL_ACCUM_BLUE_BITS_ARB; 323 | // attrib[17] = WGL_ACCUM_ALPHA_BITS_ARB; 324 | // /* Depth, stencil, and aux buffer information */ 325 | // attrib[18] = WGL_DEPTH_BITS_ARB; 326 | // attrib[19] = WGL_STENCIL_BITS_ARB; 327 | // attrib[20] = WGL_AUX_BUFFERS_ARB; 328 | // /* Layer information */ 329 | // attrib[21] = WGL_NUMBER_OVERLAYS_ARB; 330 | // attrib[22] = WGL_NUMBER_UNDERLAYS_ARB; 331 | // attrib[23] = WGL_SWAP_LAYER_BUFFERS_ARB; 332 | // attrib[24] = WGL_SAMPLES_ARB; 333 | // attrib[25] = WGL_SUPPORT_GDI_ARB; 334 | // n_attrib = 26; 335 | // if (WGLEW_ARB_pbuffer) 336 | // { 337 | // attrib[n_attrib] = WGL_DRAW_TO_PBUFFER_ARB; 338 | // n_pbuffer = n_attrib; 339 | // n_attrib++; 340 | // } 341 | // if (WGLEW_NV_float_buffer) 342 | // { 343 | // attrib[n_attrib] = WGL_FLOAT_COMPONENTS_NV; 344 | // n_float = n_attrib; 345 | // n_attrib++; 346 | // } 347 | // 348 | // if (!verbose) 349 | // { 350 | // /* print table header */ 351 | // fprintf(file, " +-----+-------------------------+-----------------+----------+-----------------+----------+\n"); 352 | // fprintf(file, " | | visual | color | ax dp st | accum | layer |\n"); 353 | // fprintf(file, " | id | tp ac gd fm db sw st ms | sz r g b a | bf th cl | sz r g b a | ov un sw |\n"); 354 | // fprintf(file, " +-----+-------------------------+-----------------+----------+-----------------+----------+\n"); 355 | // /* loop through all the pixel formats */ 356 | // for(i = 1; i <= maxpf; i++) 357 | // { 358 | // wglGetPixelFormatAttribivARB(ctx->dc, i, 0, n_attrib, attrib, value); 359 | // /* only describe this format if it supports OpenGL */ 360 | // if (!value[0]) continue; 361 | // /* by default show only fully accelerated window or pbuffer capable visuals */ 362 | // if (!showall 363 | // && ((value[2] && !value[1]) 364 | // || (!WGLEW_ARB_pbuffer || !value[n_pbuffer]) 365 | // || (value[3] != WGL_FULL_ACCELERATION_ARB))) continue; 366 | // /* print out the information for this visual */ 367 | // /* visual id */ 368 | // fprintf(file, " |% 4d | ", i); 369 | // /* visual type */ 370 | // if (value[1]) 371 | // { 372 | // if (WGLEW_ARB_pbuffer && value[n_pbuffer]) fprintf(file, "wp "); 373 | // else fprintf(file, "wn "); 374 | // } 375 | // else 376 | // { 377 | // if (value[2]) fprintf(file, "bm "); 378 | // else if (WGLEW_ARB_pbuffer && value[n_pbuffer]) fprintf(file, "pb "); 379 | // } 380 | // /* acceleration */ 381 | // fprintf(file, "%s ", value[3] == WGL_FULL_ACCELERATION_ARB ? "fu" : 382 | // value[3] == WGL_GENERIC_ACCELERATION_ARB ? "ge" : 383 | // value[3] == WGL_NO_ACCELERATION_ARB ? "no" : ". "); 384 | // /* gdi support */ 385 | // fprintf(file, " %c ", value[25] ? 'y' : '.'); 386 | // /* format */ 387 | // if (WGLEW_NV_float_buffer && value[n_float]) fprintf(file, " f "); 388 | // else if (WGLEW_ATI_pixel_format_float && value[7] == WGL_TYPE_RGBA_FLOAT_ATI) fprintf(file, " f "); 389 | // else if (value[7] == WGL_TYPE_RGBA_ARB) fprintf(file, " i "); 390 | // else if (value[7] == WGL_TYPE_COLORINDEX_ARB) fprintf(file, " c "); 391 | // else if (value[7] == WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT) fprintf(file," p "); 392 | // else fprintf(file," ? "); 393 | // /* double buffer */ 394 | // fprintf(file, " %c ", value[5] ? 'y' : '.'); 395 | // /* swap method */ 396 | // if (value[4] == WGL_SWAP_EXCHANGE_ARB) fprintf(file, " x "); 397 | // else if (value[4] == WGL_SWAP_COPY_ARB) fprintf(file, " c "); 398 | // else if (value[4] == WGL_SWAP_UNDEFINED_ARB) fprintf(file, " . "); 399 | // else fprintf(file, " . "); 400 | // /* stereo */ 401 | // fprintf(file, " %c ", value[6] ? 'y' : '.'); 402 | // /* multisample */ 403 | // if (value[24] > 0) 404 | // fprintf(file, "%2d | ", value[24]); 405 | // else 406 | // fprintf(file, " . | "); 407 | // /* color size */ 408 | // if (value[8]) fprintf(file, "%3d ", value[8]); 409 | // else fprintf(file, " . "); 410 | // /* red */ 411 | // if (value[9]) fprintf(file, "%2d ", value[9]); 412 | // else fprintf(file, " . "); 413 | // /* green */ 414 | // if (value[10]) fprintf(file, "%2d ", value[10]); 415 | // else fprintf(file, " . "); 416 | // /* blue */ 417 | // if (value[11]) fprintf(file, "%2d ", value[11]); 418 | // else fprintf(file, " . "); 419 | // /* alpha */ 420 | // if (value[12]) fprintf(file, "%2d | ", value[12]); 421 | // else fprintf(file, " . | "); 422 | // /* aux buffers */ 423 | // if (value[20]) fprintf(file, "%2d ", value[20]); 424 | // else fprintf(file, " . "); 425 | // /* depth */ 426 | // if (value[18]) fprintf(file, "%2d ", value[18]); 427 | // else fprintf(file, " . "); 428 | // /* stencil */ 429 | // if (value[19]) fprintf(file, "%2d | ", value[19]); 430 | // else fprintf(file, " . | "); 431 | // /* accum size */ 432 | // if (value[13]) fprintf(file, "%3d ", value[13]); 433 | // else fprintf(file, " . "); 434 | // /* accum red */ 435 | // if (value[14]) fprintf(file, "%2d ", value[14]); 436 | // else fprintf(file, " . "); 437 | // /* accum green */ 438 | // if (value[15]) fprintf(file, "%2d ", value[15]); 439 | // else fprintf(file, " . "); 440 | // /* accum blue */ 441 | // if (value[16]) fprintf(file, "%2d ", value[16]); 442 | // else fprintf(file, " . "); 443 | // /* accum alpha */ 444 | // if (value[17]) fprintf(file, "%2d | ", value[17]); 445 | // else fprintf(file, " . | "); 446 | // /* overlay */ 447 | // if (value[21]) fprintf(file, "%2d ", value[21]); 448 | // else fprintf(file, " . "); 449 | // /* underlay */ 450 | // if (value[22]) fprintf(file, "%2d ", value[22]); 451 | // else fprintf(file, " . "); 452 | // /* layer swap */ 453 | // if (value[23]) fprintf(file, "y "); 454 | // else fprintf(file, " . "); 455 | // fprintf(file, "|\n"); 456 | // } 457 | // /* print table footer */ 458 | // fprintf(file, " +-----+-------------------------+-----------------+----------+-----------------+----------+\n"); 459 | // fprintf(file, " | | visual | color | ax dp st | accum | layer |\n"); 460 | // fprintf(file, " | id | tp ac gd fm db sw st ms | sz r g b a | bf th cl | sz r g b a | ov un sw |\n"); 461 | // fprintf(file, " +-----+-------------------------+-----------------+----------+-----------------+----------+\n"); 462 | // } 463 | // else /* verbose */ 464 | // { 465 | //#if 0 466 | // fprintf(file, "\n"); 467 | // /* loop through all the pixel formats */ 468 | // for(i = 1; i <= maxpf; i++) 469 | // { 470 | // DescribePixelFormat(ctx->dc, i, sizeof(PIXELFORMATDESCRIPTOR), &pfd); 471 | // /* only describe this format if it supports OpenGL */ 472 | // if(!(pfd.dwFlags & PFD_SUPPORT_OPENGL) 473 | // || (drawableonly && !(pfd.dwFlags & PFD_DRAW_TO_WINDOW))) continue; 474 | // fprintf(file, "Visual ID: %2d depth=%d class=%s\n", i, pfd.cDepthBits, 475 | // pfd.cColorBits <= 8 ? "PseudoColor" : "TrueColor"); 476 | // fprintf(file, " bufferSize=%d level=%d renderType=%s doubleBuffer=%d stereo=%d\n", pfd.cColorBits, pfd.bReserved, pfd.iPixelType == PFD_TYPE_RGBA ? "rgba" : "ci", pfd.dwFlags & PFD_DOUBLEBUFFER, pfd.dwFlags & PFD_STEREO); 477 | // fprintf(file, " generic=%d generic accelerated=%d\n", (pfd.dwFlags & PFD_GENERIC_FORMAT) == PFD_GENERIC_FORMAT, (pfd.dwFlags & PFD_GENERIC_ACCELERATED) == PFD_GENERIC_ACCELERATED); 478 | // fprintf(file, " rgba: redSize=%d greenSize=%d blueSize=%d alphaSize=%d\n", pfd.cRedBits, pfd.cGreenBits, pfd.cBlueBits, pfd.cAlphaBits); 479 | // fprintf(file, " auxBuffers=%d depthSize=%d stencilSize=%d\n", pfd.cAuxBuffers, pfd.cDepthBits, pfd.cStencilBits); 480 | // fprintf(file, " accum: redSize=%d greenSize=%d blueSize=%d alphaSize=%d\n", pfd.cAccumRedBits, pfd.cAccumGreenBits, pfd.cAccumBlueBits, pfd.cAccumAlphaBits); 481 | // fprintf(file, " multiSample=%d multisampleBuffers=%d\n", 0, 0); 482 | // fprintf(file, " Opaque.\n"); 483 | // } 484 | //#endif 485 | // } 486 | //} 487 | // 488 | //void 489 | //VisualInfoGDI (GLContext* ctx) 490 | //{ 491 | // int i, maxpf; 492 | // PIXELFORMATDESCRIPTOR pfd; 493 | // 494 | // /* calling DescribePixelFormat() with NULL pfd (!!!) return maximum 495 | // number of pixel formats */ 496 | // maxpf = DescribePixelFormat(ctx->dc, 1, 0, NULL); 497 | // 498 | // if (!verbose) 499 | // { 500 | // fprintf(file, "-----------------------------------------------------------------------------\n"); 501 | // fprintf(file, " visual x bf lv rg d st ge ge r g b a ax dp st accum buffs ms \n"); 502 | // fprintf(file, " id dep tp sp sz l ci b ro ne ac sz sz sz sz bf th cl sz r g b a ns b\n"); 503 | // fprintf(file, "-----------------------------------------------------------------------------\n"); 504 | // 505 | // /* loop through all the pixel formats */ 506 | // for(i = 1; i <= maxpf; i++) 507 | // { 508 | // DescribePixelFormat(ctx->dc, i, sizeof(PIXELFORMATDESCRIPTOR), &pfd); 509 | // /* only describe this format if it supports OpenGL */ 510 | // if(!(pfd.dwFlags & PFD_SUPPORT_OPENGL) 511 | // || (drawableonly && (pfd.dwFlags & PFD_DRAW_TO_BITMAP))) continue; 512 | // /* other criteria could be tested here for actual pixel format 513 | // choosing in an application: 514 | // 515 | // for (...each pixel format...) { 516 | // if (pfd.dwFlags & PFD_SUPPORT_OPENGL && 517 | // pfd.dwFlags & PFD_DOUBLEBUFFER && 518 | // pfd.cDepthBits >= 24 && 519 | // pfd.cColorBits >= 24) 520 | // { 521 | // goto found; 522 | // } 523 | // } 524 | // ... not found so exit ... 525 | // found: 526 | // ... found so use it ... 527 | // */ 528 | // /* print out the information for this pixel format */ 529 | // fprintf(file, "0x%02x ", i); 530 | // fprintf(file, "%3d ", pfd.cColorBits); 531 | // if(pfd.dwFlags & PFD_DRAW_TO_WINDOW) fprintf(file, "wn "); 532 | // else if(pfd.dwFlags & PFD_DRAW_TO_BITMAP) fprintf(file, "bm "); 533 | // else fprintf(file, "pb "); 534 | // /* should find transparent pixel from LAYERPLANEDESCRIPTOR */ 535 | // fprintf(file, " . "); 536 | // fprintf(file, "%3d ", pfd.cColorBits); 537 | // /* bReserved field indicates number of over/underlays */ 538 | // if(pfd.bReserved) fprintf(file, " %d ", pfd.bReserved); 539 | // else fprintf(file, " . "); 540 | // fprintf(file, " %c ", pfd.iPixelType == PFD_TYPE_RGBA ? 'r' : 'c'); 541 | // fprintf(file, "%c ", pfd.dwFlags & PFD_DOUBLEBUFFER ? 'y' : '.'); 542 | // fprintf(file, " %c ", pfd.dwFlags & PFD_STEREO ? 'y' : '.'); 543 | // /* added: */ 544 | // fprintf(file, " %c ", pfd.dwFlags & PFD_GENERIC_FORMAT ? 'y' : '.'); 545 | // fprintf(file, " %c ", pfd.dwFlags & PFD_GENERIC_ACCELERATED ? 'y' : '.'); 546 | // if(pfd.cRedBits && pfd.iPixelType == PFD_TYPE_RGBA) 547 | // fprintf(file, "%2d ", pfd.cRedBits); 548 | // else fprintf(file, " . "); 549 | // if(pfd.cGreenBits && pfd.iPixelType == PFD_TYPE_RGBA) 550 | // fprintf(file, "%2d ", pfd.cGreenBits); 551 | // else fprintf(file, " . "); 552 | // if(pfd.cBlueBits && pfd.iPixelType == PFD_TYPE_RGBA) 553 | // fprintf(file, "%2d ", pfd.cBlueBits); 554 | // else fprintf(file, " . "); 555 | // if(pfd.cAlphaBits && pfd.iPixelType == PFD_TYPE_RGBA) 556 | // fprintf(file, "%2d ", pfd.cAlphaBits); 557 | // else fprintf(file, " . "); 558 | // if(pfd.cAuxBuffers) fprintf(file, "%2d ", pfd.cAuxBuffers); 559 | // else fprintf(file, " . "); 560 | // if(pfd.cDepthBits) fprintf(file, "%2d ", pfd.cDepthBits); 561 | // else fprintf(file, " . "); 562 | // if(pfd.cStencilBits) fprintf(file, "%2d ", pfd.cStencilBits); 563 | // else fprintf(file, " . "); 564 | // if(pfd.cAccumBits) fprintf(file, "%3d ", pfd.cAccumBits); 565 | // else fprintf(file, " . "); 566 | // if(pfd.cAccumRedBits) fprintf(file, "%2d ", pfd.cAccumRedBits); 567 | // else fprintf(file, " . "); 568 | // if(pfd.cAccumGreenBits) fprintf(file, "%2d ", pfd.cAccumGreenBits); 569 | // else fprintf(file, " . "); 570 | // if(pfd.cAccumBlueBits) fprintf(file, "%2d ", pfd.cAccumBlueBits); 571 | // else fprintf(file, " . "); 572 | // if(pfd.cAccumAlphaBits) fprintf(file, "%2d ", pfd.cAccumAlphaBits); 573 | // else fprintf(file, " . "); 574 | // /* no multisample in win32 */ 575 | // fprintf(file, " . .\n"); 576 | // } 577 | // /* print table footer */ 578 | // fprintf(file, "-----------------------------------------------------------------------------\n"); 579 | // fprintf(file, " visual x bf lv rg d st ge ge r g b a ax dp st accum buffs ms \n"); 580 | // fprintf(file, " id dep tp sp sz l ci b ro ne ac sz sz sz sz bf th cl sz r g b a ns b\n"); 581 | // fprintf(file, "-----------------------------------------------------------------------------\n"); 582 | // } 583 | // else /* verbose */ 584 | // { 585 | // fprintf(file, "\n"); 586 | // /* loop through all the pixel formats */ 587 | // for(i = 1; i <= maxpf; i++) 588 | // { 589 | // DescribePixelFormat(ctx->dc, i, sizeof(PIXELFORMATDESCRIPTOR), &pfd); 590 | // /* only describe this format if it supports OpenGL */ 591 | // if(!(pfd.dwFlags & PFD_SUPPORT_OPENGL) 592 | // || (drawableonly && !(pfd.dwFlags & PFD_DRAW_TO_WINDOW))) continue; 593 | // fprintf(file, "Visual ID: %2d depth=%d class=%s\n", i, pfd.cDepthBits, 594 | // pfd.cColorBits <= 8 ? "PseudoColor" : "TrueColor"); 595 | // fprintf(file, " bufferSize=%d level=%d renderType=%s doubleBuffer=%ld stereo=%ld\n", pfd.cColorBits, pfd.bReserved, pfd.iPixelType == PFD_TYPE_RGBA ? "rgba" : "ci", pfd.dwFlags & PFD_DOUBLEBUFFER, pfd.dwFlags & PFD_STEREO); 596 | // fprintf(file, " generic=%d generic accelerated=%d\n", (pfd.dwFlags & PFD_GENERIC_FORMAT) == PFD_GENERIC_FORMAT, (pfd.dwFlags & PFD_GENERIC_ACCELERATED) == PFD_GENERIC_ACCELERATED); 597 | // fprintf(file, " rgba: redSize=%d greenSize=%d blueSize=%d alphaSize=%d\n", pfd.cRedBits, pfd.cGreenBits, pfd.cBlueBits, pfd.cAlphaBits); 598 | // fprintf(file, " auxBuffers=%d depthSize=%d stencilSize=%d\n", pfd.cAuxBuffers, pfd.cDepthBits, pfd.cStencilBits); 599 | // fprintf(file, " accum: redSize=%d greenSize=%d blueSize=%d alphaSize=%d\n", pfd.cAccumRedBits, pfd.cAccumGreenBits, pfd.cAccumBlueBits, pfd.cAccumAlphaBits); 600 | // fprintf(file, " multiSample=%d multisampleBuffers=%d\n", 0, 0); 601 | // fprintf(file, " Opaque.\n"); 602 | // } 603 | // } 604 | //} 605 | // 606 | //void 607 | //VisualInfo (GLContext* ctx) 608 | //{ 609 | // if (WGLEW_ARB_pixel_format) 610 | // VisualInfoARB(ctx); 611 | // else 612 | // VisualInfoGDI(ctx); 613 | //} 614 | // 615 | ///* ---------------------------------------------------------------------- */ 616 | // 617 | //#elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX) 618 | // 619 | //void 620 | //VisualInfo (__attribute__((unused)) GLContext* ctx) 621 | //{ 622 | ///* 623 | // int attrib[] = { AGL_RGBA, AGL_NONE }; 624 | // AGLPixelFormat pf; 625 | // GLint value; 626 | // pf = aglChoosePixelFormat(NULL, 0, attrib); 627 | // while (pf != NULL) 628 | // { 629 | // aglDescribePixelFormat(pf, GL_RGBA, &value); 630 | // fprintf(stderr, "%d\n", value); 631 | // pf = aglNextPixelFormat(pf); 632 | // } 633 | //*/ 634 | //} 635 | // 636 | ///* ---------------------------------------------------------------------- */ 637 | // 638 | //#elif defined(__HAIKU__) 639 | // 640 | //void 641 | //VisualInfo (GLContext* ctx) 642 | //{ 643 | // /* TODO */ 644 | //} 645 | // 646 | //#else /* GLX */ 647 | // 648 | //void 649 | //VisualInfo (GLContext* ctx) 650 | //{ 651 | // int n_fbc; 652 | // GLXFBConfig* fbc; 653 | // int value, ret, i; 654 | // 655 | // fbc = glXGetFBConfigs(ctx->dpy, DefaultScreen(ctx->dpy), &n_fbc); 656 | // 657 | // if (fbc) 658 | // { 659 | // if (!verbose) 660 | // { 661 | // /* print table header */ 662 | // fprintf(file, " +-----+-------------------------+-----------------+----------+-------------+-------+------+\n"); 663 | // fprintf(file, " | | visual | color | ax dp st | accum | ms | cav |\n"); 664 | // fprintf(file, " | id | tp xr cl fm db st lv xp | sz r g b a | bf th cl | r g b a | ns b | eat |\n"); 665 | // fprintf(file, " +-----+-------------------------+-----------------+----------+-------------+-------+------+\n"); 666 | // /* loop through all the fbcs */ 667 | // for (i=0; idpy, fbc[i], GLX_FBCONFIG_ID, &value); 672 | // if (ret != Success) 673 | // { 674 | // fprintf(file, "| ? |"); 675 | // } 676 | // else 677 | // { 678 | // fprintf(file, " |% 4d | ", value); 679 | // } 680 | // /* visual type */ 681 | // ret = glXGetFBConfigAttrib(ctx->dpy, fbc[i], GLX_DRAWABLE_TYPE, &value); 682 | // if (ret != Success) 683 | // { 684 | // fprintf(file, " ? "); 685 | // } 686 | // else 687 | // { 688 | // if (value & GLX_WINDOW_BIT) 689 | // { 690 | // if (value & GLX_PBUFFER_BIT) 691 | // { 692 | // fprintf(file, "wp "); 693 | // } 694 | // else 695 | // { 696 | // fprintf(file, "wn "); 697 | // } 698 | // } 699 | // else 700 | // { 701 | // if (value & GLX_PBUFFER_BIT) 702 | // { 703 | // fprintf(file, "pb "); 704 | // } 705 | // else if (value & GLX_PIXMAP_BIT) 706 | // { 707 | // fprintf(file, "pm "); 708 | // } 709 | // else 710 | // { 711 | // fprintf(file, " ? "); 712 | // } 713 | // } 714 | // } 715 | // /* x renderable */ 716 | // ret = glXGetFBConfigAttrib(ctx->dpy, fbc[i], GLX_X_RENDERABLE, &value); 717 | // if (ret != Success) 718 | // { 719 | // fprintf(file, " ? "); 720 | // } 721 | // else 722 | // { 723 | // fprintf(file, value ? " y " : " n "); 724 | // } 725 | // /* class */ 726 | // ret = glXGetFBConfigAttrib(ctx->dpy, fbc[i], GLX_X_VISUAL_TYPE, &value); 727 | // if (ret != Success) 728 | // { 729 | // fprintf(file, " ? "); 730 | // } 731 | // else 732 | // { 733 | // if (GLX_TRUE_COLOR == value) 734 | // fprintf(file, "tc "); 735 | // else if (GLX_DIRECT_COLOR == value) 736 | // fprintf(file, "dc "); 737 | // else if (GLX_PSEUDO_COLOR == value) 738 | // fprintf(file, "pc "); 739 | // else if (GLX_STATIC_COLOR == value) 740 | // fprintf(file, "sc "); 741 | // else if (GLX_GRAY_SCALE == value) 742 | // fprintf(file, "gs "); 743 | // else if (GLX_STATIC_GRAY == value) 744 | // fprintf(file, "sg "); 745 | // else if (GLX_X_VISUAL_TYPE == value) 746 | // fprintf(file, " . "); 747 | // else 748 | // fprintf(file, " ? "); 749 | // } 750 | // /* format */ 751 | // ret = glXGetFBConfigAttrib(ctx->dpy, fbc[i], GLX_RENDER_TYPE, &value); 752 | // if (ret != Success) 753 | // { 754 | // fprintf(file, " ? "); 755 | // } 756 | // else 757 | // { 758 | // if (GLXEW_NV_float_buffer) 759 | // { 760 | // int ret2, value2; 761 | // ret2 = glXGetFBConfigAttrib(ctx->dpy, fbc[i], GLX_FLOAT_COMPONENTS_NV, &value2); 762 | // if (Success == ret2 && GL_TRUE == value2) 763 | // { 764 | // fprintf(file, " f "); 765 | // } 766 | // else if (value & GLX_RGBA_BIT) 767 | // fprintf(file, " i "); 768 | // else if (value & GLX_COLOR_INDEX_BIT) 769 | // fprintf(file, " c "); 770 | // else 771 | // fprintf(file, " ? "); 772 | // } 773 | // else 774 | // { 775 | // if (value & GLX_RGBA_FLOAT_ATI_BIT) 776 | // fprintf(file, " f "); 777 | // else if (value & GLX_RGBA_BIT) 778 | // fprintf(file, " i "); 779 | // else if (value & GLX_COLOR_INDEX_BIT) 780 | // fprintf(file, " c "); 781 | // else 782 | // fprintf(file, " ? "); 783 | // } 784 | // } 785 | // /* double buffer */ 786 | // ret = glXGetFBConfigAttrib(ctx->dpy, fbc[i], GLX_DOUBLEBUFFER, &value); 787 | // fprintf(file, " %c ", Success != ret ? '?' : (value ? 'y' : '.')); 788 | // /* stereo */ 789 | // ret = glXGetFBConfigAttrib(ctx->dpy, fbc[i], GLX_STEREO, &value); 790 | // fprintf(file, " %c ", Success != ret ? '?' : (value ? 'y' : '.')); 791 | // /* level */ 792 | // ret = glXGetFBConfigAttrib(ctx->dpy, fbc[i], GLX_LEVEL, &value); 793 | // if (Success != ret) 794 | // { 795 | // fprintf(file, " ? "); 796 | // } 797 | // else 798 | // { 799 | // fprintf(file, "%2d ", value); 800 | // } 801 | // /* transparency */ 802 | // ret = glXGetFBConfigAttrib(ctx->dpy, fbc[i], GLX_TRANSPARENT_TYPE, &value); 803 | // if (Success != ret) 804 | // { 805 | // fprintf(file, " ? | "); 806 | // } 807 | // else 808 | // { 809 | // if (GLX_TRANSPARENT_RGB == value) 810 | // fprintf(file, " r | "); 811 | // else if (GLX_TRANSPARENT_INDEX == value) 812 | // fprintf(file, " i | "); 813 | // else if (GLX_NONE == value) 814 | // fprintf(file, " . | "); 815 | // else 816 | // fprintf(file, " ? | "); 817 | // } 818 | // /* color size */ 819 | // ret = glXGetFBConfigAttrib(ctx->dpy, fbc[i], GLX_BUFFER_SIZE, &value); 820 | // if (Success != ret) 821 | // { 822 | // fprintf(file, " ? "); 823 | // } 824 | // else 825 | // { 826 | // if (value) 827 | // fprintf(file, "%3d ", value); 828 | // else 829 | // fprintf(file, " . "); 830 | // } 831 | // /* red size */ 832 | // ret = glXGetFBConfigAttrib(ctx->dpy, fbc[i], GLX_RED_SIZE, &value); 833 | // if (Success != ret) 834 | // { 835 | // fprintf(file, " ? "); 836 | // } 837 | // else 838 | // { 839 | // if (value) 840 | // fprintf(file, "%2d ", value); 841 | // else 842 | // fprintf(file, " . "); 843 | // } 844 | // /* green size */ 845 | // ret = glXGetFBConfigAttrib(ctx->dpy, fbc[i], GLX_GREEN_SIZE, &value); 846 | // if (Success != ret) 847 | // { 848 | // fprintf(file, " ? "); 849 | // } 850 | // else 851 | // { 852 | // if (value) 853 | // fprintf(file, "%2d ", value); 854 | // else 855 | // fprintf(file, " . "); 856 | // } 857 | // /* blue size */ 858 | // ret = glXGetFBConfigAttrib(ctx->dpy, fbc[i], GLX_BLUE_SIZE, &value); 859 | // if (Success != ret) 860 | // { 861 | // fprintf(file, " ? "); 862 | // } 863 | // else 864 | // { 865 | // if (value) 866 | // fprintf(file, "%2d ", value); 867 | // else 868 | // fprintf(file, " . "); 869 | // } 870 | // /* alpha size */ 871 | // ret = glXGetFBConfigAttrib(ctx->dpy, fbc[i], GLX_ALPHA_SIZE, &value); 872 | // if (Success != ret) 873 | // { 874 | // fprintf(file, " ? | "); 875 | // } 876 | // else 877 | // { 878 | // if (value) 879 | // fprintf(file, "%2d | ", value); 880 | // else 881 | // fprintf(file, " . | "); 882 | // } 883 | // /* aux buffers */ 884 | // ret = glXGetFBConfigAttrib(ctx->dpy, fbc[i], GLX_AUX_BUFFERS, &value); 885 | // if (Success != ret) 886 | // { 887 | // fprintf(file, " ? "); 888 | // } 889 | // else 890 | // { 891 | // if (value) 892 | // fprintf(file, "%2d ", value); 893 | // else 894 | // fprintf(file, " . "); 895 | // } 896 | // /* depth size */ 897 | // ret = glXGetFBConfigAttrib(ctx->dpy, fbc[i], GLX_DEPTH_SIZE, &value); 898 | // if (Success != ret) 899 | // { 900 | // fprintf(file, " ? "); 901 | // } 902 | // else 903 | // { 904 | // if (value) 905 | // fprintf(file, "%2d ", value); 906 | // else 907 | // fprintf(file, " . "); 908 | // } 909 | // /* stencil size */ 910 | // ret = glXGetFBConfigAttrib(ctx->dpy, fbc[i], GLX_STENCIL_SIZE, &value); 911 | // if (Success != ret) 912 | // { 913 | // fprintf(file, " ? | "); 914 | // } 915 | // else 916 | // { 917 | // if (value) 918 | // fprintf(file, "%2d | ", value); 919 | // else 920 | // fprintf(file, " . | "); 921 | // } 922 | // /* accum red size */ 923 | // ret = glXGetFBConfigAttrib(ctx->dpy, fbc[i], GLX_ACCUM_RED_SIZE, &value); 924 | // if (Success != ret) 925 | // { 926 | // fprintf(file, " ? "); 927 | // } 928 | // else 929 | // { 930 | // if (value) 931 | // fprintf(file, "%2d ", value); 932 | // else 933 | // fprintf(file, " . "); 934 | // } 935 | // /* accum green size */ 936 | // ret = glXGetFBConfigAttrib(ctx->dpy, fbc[i], GLX_ACCUM_GREEN_SIZE, &value); 937 | // if (Success != ret) 938 | // { 939 | // fprintf(file, " ? "); 940 | // } 941 | // else 942 | // { 943 | // if (value) 944 | // fprintf(file, "%2d ", value); 945 | // else 946 | // fprintf(file, " . "); 947 | // } 948 | // /* accum blue size */ 949 | // ret = glXGetFBConfigAttrib(ctx->dpy, fbc[i], GLX_ACCUM_BLUE_SIZE, &value); 950 | // if (Success != ret) 951 | // { 952 | // fprintf(file, " ? "); 953 | // } 954 | // else 955 | // { 956 | // if (value) 957 | // fprintf(file, "%2d ", value); 958 | // else 959 | // fprintf(file, " . "); 960 | // } 961 | // /* accum alpha size */ 962 | // ret = glXGetFBConfigAttrib(ctx->dpy, fbc[i], GLX_ACCUM_ALPHA_SIZE, &value); 963 | // if (Success != ret) 964 | // { 965 | // fprintf(file, " ? | "); 966 | // } 967 | // else 968 | // { 969 | // if (value) 970 | // fprintf(file, "%2d | ", value); 971 | // else 972 | // fprintf(file, " . | "); 973 | // } 974 | // /* multisample */ 975 | // ret = glXGetFBConfigAttrib(ctx->dpy, fbc[i], GLX_SAMPLES, &value); 976 | // if (Success != ret) 977 | // { 978 | // fprintf(file, " ? "); 979 | // } 980 | // else 981 | // { 982 | // fprintf(file, "%2d ", value); 983 | // } 984 | // ret = glXGetFBConfigAttrib(ctx->dpy, fbc[i], GLX_SAMPLE_BUFFERS, &value); 985 | // if (Success != ret) 986 | // { 987 | // fprintf(file, " ? | "); 988 | // } 989 | // else 990 | // { 991 | // fprintf(file, "%2d | ", value); 992 | // } 993 | // /* caveat */ 994 | // ret = glXGetFBConfigAttrib(ctx->dpy, fbc[i], GLX_CONFIG_CAVEAT, &value); 995 | // if (Success != ret) 996 | // { 997 | // fprintf(file, "???? |"); 998 | // } 999 | // else 1000 | // { 1001 | // if (GLX_NONE == value) 1002 | // fprintf(file, "none |\n"); 1003 | // else if (GLX_SLOW_CONFIG == value) 1004 | // fprintf(file, "slow |\n"); 1005 | // else if (GLX_NON_CONFORMANT_CONFIG == value) 1006 | // fprintf(file, "ncft |\n"); 1007 | // else 1008 | // fprintf(file, "???? |\n"); 1009 | // } 1010 | // } 1011 | // /* print table footer */ 1012 | // fprintf(file, " +-----+-------------------------+-----------------+----------+-------------+-------+------+\n"); 1013 | // fprintf(file, " | id | tp xr cl fm db st lv xp | sz r g b a | bf th cl | r g b a | ns b | eat |\n"); 1014 | // fprintf(file, " | | visual | color | ax dp st | accum | ms | cav |\n"); 1015 | // fprintf(file, " +-----+-------------------------+-----------------+----------+-------------+-------+------+\n"); 1016 | // } 1017 | // } 1018 | //} 1019 | // 1020 | //#endif 1021 | // 1022 | ///* ------------------------------------------------------------------------ */ 1023 | // 1024 | //#if defined(GLEW_OSMESA) 1025 | //void InitContext (GLContext* ctx) 1026 | //{ 1027 | // ctx->ctx = NULL; 1028 | //} 1029 | // 1030 | //static const GLint osmFormat = GL_UNSIGNED_BYTE; 1031 | //static const GLint osmWidth = 640; 1032 | //static const GLint osmHeight = 480; 1033 | //static GLubyte *osmPixels = NULL; 1034 | // 1035 | //GLboolean CreateContext (GLContext* ctx) 1036 | //{ 1037 | // if (NULL == ctx) return GL_TRUE; 1038 | // ctx->ctx = OSMesaCreateContext(OSMESA_RGBA, NULL); 1039 | // if (NULL == ctx->ctx) return GL_TRUE; 1040 | // if (NULL == osmPixels) 1041 | // { 1042 | // osmPixels = (GLubyte *) calloc(osmWidth*osmHeight*4, 1); 1043 | // } 1044 | // if (!OSMesaMakeCurrent(ctx->ctx, osmPixels, GL_UNSIGNED_BYTE, osmWidth, osmHeight)) 1045 | // { 1046 | // return GL_TRUE; 1047 | // } 1048 | // return GL_FALSE; 1049 | //} 1050 | // 1051 | //void DestroyContext (GLContext* ctx) 1052 | //{ 1053 | // if (NULL == ctx) return; 1054 | // if (NULL != ctx->ctx) OSMesaDestroyContext(ctx->ctx); 1055 | //} 1056 | ///* ------------------------------------------------------------------------ */ 1057 | // 1058 | //#elif defined(GLEW_EGL) 1059 | //void InitContext (GLContext* ctx) 1060 | //{ 1061 | // ctx->ctx = NULL; 1062 | //} 1063 | // 1064 | //GLboolean CreateContext (GLContext* ctx) 1065 | //{ 1066 | // return GL_FALSE; 1067 | //} 1068 | // 1069 | //void DestroyContext (GLContext* ctx) 1070 | //{ 1071 | // if (NULL == ctx) return; 1072 | // return; 1073 | //} 1074 | // 1075 | ///* ------------------------------------------------------------------------ */ 1076 | // 1077 | //#elif defined(_WIN32) 1078 | // 1079 | //void InitContext (GLContext* ctx) 1080 | //{ 1081 | // ctx->wnd = NULL; 1082 | // ctx->dc = NULL; 1083 | // ctx->rc = NULL; 1084 | //} 1085 | // 1086 | //GLboolean CreateContext (GLContext* ctx) 1087 | //{ 1088 | // WNDCLASS wc; 1089 | // PIXELFORMATDESCRIPTOR pfd; 1090 | // /* check for input */ 1091 | // if (NULL == ctx) return GL_TRUE; 1092 | // /* register window class */ 1093 | // ZeroMemory(&wc, sizeof(WNDCLASS)); 1094 | // wc.hInstance = GetModuleHandle(NULL); 1095 | // wc.lpfnWndProc = DefWindowProc; 1096 | // wc.lpszClassName = "GLEW"; 1097 | // if (0 == RegisterClass(&wc)) return GL_TRUE; 1098 | // /* create window */ 1099 | // ctx->wnd = CreateWindow("GLEW", "GLEW", 0, CW_USEDEFAULT, CW_USEDEFAULT, 1100 | // CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, 1101 | // GetModuleHandle(NULL), NULL); 1102 | // if (NULL == ctx->wnd) return GL_TRUE; 1103 | // /* get the device context */ 1104 | // ctx->dc = GetDC(ctx->wnd); 1105 | // if (NULL == ctx->dc) return GL_TRUE; 1106 | // /* find pixel format */ 1107 | // ZeroMemory(&pfd, sizeof(PIXELFORMATDESCRIPTOR)); 1108 | // if (visual == -1) /* find default */ 1109 | // { 1110 | // pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR); 1111 | // pfd.nVersion = 1; 1112 | // pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL; 1113 | // visual = ChoosePixelFormat(ctx->dc, &pfd); 1114 | // if (0 == visual) return GL_TRUE; 1115 | // } 1116 | // /* set the pixel format for the dc */ 1117 | // if (FALSE == SetPixelFormat(ctx->dc, visual, &pfd)) return GL_TRUE; 1118 | // /* create rendering context */ 1119 | // ctx->rc = wglCreateContext(ctx->dc); 1120 | // if (NULL == ctx->rc) return GL_TRUE; 1121 | // if (FALSE == wglMakeCurrent(ctx->dc, ctx->rc)) return GL_TRUE; 1122 | // return GL_FALSE; 1123 | //} 1124 | // 1125 | //void DestroyContext (GLContext* ctx) 1126 | //{ 1127 | // if (NULL == ctx) return; 1128 | // if (NULL != ctx->rc) wglMakeCurrent(NULL, NULL); 1129 | // if (NULL != ctx->rc) wglDeleteContext(wglGetCurrentContext()); 1130 | // if (NULL != ctx->wnd && NULL != ctx->dc) ReleaseDC(ctx->wnd, ctx->dc); 1131 | // if (NULL != ctx->wnd) DestroyWindow(ctx->wnd); 1132 | // UnregisterClass("GLEW", GetModuleHandle(NULL)); 1133 | //} 1134 | // 1135 | ///* ------------------------------------------------------------------------ */ 1136 | // 1137 | //#elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX) 1138 | // 1139 | //void InitContext (GLContext* ctx) 1140 | //{ 1141 | // ctx->ctx = NULL; 1142 | // ctx->octx = NULL; 1143 | //} 1144 | // 1145 | //GLboolean CreateContext (GLContext* ctx) 1146 | //{ 1147 | // CGLPixelFormatAttribute attrib[] = { kCGLPFAAccelerated, 0 }; 1148 | // CGLPixelFormatObj pf; 1149 | // GLint npix; 1150 | // CGLError error; 1151 | // /* check input */ 1152 | // if (NULL == ctx) return GL_TRUE; 1153 | // error = CGLChoosePixelFormat(attrib, &pf, &npix); 1154 | // if (error) return GL_TRUE; 1155 | // error = CGLCreateContext(pf, NULL, &ctx->ctx); 1156 | // if (error) return GL_TRUE; 1157 | // CGLReleasePixelFormat(pf); 1158 | // ctx->octx = CGLGetCurrentContext(); 1159 | // error = CGLSetCurrentContext(ctx->ctx); 1160 | // if (error) return GL_TRUE; 1161 | // return GL_FALSE; 1162 | //} 1163 | // 1164 | //void DestroyContext (GLContext* ctx) 1165 | //{ 1166 | // if (NULL == ctx) return; 1167 | // CGLSetCurrentContext(ctx->octx); 1168 | // if (NULL != ctx->ctx) CGLReleaseContext(ctx->ctx); 1169 | //} 1170 | // 1171 | ///* ------------------------------------------------------------------------ */ 1172 | // 1173 | //#elif defined(__HAIKU__) 1174 | // 1175 | //void 1176 | //InitContext (GLContext* ctx) 1177 | //{ 1178 | // /* TODO */ 1179 | //} 1180 | // 1181 | //GLboolean 1182 | //CreateContext (GLContext* ctx) 1183 | //{ 1184 | // /* TODO */ 1185 | // return GL_FALSE; 1186 | //} 1187 | // 1188 | //void 1189 | //DestroyContext (GLContext* ctx) 1190 | //{ 1191 | // /* TODO */ 1192 | //} 1193 | // 1194 | ///* ------------------------------------------------------------------------ */ 1195 | // 1196 | //#else /* __UNIX || (__APPLE__ && GLEW_APPLE_GLX) */ 1197 | // 1198 | //void InitContext (GLContext* ctx) 1199 | //{ 1200 | // ctx->dpy = NULL; 1201 | // ctx->vi = NULL; 1202 | // ctx->ctx = NULL; 1203 | // ctx->wnd = 0; 1204 | // ctx->cmap = 0; 1205 | //} 1206 | // 1207 | //GLboolean CreateContext (GLContext* ctx) 1208 | //{ 1209 | // int attrib[] = { GLX_RGBA, GLX_DOUBLEBUFFER, None }; 1210 | // int erb, evb; 1211 | // XSetWindowAttributes swa; 1212 | // /* check input */ 1213 | // if (NULL == ctx) return GL_TRUE; 1214 | // /* open display */ 1215 | // ctx->dpy = XOpenDisplay(display); 1216 | // if (NULL == ctx->dpy) return GL_TRUE; 1217 | // /* query for glx */ 1218 | // if (!glXQueryExtension(ctx->dpy, &erb, &evb)) return GL_TRUE; 1219 | // /* choose visual */ 1220 | // ctx->vi = glXChooseVisual(ctx->dpy, DefaultScreen(ctx->dpy), attrib); 1221 | // if (NULL == ctx->vi) return GL_TRUE; 1222 | // /* create context */ 1223 | // ctx->ctx = glXCreateContext(ctx->dpy, ctx->vi, None, True); 1224 | // if (NULL == ctx->ctx) return GL_TRUE; 1225 | // /* create window */ 1226 | // /*wnd = XCreateSimpleWindow(dpy, RootWindow(dpy, vi->screen), 0, 0, 1, 1, 1, 0, 0);*/ 1227 | // ctx->cmap = XCreateColormap(ctx->dpy, RootWindow(ctx->dpy, ctx->vi->screen), 1228 | // ctx->vi->visual, AllocNone); 1229 | // swa.border_pixel = 0; 1230 | // swa.colormap = ctx->cmap; 1231 | // ctx->wnd = XCreateWindow(ctx->dpy, RootWindow(ctx->dpy, ctx->vi->screen), 1232 | // 0, 0, 1, 1, 0, ctx->vi->depth, InputOutput, ctx->vi->visual, 1233 | // CWBorderPixel | CWColormap, &swa); 1234 | // /* make context current */ 1235 | // if (!glXMakeCurrent(ctx->dpy, ctx->wnd, ctx->ctx)) return GL_TRUE; 1236 | // return GL_FALSE; 1237 | //} 1238 | // 1239 | //void DestroyContext (GLContext* ctx) 1240 | //{ 1241 | // if (NULL != ctx->dpy && NULL != ctx->ctx) glXDestroyContext(ctx->dpy, ctx->ctx); 1242 | // if (NULL != ctx->dpy && 0 != ctx->wnd) XDestroyWindow(ctx->dpy, ctx->wnd); 1243 | // if (NULL != ctx->dpy && 0 != ctx->cmap) XFreeColormap(ctx->dpy, ctx->cmap); 1244 | // if (NULL != ctx->vi) XFree(ctx->vi); 1245 | // if (NULL != ctx->dpy) XCloseDisplay(ctx->dpy); 1246 | //} 1247 | // 1248 | //#endif /* __UNIX || (__APPLE__ && GLEW_APPLE_GLX) */ 1249 | // 1250 | //GLboolean ParseArgs (int argc, char** argv) 1251 | //{ 1252 | // int p = 0; 1253 | // while (p < argc) 1254 | // { 1255 | //#if defined(_WIN32) 1256 | // if (!strcmp(argv[p], "-pf") || !strcmp(argv[p], "-pixelformat")) 1257 | // { 1258 | // if (++p >= argc) return GL_TRUE; 1259 | // display = NULL; 1260 | // visual = strtol(argv[p], NULL, 0); 1261 | // } 1262 | // else if (!strcmp(argv[p], "-a")) 1263 | // { 1264 | // showall = 1; 1265 | // } 1266 | // else if (!strcmp(argv[p], "-s")) 1267 | // { 1268 | // displaystdout = 1; 1269 | // } 1270 | // else if (!strcmp(argv[p], "-h")) 1271 | // { 1272 | // return GL_TRUE; 1273 | // } 1274 | // else 1275 | // return GL_TRUE; 1276 | //#else 1277 | // if (!strcmp(argv[p], "-display")) 1278 | // { 1279 | // if (++p >= argc) return GL_TRUE; 1280 | // display = argv[p]; 1281 | // } 1282 | // else if (!strcmp(argv[p], "-visual")) 1283 | // { 1284 | // if (++p >= argc) return GL_TRUE; 1285 | // visual = (int)strtol(argv[p], NULL, 0); 1286 | // } 1287 | // else if (!strcmp(argv[p], "-h")) 1288 | // { 1289 | // return GL_TRUE; 1290 | // } 1291 | // else 1292 | // return GL_TRUE; 1293 | //#endif 1294 | // p++; 1295 | // } 1296 | // return GL_FALSE; 1297 | //} 1298 | -------------------------------------------------------------------------------- /screenshots/result.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sho3la/ShaderPlusPlus/c6a92d444d44cc6a7d380eaad8e215f3e26a397b/screenshots/result.gif -------------------------------------------------------------------------------- /shader++/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.9) 2 | 3 | project(Shader++) 4 | 5 | set(CMAKE_CXX_STANDARD 17) 6 | 7 | set(CMAKE_AUTOMOC On) 8 | set(CMAKE_AUTORCC ON) 9 | 10 | find_package(Qt5Core CONFIG REQUIRED) 11 | find_package(Qt5Widgets CONFIG REQUIRED) 12 | find_package(Qt5Gui CONFIG REQUIRED) 13 | 14 | # list the header files 15 | set(HEADER_FILES 16 | include/MainWindow.h 17 | include/Openglwidget.h 18 | include/FindWidget.h 19 | include/SyntaxStyle.h 20 | include/StyleSyntaxHighlighter.h 21 | include/Language.h 22 | include/HighlightRule.h 23 | include/HighlightBlockRule.h 24 | include/GLSLHighlighter.h 25 | include/GLSLCompleter.h 26 | include/LineNumberArea.h 27 | include/CodeEditor.h 28 | ) 29 | 30 | # list the source files 31 | set(SOURCE_FILES 32 | src/main.cpp 33 | src/MainWindow.cpp 34 | src/Openglwidget.cpp 35 | src/FindWidget.cpp 36 | src/SyntaxStyle.cpp 37 | src/StyleSyntaxHighlighter.cpp 38 | src/Language.cpp 39 | src/GLSLHighlighter.cpp 40 | src/GLSLCompleter.cpp 41 | src/LineNumberArea.cpp 42 | src/CodeEditor.cpp 43 | ) 44 | 45 | set(RESOURCES_FILE 46 | resources/shaderPlusPlus_resources.qrc 47 | ) 48 | 49 | add_executable(Shader++ 50 | ${HEADER_FILES} 51 | ${SOURCE_FILES} 52 | ${RESOURCES_FILE} 53 | ) 54 | 55 | target_link_libraries(Shader++ 56 | Qt5::Core 57 | Qt5::Widgets 58 | Qt5::Gui 59 | opengl32 60 | glew 61 | ) 62 | 63 | # list include directories 64 | target_include_directories(Shader++ 65 | PUBLIC 66 | ${CMAKE_CURRENT_SOURCE_DIR}/include 67 | ${CMAKE_SOURCE_DIR}/glew/include/GL 68 | ) -------------------------------------------------------------------------------- /shader++/include/CodeEditor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | class QCompleter; 5 | class LineNumberArea; 6 | class SyntaxStyle; 7 | class StyleSyntaxHighlighter; 8 | class FindWidget; 9 | 10 | class CodeEditor : public QTextEdit 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | CodeEditor(QWidget* widget = nullptr); 16 | 17 | ~CodeEditor(); 18 | 19 | int getFirstVisibleBlock(); 20 | 21 | void setHighlighter(StyleSyntaxHighlighter* highlighter); 22 | 23 | void setSyntaxStyle(SyntaxStyle* style); 24 | 25 | void setAutoParentheses(bool enabled); 26 | 27 | bool autoParentheses() const; 28 | 29 | void setTabReplace(bool enabled); 30 | 31 | bool tabReplace() const; 32 | 33 | void setTabReplaceSize(int val); 34 | 35 | int tabReplaceSize() const; 36 | 37 | void setAutoIndentation(bool enabled); 38 | 39 | bool autoIndentation() const; 40 | 41 | void setCompleter(QCompleter* completer); 42 | 43 | QCompleter* completer() const; 44 | 45 | void moveCursorToNextWord(); 46 | 47 | public Q_SLOTS: 48 | 49 | void insertCompletion(QString s); 50 | 51 | void updateLineNumberAreaWidth(int); 52 | 53 | void updateLineNumberArea(const QRect& rect); 54 | 55 | void updateExtraSelection(); 56 | 57 | void updateStyle(); 58 | 59 | void onSelectionChanged(); 60 | 61 | void onFontZoomIn(); 62 | 63 | void onFontZoomOut(); 64 | 65 | void onShowFinder(); 66 | 67 | protected: 68 | void insertFromMimeData(const QMimeData* source) override; 69 | 70 | void paintEvent(QPaintEvent* e) override; 71 | 72 | void resizeEvent(QResizeEvent* e) override; 73 | 74 | void keyPressEvent(QKeyEvent* e) override; 75 | 76 | void focusInEvent(QFocusEvent *e) override; 77 | 78 | private: 79 | 80 | void initDocumentLayout(); 81 | 82 | void initFont(); 83 | 84 | void performConnections(); 85 | 86 | void handleSelectionQuery(QTextCursor cursor); 87 | 88 | void updateLineGeometry(); 89 | 90 | bool proceedCompleterBegin(QKeyEvent *e); 91 | 92 | void proceedCompleterEnd(QKeyEvent* e); 93 | 94 | QChar charUnderCursor(int offset = 0) const; 95 | 96 | QString wordUnderCursor() const; 97 | 98 | void highlightCurrentLine(QList& extraSelection); 99 | 100 | void highlightParenthesis(QList& extraSelection); 101 | 102 | bool highlightFunctionBlock(QList& extraSelection); 103 | 104 | int getIndentationSpaces(); 105 | 106 | StyleSyntaxHighlighter* m_highlighter; 107 | SyntaxStyle* m_syntaxStyle; 108 | LineNumberArea* m_lineNumberArea; 109 | QCompleter* m_completer; 110 | FindWidget* m_finder; 111 | 112 | bool m_autoIndentation; 113 | bool m_autoParentheses; 114 | bool m_replaceTab; 115 | QString m_tabReplace; 116 | 117 | // shortcuts 118 | QShortcut *fontZoomIN; 119 | QShortcut *fontZoomOUT; 120 | QShortcut *findWord; 121 | }; 122 | -------------------------------------------------------------------------------- /shader++/include/FindWidget.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | class QCheckBox; 5 | class QDialogButtonBox; 6 | class QGroupBox; 7 | class QLabel; 8 | class QLineEdit; 9 | class QPushButton; 10 | class CodeEditor; 11 | 12 | class FindWidget : public QDialog 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | FindWidget(QWidget * parent = nullptr); 18 | 19 | ~FindWidget(); 20 | 21 | QString getKeyWord(); 22 | void setKeyWord(QString word); 23 | void setCodeEditor(CodeEditor* ptr); 24 | 25 | public Q_SLOTS: 26 | void find(); 27 | 28 | private: 29 | 30 | void performConnections(); 31 | 32 | QLabel *label; 33 | QLineEdit *lineEdit; 34 | QDialogButtonBox *buttonBox; 35 | QPushButton *findButton; 36 | CodeEditor* codeeditor; 37 | }; -------------------------------------------------------------------------------- /shader++/include/GLSLCompleter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | class GLSLCompleter : public QCompleter 5 | { 6 | Q_OBJECT 7 | 8 | public: 9 | GLSLCompleter(QObject* parent = nullptr); 10 | 11 | ~GLSLCompleter(); 12 | }; -------------------------------------------------------------------------------- /shader++/include/GLSLHighlighter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #include 6 | #include 7 | 8 | 9 | class GLSLHighlighter : public StyleSyntaxHighlighter 10 | { 11 | Q_OBJECT 12 | 13 | public: 14 | GLSLHighlighter(QTextDocument* document = nullptr); 15 | 16 | ~GLSLHighlighter() {} 17 | 18 | protected: 19 | void highlightBlock(const QString& text) override; 20 | 21 | private: 22 | 23 | QVector m_highlightRules; 24 | 25 | QRegularExpression m_includePattern; 26 | QRegularExpression m_functionPattern; 27 | QRegularExpression m_defTypePattern; 28 | 29 | QRegularExpression m_commentStartPattern; 30 | QRegularExpression m_commentEndPattern; 31 | }; -------------------------------------------------------------------------------- /shader++/include/HighlightBlockRule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | struct HighlightBlockRule 6 | { 7 | HighlightBlockRule() : startPattern(),endPattern(),formatName(){} 8 | 9 | HighlightBlockRule(QRegularExpression start, QRegularExpression end, QString format) : 10 | startPattern(std::move(start)),endPattern(std::move(end)),formatName(std::move(format)) {} 11 | 12 | QRegularExpression startPattern; 13 | QRegularExpression endPattern; 14 | QString formatName; 15 | }; -------------------------------------------------------------------------------- /shader++/include/HighlightRule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | struct HighlightRule 6 | { 7 | HighlightRule() : pattern(), formatName() {} 8 | 9 | HighlightRule(QRegularExpression p, QString f) 10 | : pattern(std::move(p)), formatName(std::move(f)) {} 11 | 12 | QRegularExpression pattern; 13 | QString formatName; 14 | }; -------------------------------------------------------------------------------- /shader++/include/Language.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | 6 | class QIODevice; 7 | 8 | // this class for parsing language file 9 | class Language : public QObject 10 | { 11 | public: 12 | Language(QIODevice* device = nullptr, QObject* parent = nullptr); 13 | 14 | ~Language(); 15 | 16 | bool load(QIODevice* device); 17 | 18 | QStringList keys(); 19 | 20 | QStringList names(const QString& key); 21 | 22 | bool isLoaded() const; 23 | 24 | private: 25 | 26 | bool m_loaded; 27 | QMap m_list; 28 | }; -------------------------------------------------------------------------------- /shader++/include/LineNumberArea.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | class CodeEditor; 5 | class SyntaxStyle; 6 | 7 | class LineNumberArea : public QWidget 8 | { 9 | Q_OBJECT 10 | 11 | public: 12 | LineNumberArea(CodeEditor* parent = nullptr); 13 | 14 | ~LineNumberArea(); 15 | 16 | QSize sizeHint() const override; 17 | 18 | void setSyntaxStyle(SyntaxStyle* style); 19 | 20 | SyntaxStyle* syntaxStyle() const; 21 | 22 | protected: 23 | void paintEvent(QPaintEvent* event) override; 24 | 25 | private: 26 | 27 | SyntaxStyle* m_syntaxStyle; 28 | 29 | CodeEditor* m_codeEditParent; 30 | }; -------------------------------------------------------------------------------- /shader++/include/MainWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | class QVBoxLayout; 8 | class QComboBox; 9 | class QCheckBox; 10 | class QSpinBox; 11 | class QCompleter; 12 | class QDockWidget; 13 | class QListWidget; 14 | 15 | class SyntaxStyle; 16 | class StyleSyntaxHighlighter; 17 | class CodeEditor; 18 | class Openglwidget; 19 | class TexturesList; 20 | 21 | class MainWindow : public QMainWindow 22 | { 23 | Q_OBJECT 24 | 25 | public: 26 | MainWindow(QWidget* parent = nullptr); 27 | 28 | ~MainWindow(); 29 | 30 | private: 31 | 32 | void loadStyle(QString path); 33 | 34 | QString loadCode(QString path); 35 | 36 | void initData(); 37 | 38 | void initMenuBar(); 39 | 40 | void initToolBar(); 41 | 42 | void init_statusBar(); 43 | 44 | void createWidgets(); 45 | 46 | void createDockWidgets(); 47 | 48 | void setupWidgets(); 49 | 50 | void textchanged(); 51 | 52 | void render_window_floating(bool topLevel); 53 | 54 | void selected_example_changed(int index); 55 | 56 | void performConnections(); 57 | 58 | void setCurrentFile(QString filename); 59 | 60 | bool maybesave(); 61 | 62 | void saveFile(); 63 | 64 | void saveAsFile(); 65 | 66 | void openFile(); 67 | 68 | void newFile(); 69 | 70 | QVBoxLayout* m_setupLayout; 71 | 72 | QDockWidget *m_dockedRenderWindow; 73 | QDockWidget *m_dockedErrorWindow; 74 | TexturesList* m_dockedTexListWindow; 75 | 76 | CodeEditor* m_codeEditor; 77 | Openglwidget* m_renderArea; 78 | 79 | 80 | QVector> m_codeSamples; 81 | QVector> m_completers; 82 | QVector> m_highlighters; 83 | QVector> m_styles; 84 | 85 | QMenu* fileMenu; 86 | QMenu* helpMenu; 87 | 88 | QAction* newAct; 89 | QAction* openAct; 90 | QAction* saveAct; 91 | QAction* exitaction; 92 | QAction* aboutAct; 93 | 94 | QToolBar* toolbar; 95 | QComboBox* m_examplesList; 96 | QListWidget* m_errorsList; 97 | 98 | QString m_filename; 99 | }; -------------------------------------------------------------------------------- /shader++/include/Openglwidget.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | 6 | class Openglwidget : public QOpenGLWidget 7 | { 8 | public: 9 | Openglwidget(QWidget *parent = nullptr); 10 | 11 | ~Openglwidget(); 12 | 13 | QList compile_shader(); 14 | const char* ps_shader; 15 | 16 | protected: 17 | void initializeGL() override; 18 | void paintGL() override; 19 | void resizeGL(int width, int height) override; 20 | 21 | //mouse events 22 | void mousePressEvent(QMouseEvent *event) override; 23 | void mouseReleaseEvent(QMouseEvent *event) override; 24 | void mouseMoveEvent(QMouseEvent *event) override; 25 | void wheelEvent(QWheelEvent *event); 26 | 27 | //keyboard events 28 | void keyPressEvent(QKeyEvent *event) override; 29 | void keyReleaseEvent(QKeyEvent *event) override; 30 | 31 | private: 32 | const char* vs_shader; 33 | int shaderProgram; 34 | unsigned int VBO, VAO, EBO; 35 | 36 | 37 | // timing 38 | float deltaTime = 0.0f; 39 | float lastFrame = 0.0f; 40 | QElapsedTimer timer; 41 | 42 | // mouse 43 | int pos_x; 44 | int pos_y; 45 | }; -------------------------------------------------------------------------------- /shader++/include/StyleSyntaxHighlighter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | class SyntaxStyle; 5 | 6 | class StyleSyntaxHighlighter : public QSyntaxHighlighter 7 | { 8 | public: 9 | StyleSyntaxHighlighter(QTextDocument* document = nullptr); 10 | 11 | ~StyleSyntaxHighlighter(); 12 | 13 | void setSyntaxStyle(SyntaxStyle* style); 14 | 15 | SyntaxStyle* syntaxStyle() const; 16 | 17 | private: 18 | SyntaxStyle* m_syntaxStyle; 19 | }; -------------------------------------------------------------------------------- /shader++/include/SyntaxStyle.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include // provides formatting information for characters in a QTextDocument 6 | 7 | // this class describe Qt style parser for Editor 8 | class SyntaxStyle : public QObject 9 | { 10 | public: 11 | SyntaxStyle(QObject* parent = nullptr); 12 | 13 | ~SyntaxStyle(); 14 | 15 | bool load(QString fl); 16 | 17 | QString name() const; 18 | 19 | bool isLoaded() const; 20 | 21 | QTextCharFormat getFormat(QString name) const; 22 | 23 | static SyntaxStyle* defaultStyle(); 24 | 25 | private: 26 | 27 | bool m_loaded; 28 | QString m_name; 29 | QMap m_data; 30 | }; -------------------------------------------------------------------------------- /shader++/resources/code_samples/shader_00.glsl: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | out vec4 FragColor; 3 | 4 | void main() 5 | { 6 | FragColor = vec4(1,0.5,0.1,1.0); 7 | } -------------------------------------------------------------------------------- /shader++/resources/code_samples/shader_01.glsl: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | out vec4 FragColor; 3 | 4 | uniform vec2 Resolution; 5 | #define iResolution Resolution 6 | 7 | void main() 8 | { 9 | vec2 st = gl_FragCoord.xy/iResolution; 10 | FragColor = vec4(st.x,st.y,0.0,1.0); 11 | } -------------------------------------------------------------------------------- /shader++/resources/code_samples/shader_02.glsl: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | out vec4 FragColor; 3 | 4 | uniform float time; 5 | #define iTime time 6 | 7 | void main() 8 | { 9 | FragColor = vec4(sin(time),cos(time),0.1,1.0); 10 | } -------------------------------------------------------------------------------- /shader++/resources/code_samples/shader_03.glsl: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | out vec4 FragColor; 3 | 4 | uniform vec2 Mouse; 5 | #define iMouse Mouse 6 | 7 | void main() 8 | { 9 | vec2 st = gl_FragCoord.xy/iMouse; 10 | FragColor = vec4(st.x,st.y,Mouse.x,1.0); 11 | } -------------------------------------------------------------------------------- /shader++/resources/code_samples/shader_04.glsl: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | out vec4 FragColor; 3 | 4 | uniform vec2 Resolution; 5 | #define iResolution Resolution 6 | 7 | float checker(vec2 uv, float repeats) 8 | { 9 | float cx = floor(repeats * uv.x); 10 | float cy = floor(repeats * uv.y); 11 | float result = mod(cx + cy, 2.0); 12 | return sign(result); 13 | } 14 | 15 | void main() 16 | { 17 | vec2 st = gl_FragCoord.xy/iResolution; 18 | st.x *= iResolution.x / iResolution.y; 19 | float c = mix(0.8, 1.0, checker(st, 18.0)); 20 | 21 | FragColor = vec4(c,c,c,1.0); 22 | } -------------------------------------------------------------------------------- /shader++/resources/icons/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sho3la/ShaderPlusPlus/c6a92d444d44cc6a7d380eaad8e215f3e26a397b/shader++/resources/icons/about.png -------------------------------------------------------------------------------- /shader++/resources/icons/exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sho3la/ShaderPlusPlus/c6a92d444d44cc6a7d380eaad8e215f3e26a397b/shader++/resources/icons/exit.png -------------------------------------------------------------------------------- /shader++/resources/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sho3la/ShaderPlusPlus/c6a92d444d44cc6a7d380eaad8e215f3e26a397b/shader++/resources/icons/icon.png -------------------------------------------------------------------------------- /shader++/resources/icons/new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sho3la/ShaderPlusPlus/c6a92d444d44cc6a7d380eaad8e215f3e26a397b/shader++/resources/icons/new.png -------------------------------------------------------------------------------- /shader++/resources/icons/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sho3la/ShaderPlusPlus/c6a92d444d44cc6a7d380eaad8e215f3e26a397b/shader++/resources/icons/open.png -------------------------------------------------------------------------------- /shader++/resources/icons/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sho3la/ShaderPlusPlus/c6a92d444d44cc6a7d380eaad8e215f3e26a397b/shader++/resources/icons/save.png -------------------------------------------------------------------------------- /shader++/resources/languages/glsl.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | attribute 5 | const 6 | uniform 7 | varying 8 | buffer 9 | shared 10 | coherent 11 | volatile 12 | restrict 13 | readonly 14 | writeonly 15 | layout 16 | centroid 17 | flat 18 | smooth 19 | noperspective 20 | patch 21 | sample 22 | break 23 | continue 24 | do 25 | for 26 | while 27 | switch 28 | case 29 | default 30 | if 31 | else 32 | subroutine 33 | in 34 | out 35 | inout 36 | invariant 37 | precise 38 | discard 39 | return 40 | lowp 41 | mediump 42 | highp 43 | precision 44 | struct 45 |
46 |
47 | radians 48 | degrees 49 | sin 50 | cos 51 | tan 52 | asin 53 | acos 54 | atan 55 | sinh 56 | cosh 57 | tanh 58 | asinh 59 | acosh 60 | atanh 61 | pow 62 | exp 63 | log 64 | exp2 65 | log2 66 | sqrt 67 | inversesqrt 68 | abs 69 | sign 70 | floor 71 | trunc 72 | round 73 | roundEven 74 | ceil 75 | fract 76 | mod 77 | modf 78 | min 79 | max 80 | clamp 81 | mix 82 | step 83 | smoothstep 84 | isnan 85 | isinf 86 | floatBitsToInt 87 | floatBitsToUint 88 | intBitsToFloat 89 | uintBitsToFloat 90 | fma 91 | frexp 92 | ldexp 93 | packUnorm2x16 94 | packSnorm2x16 95 | packUnorm4x8 96 | packSnorm4x8 97 | unpackUnorm2x16 98 | unpackSnorm2x16 99 | unpackUnorm4x8 100 | unpackSnorm4x8 101 | packDouble2x32 102 | unpackDouble2x32 103 | packHalf2x16 104 | unpackHalf2x16 105 | length 106 | distance 107 | dot 108 | cross 109 | normalize 110 | ftransform 111 | faceforward 112 | reflect 113 | refract 114 | matrixCompMult 115 | outerProduct 116 | transpose 117 | determinant 118 | inverse 119 | lessThan 120 | lessThanEqual 121 | greaterThan 122 | greaterThanEqual 123 | equal 124 | notEqual 125 | any 126 | all 127 | not 128 | uaddCarry 129 | usubBorrow 130 | umulExtended 131 | imulExtended 132 | bitfieldExtract 133 | bitfieldInsert 134 | bitfieldReverse 135 | bitCount 136 | findLSB 137 | findMSB 138 | textureSize 139 | textureQueryLod 140 | textureQueryLevels 141 | textureSamples 142 | texture 143 | textureProj 144 | textureLod 145 | textureOffset 146 | texelFetch 147 | texelFetchOffset 148 | textureProjOffset 149 | textureLodOffset 150 | textureProjLod 151 | textureProjLodOffset 152 | textureGrad 153 | textureGradOffset 154 | textureProjGrad 155 | textureProjGradOffset 156 | textureGather 157 | textureGatherOffset 158 | textureGatherOffsets 159 | texture1D 160 | texture1DProj 161 | texture1DLod 162 | texture1DProjLod 163 | texture2D 164 | texture2DProj 165 | texture2DLod 166 | texture2DProjLod 167 | texture3D 168 | texture3DProj 169 | texture3DLod 170 | texture3DProjLod 171 | textureCube 172 | textureCubeLod 173 | shadow1D 174 | shadow2D 175 | shadow1DProj 176 | shadow2DProj 177 | shadow1DLod 178 | shadow2DLod 179 | shadow1DProjLod 180 | shadow2DProjLod 181 | atomicCounterIncrement 182 | atomicCounterDecrement 183 | atomicCounter 184 | atomicAdd 185 | atomicMin 186 | atomicMax 187 | atomicAnd 188 | atomicOr 189 | atomicXor 190 | atomicExchange 191 | atomicCompSwap 192 | imageSize 193 | imageSamples 194 | imageLoad 195 | imageStore 196 | imageAtomicAdd 197 | imageAtomicMin 198 | imageAtomicMax 199 | imageAtomicAnd 200 | imageAtomicOr 201 | imageAtomicXor 202 | imageAtomicExchange 203 | imageAtomicCompSwap 204 | dFdx 205 | dFdy 206 | dFdxFine 207 | dFdyFine 208 | dFdxCoarse 209 | dFdyCoarse 210 | fwidth 211 | fwidthFine 212 | fwidthCoarse 213 | interpolateAtCentroid 214 | interpolateAtSample 215 | interpolateAtOffset 216 | noise1 217 | noise2 218 | noise3 219 | noise4 220 | EmitStreamVertex 221 | EndStreamPrimitive 222 | EndStreamPrimitive 223 | EndStreamPrimitive 224 | memoryBarrier 225 | memoryBarrierAtomicCounter 226 | memoryBarrierBuffer 227 | memoryBarrierShared 228 | memoryBarrierImage 229 | groupMemoryBarrier 230 |
231 |
232 | float 233 | atomic_uint 234 | double 235 | int 236 | void 237 | bool 238 | true 239 | false 240 | mat2 241 | mat3 242 | mat4 243 | dmat2 244 | dmat3 245 | dmat4 246 | mat2x2 247 | mat2x3 248 | mat2x4 249 | dmat2x2 250 | dmat2x3 251 | dmat2x4 252 | mat3x2 253 | mat3x3 254 | mat3x4 255 | dmat3x2 256 | dmat3x3 257 | dmat3x4 258 | mat4x2 259 | mat4x3 260 | mat4x4 261 | dmat4x2 262 | dmat4x3 263 | dmat4x4 264 | vec2 265 | vec3 266 | vec4 267 | ivec2 268 | ivec3 269 | ivec4 270 | bvec2 271 | bvec3 272 | bvec4 273 | dvec2 274 | dvec3 275 | dvec4 276 | uint 277 | uvec2 278 | uvec3 279 | uvec4 280 | sampler1D 281 | sampler2D 282 | sampler3D 283 | samplerCube 284 | sampler1DShadow 285 | sampler2DShadow 286 | samplerCubeShadow 287 | sampler1DArray 288 | sampler2DArray 289 | sampler1DArrayShadow 290 | sampler2DArrayShadow 291 | sampler1D 292 | isampler2D 293 | isampler3D 294 | isamplerCube 295 | isampler1DArray 296 | isampler2DArray 297 | usampler1D 298 | usampler2D 299 | usampler3D 300 | usamplerCube 301 | usampler1DArray 302 | usampler2DArray 303 | sampler2DRect 304 | sampler2DRectShadow 305 | isampler2DRect 306 | usampler2DRect 307 | samplerBuffer 308 | isamplerBuffer 309 | usamplerBuffer 310 | sampler2DMS 311 | isampler2DMS 312 | usampler2DMS 313 | sampler2DMSArray 314 | isampler2DMSArray 315 | usampler2DMSArray 316 | samplerCubeArray 317 | samplerCubeArrayShadow 318 | isamplerCubeArray 319 | usamplerCubeArray 320 | image1D 321 | iimage1D 322 | uimage1D 323 | image2D 324 | iimage2D 325 | uimage2D 326 | image3D 327 | iimage3D 328 | uimage3D 329 | image2DRect 330 | iimage2DRect 331 | uimage2DRect 332 | imageCube 333 | iimageCube 334 | uimageCube 335 | imageBuffer 336 | iimageBuffer 337 | uimageBuffer 338 | image1DArray 339 | iimage1DArray 340 | uimage1DArray 341 | image2DArray 342 | iimage2DArray 343 | uimage2DArray 344 | imageCubeArray 345 | iimageCubeArray 346 | uimageCubeArray 347 | image2DMS 348 | iimage2DMS 349 | uimage2DMS 350 | image2DMSArray 351 | iimage2DMSArray 352 | uimage2DMSArray 353 |
354 |
-------------------------------------------------------------------------------- /shader++/resources/shaderPlusPlus_resources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | icons/new.png 4 | icons/open.png 5 | icons/save.png 6 | icons/exit.png 7 | icons/about.png 8 | icons/icon.png 9 | styles/default_style.xml 10 | styles/drakula.xml 11 | languages/glsl.xml 12 | code_samples/shader_00.glsl 13 | code_samples/shader_01.glsl 14 | code_samples/shader_02.glsl 15 | code_samples/shader_03.glsl 16 | code_samples/shader_04.glsl 17 | 18 | 19 | -------------------------------------------------------------------------------- /shader++/resources/styles/default_style.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 |