From d5e398ac22ee97aa64fe2420438350de56b4bf6b Mon Sep 17 00:00:00 2001 From: Liam Galvin Date: Thu, 28 Jun 2018 12:26:48 +0100 Subject: [PATCH] initial gui base --- Gopkg.lock | 74 +- config/config.go | 5 + fonts/CamingoCode-Regular.ttf | Bin 0 -> 93500 bytes gui/gui.go | 182 + main.go | 39 +- vendor/github.com/4ydx/gltext/.gitignore | 2 + vendor/github.com/4ydx/gltext/CONTRIBUTORS | 13 + vendor/github.com/4ydx/gltext/LICENSE | 27 + vendor/github.com/4ydx/gltext/README.md | 35 + vendor/github.com/4ydx/gltext/charset.go | 90 + vendor/github.com/4ydx/gltext/debug.go | 60 + .../4ydx/gltext/example/font/COPYING | 42 + vendor/github.com/4ydx/gltext/fontconfig.go | 109 + vendor/github.com/4ydx/gltext/fontlike.go | 10 + vendor/github.com/4ydx/gltext/misc.go | 112 + vendor/github.com/4ydx/gltext/truetype.go | 163 + .../4ydx/gltext/v4.1/bounding_box.go | 182 + vendor/github.com/4ydx/gltext/v4.1/font.go | 177 + vendor/github.com/4ydx/gltext/v4.1/shaders.go | 70 + vendor/github.com/4ydx/gltext/v4.1/text.go | 538 + vendor/github.com/go-gl/gl/LICENSE | 21 + .../go-gl/gl/v4.1-core/gl/conversions.go | 109 + .../github.com/go-gl/gl/v4.1-core/gl/debug.go | 31 + .../go-gl/gl/v4.1-core/gl/package.go | 15893 ++++++++++++++++ .../go-gl/gl/v4.1-core/gl/procaddr.go | 65 + vendor/github.com/go-gl/glfw/AUTHORS | 10 + vendor/github.com/go-gl/glfw/LICENSE | 27 + .../go-gl/glfw/v3.1/glfw/glfw/COPYING.txt | 22 + .../go-gl/glfw/v3.2/glfw/GLFW_C_REVISION.txt | 1 + .../github.com/go-gl/glfw/v3.2/glfw/build.go | 43 + .../github.com/go-gl/glfw/v3.2/glfw/c_glfw.go | 11 + .../go-gl/glfw/v3.2/glfw/c_glfw_darwin.go | 13 + .../go-gl/glfw/v3.2/glfw/c_glfw_linbsd.go | 30 + .../go-gl/glfw/v3.2/glfw/c_glfw_windows.go | 13 + .../go-gl/glfw/v3.2/glfw/context.go | 77 + .../github.com/go-gl/glfw/v3.2/glfw/error.c | 9 + .../github.com/go-gl/glfw/v3.2/glfw/error.go | 199 + .../github.com/go-gl/glfw/v3.2/glfw/glfw.go | 76 + .../go-gl/glfw/v3.2/glfw/glfw/COPYING.txt | 22 + .../github.com/go-gl/glfw/v3.2/glfw/input.c | 81 + .../github.com/go-gl/glfw/v3.2/glfw/input.go | 696 + .../github.com/go-gl/glfw/v3.2/glfw/monitor.c | 25 + .../go-gl/glfw/v3.2/glfw/monitor.go | 208 + .../go-gl/glfw/v3.2/glfw/native_darwin.go | 39 + .../go-gl/glfw/v3.2/glfw/native_linbsd.go | 50 + .../go-gl/glfw/v3.2/glfw/native_windows.go | 35 + .../github.com/go-gl/glfw/v3.2/glfw/time.go | 41 + .../github.com/go-gl/glfw/v3.2/glfw/util.go | 37 + .../github.com/go-gl/glfw/v3.2/glfw/vulkan.go | 14 + .../github.com/go-gl/glfw/v3.2/glfw/window.c | 57 + .../github.com/go-gl/glfw/v3.2/glfw/window.go | 830 + vendor/github.com/go-gl/mathgl/AUTHORS | 14 + vendor/github.com/go-gl/mathgl/CONTRIBUTORS | 21 + vendor/github.com/go-gl/mathgl/LICENSE | 23 + .../github.com/go-gl/mathgl/mgl32/codegen.go | 276 + vendor/github.com/go-gl/mathgl/mgl32/conv.go | 94 + vendor/github.com/go-gl/mathgl/mgl32/doc.go | 22 + vendor/github.com/go-gl/mathgl/mgl32/matmn.go | 494 + .../github.com/go-gl/mathgl/mgl32/matrix.go | 2341 +++ .../github.com/go-gl/mathgl/mgl32/matrix.tmpl | 370 + .../github.com/go-gl/mathgl/mgl32/mempool.go | 121 + .../github.com/go-gl/mathgl/mgl32/project.go | 98 + vendor/github.com/go-gl/mathgl/mgl32/quat.go | 458 + .../github.com/go-gl/mathgl/mgl32/shapes.go | 306 + .../go-gl/mathgl/mgl32/transform.go | 223 + vendor/github.com/go-gl/mathgl/mgl32/util.go | 142 + vendor/github.com/go-gl/mathgl/mgl32/vecn.go | 350 + .../github.com/go-gl/mathgl/mgl32/vector.go | 562 + .../github.com/go-gl/mathgl/mgl32/vector.tmpl | 207 + vendor/github.com/golang/freetype/AUTHORS | 20 + .../github.com/golang/freetype/CONTRIBUTORS | 38 + vendor/github.com/golang/freetype/LICENSE | 12 + vendor/github.com/golang/freetype/README | 21 + vendor/github.com/golang/freetype/freetype.go | 341 + .../github.com/golang/freetype/raster/geom.go | 245 + .../golang/freetype/raster/paint.go | 287 + .../golang/freetype/raster/raster.go | 601 + .../golang/freetype/raster/stroke.go | 483 + .../golang/freetype/testdata/COPYING | 42 + .../golang/freetype/truetype/face.go | 507 + .../golang/freetype/truetype/glyph.go | 522 + .../golang/freetype/truetype/hint.go | 1770 ++ .../golang/freetype/truetype/opcodes.go | 289 + .../golang/freetype/truetype/truetype.go | 653 + vendor/go.uber.org/atomic/.codecov.yml | 15 + vendor/go.uber.org/atomic/.gitignore | 11 + vendor/go.uber.org/atomic/.travis.yml | 23 + vendor/go.uber.org/atomic/LICENSE.txt | 19 + vendor/go.uber.org/atomic/Makefile | 64 + vendor/go.uber.org/atomic/README.md | 36 + vendor/go.uber.org/atomic/atomic.go | 351 + vendor/go.uber.org/atomic/glide.lock | 17 + vendor/go.uber.org/atomic/glide.yaml | 6 + vendor/go.uber.org/atomic/string.go | 49 + vendor/go.uber.org/multierr/.codecov.yml | 15 + vendor/go.uber.org/multierr/.gitignore | 1 + vendor/go.uber.org/multierr/.travis.yml | 33 + vendor/go.uber.org/multierr/CHANGELOG.md | 28 + vendor/go.uber.org/multierr/LICENSE.txt | 19 + vendor/go.uber.org/multierr/Makefile | 74 + vendor/go.uber.org/multierr/README.md | 23 + vendor/go.uber.org/multierr/error.go | 401 + vendor/go.uber.org/multierr/glide.lock | 19 + vendor/go.uber.org/multierr/glide.yaml | 8 + vendor/go.uber.org/zap/.codecov.yml | 17 + vendor/go.uber.org/zap/.gitignore | 28 + vendor/go.uber.org/zap/.readme.tmpl | 108 + vendor/go.uber.org/zap/.travis.yml | 21 + vendor/go.uber.org/zap/CHANGELOG.md | 286 + vendor/go.uber.org/zap/CODE_OF_CONDUCT.md | 75 + vendor/go.uber.org/zap/CONTRIBUTING.md | 81 + vendor/go.uber.org/zap/FAQ.md | 154 + vendor/go.uber.org/zap/LICENSE.txt | 19 + vendor/go.uber.org/zap/Makefile | 76 + vendor/go.uber.org/zap/README.md | 136 + vendor/go.uber.org/zap/array.go | 320 + vendor/go.uber.org/zap/buffer/buffer.go | 106 + vendor/go.uber.org/zap/buffer/pool.go | 49 + vendor/go.uber.org/zap/check_license.sh | 17 + vendor/go.uber.org/zap/config.go | 243 + vendor/go.uber.org/zap/doc.go | 113 + vendor/go.uber.org/zap/encoder.go | 75 + vendor/go.uber.org/zap/error.go | 80 + vendor/go.uber.org/zap/field.go | 310 + vendor/go.uber.org/zap/flag.go | 39 + vendor/go.uber.org/zap/glide.lock | 76 + vendor/go.uber.org/zap/glide.yaml | 35 + vendor/go.uber.org/zap/global.go | 169 + vendor/go.uber.org/zap/http_handler.go | 81 + .../zap/internal/bufferpool/bufferpool.go | 31 + .../go.uber.org/zap/internal/color/color.go | 44 + vendor/go.uber.org/zap/internal/exit/exit.go | 64 + vendor/go.uber.org/zap/level.go | 132 + vendor/go.uber.org/zap/logger.go | 305 + vendor/go.uber.org/zap/options.go | 109 + vendor/go.uber.org/zap/stacktrace.go | 126 + vendor/go.uber.org/zap/sugar.go | 304 + vendor/go.uber.org/zap/time.go | 27 + vendor/go.uber.org/zap/writer.go | 96 + .../zap/zapcore/console_encoder.go | 147 + vendor/go.uber.org/zap/zapcore/core.go | 113 + vendor/go.uber.org/zap/zapcore/doc.go | 24 + vendor/go.uber.org/zap/zapcore/encoder.go | 348 + vendor/go.uber.org/zap/zapcore/entry.go | 257 + vendor/go.uber.org/zap/zapcore/error.go | 120 + vendor/go.uber.org/zap/zapcore/field.go | 201 + vendor/go.uber.org/zap/zapcore/hook.go | 68 + .../go.uber.org/zap/zapcore/json_encoder.go | 480 + vendor/go.uber.org/zap/zapcore/level.go | 175 + .../go.uber.org/zap/zapcore/level_strings.go | 46 + vendor/go.uber.org/zap/zapcore/marshaler.go | 53 + .../go.uber.org/zap/zapcore/memory_encoder.go | 179 + vendor/go.uber.org/zap/zapcore/sampler.go | 134 + vendor/go.uber.org/zap/zapcore/tee.go | 81 + .../go.uber.org/zap/zapcore/write_syncer.go | 123 + vendor/golang.org/x/image/AUTHORS | 3 + vendor/golang.org/x/image/CONTRIBUTORS | 3 + vendor/golang.org/x/image/LICENSE | 27 + vendor/golang.org/x/image/PATENTS | 22 + vendor/golang.org/x/image/font/font.go | 359 + vendor/golang.org/x/image/math/f32/f32.go | 37 + vendor/golang.org/x/image/math/fixed/fixed.go | 410 + 162 files changed, 41235 insertions(+), 7 deletions(-) create mode 100644 config/config.go create mode 100644 fonts/CamingoCode-Regular.ttf create mode 100644 vendor/github.com/4ydx/gltext/.gitignore create mode 100644 vendor/github.com/4ydx/gltext/CONTRIBUTORS create mode 100644 vendor/github.com/4ydx/gltext/LICENSE create mode 100644 vendor/github.com/4ydx/gltext/README.md create mode 100644 vendor/github.com/4ydx/gltext/charset.go create mode 100644 vendor/github.com/4ydx/gltext/debug.go create mode 100644 vendor/github.com/4ydx/gltext/example/font/COPYING create mode 100644 vendor/github.com/4ydx/gltext/fontconfig.go create mode 100644 vendor/github.com/4ydx/gltext/fontlike.go create mode 100644 vendor/github.com/4ydx/gltext/misc.go create mode 100644 vendor/github.com/4ydx/gltext/truetype.go create mode 100644 vendor/github.com/4ydx/gltext/v4.1/bounding_box.go create mode 100644 vendor/github.com/4ydx/gltext/v4.1/font.go create mode 100644 vendor/github.com/4ydx/gltext/v4.1/shaders.go create mode 100644 vendor/github.com/4ydx/gltext/v4.1/text.go create mode 100644 vendor/github.com/go-gl/gl/LICENSE create mode 100644 vendor/github.com/go-gl/gl/v4.1-core/gl/conversions.go create mode 100644 vendor/github.com/go-gl/gl/v4.1-core/gl/debug.go create mode 100644 vendor/github.com/go-gl/gl/v4.1-core/gl/package.go create mode 100644 vendor/github.com/go-gl/gl/v4.1-core/gl/procaddr.go create mode 100644 vendor/github.com/go-gl/glfw/AUTHORS create mode 100644 vendor/github.com/go-gl/glfw/LICENSE create mode 100644 vendor/github.com/go-gl/glfw/v3.1/glfw/glfw/COPYING.txt create mode 100644 vendor/github.com/go-gl/glfw/v3.2/glfw/GLFW_C_REVISION.txt create mode 100644 vendor/github.com/go-gl/glfw/v3.2/glfw/build.go create mode 100644 vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw.go create mode 100644 vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw_darwin.go create mode 100644 vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw_linbsd.go create mode 100644 vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw_windows.go create mode 100644 vendor/github.com/go-gl/glfw/v3.2/glfw/context.go create mode 100644 vendor/github.com/go-gl/glfw/v3.2/glfw/error.c create mode 100644 vendor/github.com/go-gl/glfw/v3.2/glfw/error.go create mode 100644 vendor/github.com/go-gl/glfw/v3.2/glfw/glfw.go create mode 100644 vendor/github.com/go-gl/glfw/v3.2/glfw/glfw/COPYING.txt create mode 100644 vendor/github.com/go-gl/glfw/v3.2/glfw/input.c create mode 100644 vendor/github.com/go-gl/glfw/v3.2/glfw/input.go create mode 100644 vendor/github.com/go-gl/glfw/v3.2/glfw/monitor.c create mode 100644 vendor/github.com/go-gl/glfw/v3.2/glfw/monitor.go create mode 100644 vendor/github.com/go-gl/glfw/v3.2/glfw/native_darwin.go create mode 100644 vendor/github.com/go-gl/glfw/v3.2/glfw/native_linbsd.go create mode 100644 vendor/github.com/go-gl/glfw/v3.2/glfw/native_windows.go create mode 100644 vendor/github.com/go-gl/glfw/v3.2/glfw/time.go create mode 100644 vendor/github.com/go-gl/glfw/v3.2/glfw/util.go create mode 100644 vendor/github.com/go-gl/glfw/v3.2/glfw/vulkan.go create mode 100644 vendor/github.com/go-gl/glfw/v3.2/glfw/window.c create mode 100644 vendor/github.com/go-gl/glfw/v3.2/glfw/window.go create mode 100644 vendor/github.com/go-gl/mathgl/AUTHORS create mode 100644 vendor/github.com/go-gl/mathgl/CONTRIBUTORS create mode 100644 vendor/github.com/go-gl/mathgl/LICENSE create mode 100644 vendor/github.com/go-gl/mathgl/mgl32/codegen.go create mode 100644 vendor/github.com/go-gl/mathgl/mgl32/conv.go create mode 100644 vendor/github.com/go-gl/mathgl/mgl32/doc.go create mode 100644 vendor/github.com/go-gl/mathgl/mgl32/matmn.go create mode 100644 vendor/github.com/go-gl/mathgl/mgl32/matrix.go create mode 100644 vendor/github.com/go-gl/mathgl/mgl32/matrix.tmpl create mode 100644 vendor/github.com/go-gl/mathgl/mgl32/mempool.go create mode 100644 vendor/github.com/go-gl/mathgl/mgl32/project.go create mode 100644 vendor/github.com/go-gl/mathgl/mgl32/quat.go create mode 100644 vendor/github.com/go-gl/mathgl/mgl32/shapes.go create mode 100644 vendor/github.com/go-gl/mathgl/mgl32/transform.go create mode 100644 vendor/github.com/go-gl/mathgl/mgl32/util.go create mode 100644 vendor/github.com/go-gl/mathgl/mgl32/vecn.go create mode 100644 vendor/github.com/go-gl/mathgl/mgl32/vector.go create mode 100644 vendor/github.com/go-gl/mathgl/mgl32/vector.tmpl create mode 100644 vendor/github.com/golang/freetype/AUTHORS create mode 100644 vendor/github.com/golang/freetype/CONTRIBUTORS create mode 100644 vendor/github.com/golang/freetype/LICENSE create mode 100644 vendor/github.com/golang/freetype/README create mode 100644 vendor/github.com/golang/freetype/freetype.go create mode 100644 vendor/github.com/golang/freetype/raster/geom.go create mode 100644 vendor/github.com/golang/freetype/raster/paint.go create mode 100644 vendor/github.com/golang/freetype/raster/raster.go create mode 100644 vendor/github.com/golang/freetype/raster/stroke.go create mode 100644 vendor/github.com/golang/freetype/testdata/COPYING create mode 100644 vendor/github.com/golang/freetype/truetype/face.go create mode 100644 vendor/github.com/golang/freetype/truetype/glyph.go create mode 100644 vendor/github.com/golang/freetype/truetype/hint.go create mode 100644 vendor/github.com/golang/freetype/truetype/opcodes.go create mode 100644 vendor/github.com/golang/freetype/truetype/truetype.go create mode 100644 vendor/go.uber.org/atomic/.codecov.yml create mode 100644 vendor/go.uber.org/atomic/.gitignore create mode 100644 vendor/go.uber.org/atomic/.travis.yml create mode 100644 vendor/go.uber.org/atomic/LICENSE.txt create mode 100644 vendor/go.uber.org/atomic/Makefile create mode 100644 vendor/go.uber.org/atomic/README.md create mode 100644 vendor/go.uber.org/atomic/atomic.go create mode 100644 vendor/go.uber.org/atomic/glide.lock create mode 100644 vendor/go.uber.org/atomic/glide.yaml create mode 100644 vendor/go.uber.org/atomic/string.go create mode 100644 vendor/go.uber.org/multierr/.codecov.yml create mode 100644 vendor/go.uber.org/multierr/.gitignore create mode 100644 vendor/go.uber.org/multierr/.travis.yml create mode 100644 vendor/go.uber.org/multierr/CHANGELOG.md create mode 100644 vendor/go.uber.org/multierr/LICENSE.txt create mode 100644 vendor/go.uber.org/multierr/Makefile create mode 100644 vendor/go.uber.org/multierr/README.md create mode 100644 vendor/go.uber.org/multierr/error.go create mode 100644 vendor/go.uber.org/multierr/glide.lock create mode 100644 vendor/go.uber.org/multierr/glide.yaml create mode 100644 vendor/go.uber.org/zap/.codecov.yml create mode 100644 vendor/go.uber.org/zap/.gitignore create mode 100644 vendor/go.uber.org/zap/.readme.tmpl create mode 100644 vendor/go.uber.org/zap/.travis.yml create mode 100644 vendor/go.uber.org/zap/CHANGELOG.md create mode 100644 vendor/go.uber.org/zap/CODE_OF_CONDUCT.md create mode 100644 vendor/go.uber.org/zap/CONTRIBUTING.md create mode 100644 vendor/go.uber.org/zap/FAQ.md create mode 100644 vendor/go.uber.org/zap/LICENSE.txt create mode 100644 vendor/go.uber.org/zap/Makefile create mode 100644 vendor/go.uber.org/zap/README.md create mode 100644 vendor/go.uber.org/zap/array.go create mode 100644 vendor/go.uber.org/zap/buffer/buffer.go create mode 100644 vendor/go.uber.org/zap/buffer/pool.go create mode 100755 vendor/go.uber.org/zap/check_license.sh create mode 100644 vendor/go.uber.org/zap/config.go create mode 100644 vendor/go.uber.org/zap/doc.go create mode 100644 vendor/go.uber.org/zap/encoder.go create mode 100644 vendor/go.uber.org/zap/error.go create mode 100644 vendor/go.uber.org/zap/field.go create mode 100644 vendor/go.uber.org/zap/flag.go create mode 100644 vendor/go.uber.org/zap/glide.lock create mode 100644 vendor/go.uber.org/zap/glide.yaml create mode 100644 vendor/go.uber.org/zap/global.go create mode 100644 vendor/go.uber.org/zap/http_handler.go create mode 100644 vendor/go.uber.org/zap/internal/bufferpool/bufferpool.go create mode 100644 vendor/go.uber.org/zap/internal/color/color.go create mode 100644 vendor/go.uber.org/zap/internal/exit/exit.go create mode 100644 vendor/go.uber.org/zap/level.go create mode 100644 vendor/go.uber.org/zap/logger.go create mode 100644 vendor/go.uber.org/zap/options.go create mode 100644 vendor/go.uber.org/zap/stacktrace.go create mode 100644 vendor/go.uber.org/zap/sugar.go create mode 100644 vendor/go.uber.org/zap/time.go create mode 100644 vendor/go.uber.org/zap/writer.go create mode 100644 vendor/go.uber.org/zap/zapcore/console_encoder.go create mode 100644 vendor/go.uber.org/zap/zapcore/core.go create mode 100644 vendor/go.uber.org/zap/zapcore/doc.go create mode 100644 vendor/go.uber.org/zap/zapcore/encoder.go create mode 100644 vendor/go.uber.org/zap/zapcore/entry.go create mode 100644 vendor/go.uber.org/zap/zapcore/error.go create mode 100644 vendor/go.uber.org/zap/zapcore/field.go create mode 100644 vendor/go.uber.org/zap/zapcore/hook.go create mode 100644 vendor/go.uber.org/zap/zapcore/json_encoder.go create mode 100644 vendor/go.uber.org/zap/zapcore/level.go create mode 100644 vendor/go.uber.org/zap/zapcore/level_strings.go create mode 100644 vendor/go.uber.org/zap/zapcore/marshaler.go create mode 100644 vendor/go.uber.org/zap/zapcore/memory_encoder.go create mode 100644 vendor/go.uber.org/zap/zapcore/sampler.go create mode 100644 vendor/go.uber.org/zap/zapcore/tee.go create mode 100644 vendor/go.uber.org/zap/zapcore/write_syncer.go create mode 100644 vendor/golang.org/x/image/AUTHORS create mode 100644 vendor/golang.org/x/image/CONTRIBUTORS create mode 100644 vendor/golang.org/x/image/LICENSE create mode 100644 vendor/golang.org/x/image/PATENTS create mode 100644 vendor/golang.org/x/image/font/font.go create mode 100644 vendor/golang.org/x/image/math/f32/f32.go create mode 100644 vendor/golang.org/x/image/math/fixed/fixed.go diff --git a/Gopkg.lock b/Gopkg.lock index bef2d00..21b073f 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -1,9 +1,81 @@ # This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. +[[projects]] + branch = "master" + name = "github.com/4ydx/gltext" + packages = [ + ".", + "v4.1" + ] + revision = "0cb49edd9bd9c90f54449abdf2efc7d2efdb97b3" + +[[projects]] + branch = "master" + name = "github.com/go-gl/gl" + packages = ["v4.1-core/gl"] + revision = "68e2537930806bfcee1b92a0e14b4e9b8bb3a3e3" + +[[projects]] + branch = "master" + name = "github.com/go-gl/glfw" + packages = ["v3.2/glfw"] + revision = "46a8d530c3268b31eeb1310f30fe42be1cae98f2" + +[[projects]] + branch = "master" + name = "github.com/go-gl/mathgl" + packages = ["mgl32"] + revision = "5ab0e04e1f55a10f3a71b1fccc60ca2ee9a0bc02" + +[[projects]] + branch = "master" + name = "github.com/golang/freetype" + packages = [ + ".", + "raster", + "truetype" + ] + revision = "e2365dfdc4a05e4b8299a783240d4a7d5a65d4e4" + +[[projects]] + name = "go.uber.org/atomic" + packages = ["."] + revision = "1ea20fb1cbb1cc08cbd0d913a96dead89aa18289" + version = "v1.3.2" + +[[projects]] + name = "go.uber.org/multierr" + packages = ["."] + revision = "3c4937480c32f4c13a875a1829af76c98ca3d40a" + version = "v1.1.0" + +[[projects]] + name = "go.uber.org/zap" + packages = [ + ".", + "buffer", + "internal/bufferpool", + "internal/color", + "internal/exit", + "zapcore" + ] + revision = "eeedf312bc6c57391d84767a4cd413f02a917974" + version = "v1.8.0" + +[[projects]] + branch = "master" + name = "golang.org/x/image" + packages = [ + "font", + "math/f32", + "math/fixed" + ] + revision = "cc896f830cedae125428bc9fe1b0362aa91b3fb1" + [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "ab4fef131ee828e96ba67d31a7d690bd5f2f42040c6766b1b12fe856f87e0ff7" + inputs-digest = "e66cc362b8904acc9c4fd94bc590e57630d71a2f12874668f55092d181855b7c" solver-name = "gps-cdcl" solver-version = 1 diff --git a/config/config.go b/config/config.go new file mode 100644 index 0000000..7079131 --- /dev/null +++ b/config/config.go @@ -0,0 +1,5 @@ +package config + +type Config struct { + DebugMode bool +} diff --git a/fonts/CamingoCode-Regular.ttf b/fonts/CamingoCode-Regular.ttf new file mode 100644 index 0000000000000000000000000000000000000000..04b88608e2aef7ee1fe7651e32b0147c116f640f GIT binary patch literal 93500 zcmeFa37lM2wKux=sjjN7?wYG>=$g8QuCAWvPLJtyXPy&CfDB}SFe3y6A|gr@L5YZ{ zhyo6vpnwQb5ke3_(ChsiqxZ^1#S4g{;(*tS=%+W`@BiQXoT};}4Bz+O_j~XCZt~lG z_F1*hIs2?>uf6u#>j)`?2;fhZ@UPf(!r~t{eP~d~gqjtwCifrKZdJzpSX10mg&0RjtY6oej#cP?>X<33*P(6N8c%g>ttNtyJz3U z8SlRsaUo(uXutG~3(h>xvGwDFLWHl!JuW))l#4D93E{-^?#J)`GvD;qGq!cwTG0M- zA#+ckb^0l%O?~16KStXmeqV4F0FE8Ti#Xqm^TxBzyZF+-4PE(loc~P-=V@=+yXTaR z#gE<~Kf;XRj!2`Ek`fox+t8h)fAZ}1T^Zm2xcKOEsBI<3w0YrTNW0^ncW9u{1Q_~J( zaTVTCxP(C{{^6Rc_%xntG~xGO8jIDP^l!SsPY97e5vPc1ajCGIzt`XjVQUjMoZE~h zc|CrqHoj^cz(v>Uqx`v8BAwNSQEPWq*$l(5-73UOevx^bb^F!JGZ`@<#NVckKTbPj zJNowbj1V8@@A5_CK^!uo%4ibjprD5{%0is8_|2nr{%S|IW!Z?b;TUBB;4C93Jt#|F zXJOl}S1Ej^7llWbi8okIMEmiIauVv5h5fB8);lxaeB)9Z5T%v3XgB3SohejIXFye|wtE@x)jg$tocbX-OBhP1-Nx&)#@y|kDvg)sOwD@ift~nNN zNS7KE>$n~D*HcbKyOvie*8O;7S@s4B`DLY9HsffOJ*dY}c&sd8oR7UqVLt;Xuh!rB zemf4=u<$qHu(DY1HQzCTwzEqmf4`o(MQe-RZrpQr=>@E^Jc9H4P^{y1sJ{ngKgwQ| zx1;Psxe4W3lnGR|WU3ZF@uu`lf?8&KAxOrWqY3sF)i z%TcJa)}r*I01rw}U5NS>DDOx401Erf<9krvi*l8De7)^HhxXq?`3eeYa0|-)D5MR` zT_^`pC=!k)A^BCgQl26{ByJO*7I%t!!~^0%@ipkMQp14@NRa_;m7Vj0;i0kAQxl?YH|Acq=nE0gljJQwyyZE(q!iuUEHKJCy zMLQ>1EJnqc*ep&K+r}xl@*VP2xk#Qb_R6#5 zneuFzl3DqXxIsKGAC+I056Xw-74o0uWAX|4xcndT>+)RrCixxMp4;Rqxk5f7zb5y~ z!}8m5vphjAgf;vTag+Fs_=VUi7t1B`IJr@-m+RzLz=DFMlilBLAnHHWEgIQ8c=YK4TEJ;J1vQ+k&>R zt;u$S?JnC_ZI7itnF(j&nRF(XY07kGMlwq?7i8X=xh8W@Hk!?3bJ?cs&g@M&Bj?EZ za=~0Ym(I22R_1o+PA}YB`1aqXr>FTgczQ;31K+pe>EDyTkT1xW<=^Cg88HL0V00S2 z>goSvJT>R(p-e23%w*Klht<AwJ*6YRwFANhCg zzbW_BUP7m`Q>iKM)PkuTAg*6*d#+2jeJ=Xk{^#nS+x}bv|K+nsgm`xKvn!sxgTFrW zwP(KZ%$ISz{h8aIx$&7dKeJVcr(1sZ_v(K$Ws`G+8#vQ2o-}@GykPv^_@nVB;}zq- zj42z;ao)o^vR?jY{2eXk$g1&*Zeje{R;_Ecy7DzP%s|Y4uO+|#?~&CiND3wGGRV>{ z$XgbYb}l655jhE|D?$#xEZ;A$gY5mYJRedqD6fT-oghCgZ!a3?%Q@@_xu}m69B%42eI9z0eFU=ms~mLjaN+fo{kt?Jx{} zrFKX`KWvAF*a7XZQ+`EkgNC@AIzk)}XNqgZEy62q28VxGIK=HDD((<5@i`F}pB44u zZjlzB7fJDD=klwcvSR?e-;bHx5Xmy zKg76rLM#y96@%h?Vp9A-EEPWzE5u6iW3fg&CDw~4#ai)iVx9O`v0D6GY!c6klf*OP z1aYGHnK(|ohEMnnS|1 zamyE_yl(3uIepb3u{8A%Mn2oFogIgSY|mttoxSv++>H~X9e~y>YPR;w@`JX*^5eJU zw`LAx4y-!uKxTR7tW!=qSXEF*{BZh#tzDUeV$+th@ptoNE<{fZUpsu56WN%-SIcRIzxaGJl2lp>c9GqCXHIdC`mK}U-<6H_axb26jLT?1U(63*Dv`BmW4j zg)C-88sf$*Xr&m!H8B(75m#b--wd0jQ9)o%NSGZT!a#o(w$0WnL3UBX) zW#w!GDm1MQ785)b0l zuNNNqBIeH_;WMrh9{8Sp#xI0Vo-Dj_7;UCu=j?>__(j8kSrQCyv2gko*ak17>uqx3 zA<^D-NW`8#BwC+-2u4Wl%ZEXtnD7UJ!-s^kYtp9dK)K^Etd>?2-0D9h(noNa{~_SE z_GMCc*_K11rYrFfUa@X`s|g4b5EkANAV5Gs18Q)!O;o)MR>i#>T@T^GRd{?5SJdF~ zmmd$Et}Uu-gQ&Fv*4-n~*8(h0xdW9!t8zauryw_~icl|P zHd<;m8n7x&R;3N5uexlZRavhqc39Rq%;R&y*dhCy@;QgII4=8o(?&RuFM4G@*EG;S zZj4H2&TEA0B7MCJ1_$K+!I8q+CTH`B9bHS?>L%^2TYDF8u3vcC>P2J2tJ(v-Z7nN1 zG3eI` z`b|{Oud_tI!|14AbSi4*fWEMB1AWP-4}&i!%vKX1XFo{L2~>`}8adlYy|xN+HW1Jt z{3ZJO3GlxfeGiESJSL{7n7~65=u}eJ(J4Q=Q9QzqwORCUCjI-&^FyK!Z3onqZMX+K z2)L>lwFyoCS=8{_O!P-fR2h7o1ga|}1Ch8l=dTX8#(Me#=|cGRkj$HE$oivEyS>-p zZ0U$J<(t!yn^ft2v|VCVJN|I5mgUc-Zg25Mq3W`v>d|m5SW#sI*uMzD^f*K^Q&42 zy$FGrbvQeW{x1+&b&FQK(E_yUQmuN?su!*L)L9nrb*k2i+VP6ygJl_8I8zv-<2EIe zb&hbpE^SZ>6&rLK6)a$M+VZ%A^E(Y4Nq4rsz8K4b+=-g>crxBtAFw;?l7;&GKrSes zuZcD#lRfd8)Z&IzODbHQTiDb$5$Rmsm3cwBg2_-Q9j=wXsf`ul?ZsH~oqM~xs$HY5 z8dosp_tn?chWk%i>Zz+4T;A-fsfLKx1nd1x4a=7oM~k8Eg*lHmx3EhV2KKfkURSaLxN@IG?NGMS!XMHe&4h6UMigXyMpJ zeu+U&>Xp*DUTAWMv_eC1!UK;Hu#M z7y+>g?hg?V(%f%H(->~|b{K5bRT2E)!a2sSNLP#~NdZ!f8_r`9Y`s&<_f_9fS3`C=?*zc%+_>H_WYh8OEsHzq z^P}rpi<1pi6YCoWvWfoYSRmb=$SrO)esM54l9jPsYhL+@RJqR@IVoa^f66RgS^ zR%L~%5aV0XS~YsBRVlT;#A?0Vs_5$r9DO>0(Q#;@NYvShQ(6XEDan7$u4`JjeKg%T zdGb(kMXox#sHr&75ev6Yw!^<$Q|*q9oVt4Lp3!KHYqYxB+q!n)=$dw)OSwCV*Sx~( zpoGOg1PrE4ydtl@=u%Zr86UH3&)#niM>Y?%2%X&5nn1cnc`& zz>8L1wDPDkN>5ZcUY>Npc8+5D5QSkJ6<45C?Z6Dne@N8hf;^hFs)rPDR>b8LzV05- zq)j^05+ab#6&24f80c?mlY^bMV-sq1W39cjdwjT%cK8y$Oe&d=*A$oZB#%Y9+76?! zskO)1X0t`Zb#*6I#Rhk*nunCocS=5#9t;EN(1Q~=l;G6w8s3ntgj4@&cuPYiocdS8 z+c`gh-dq6rd(zaK-CA!_0$ZpluYew+ri_BPhtayl9M4;T#5$mjtdXrCylK>zRpuNi zHBE}L*UDk)|NdO=Ne2B^@s)~mpzI^9CoTrNCd43je&3tIMT%CF$HRqkS!I2tfx5ESB!mg z2x;2)|0{%Kr#xz?}19{uP}RtYDG-Kc6LcBiV5*gcBa^PxXK&^OQ* z?hEH%4;e1MeEs6ZuTF}Ffw+5g+qTi8U!Fw{&|_r!&xq;z3r5XxnLQ*H0mJpcW;5vF zQ}nO_i9SUS8|-cJce6UHg097s*8I(f*LIN#nBvsn$||%u3$fCY0a9(gZOBytgDA;_05?T%y3hoSF4T|)iA(LR*Rx~ zpi6bmrKTI~9G(FA}%|mci+>oxCtY;#SuHBX0o$Sm9Q^Onj`Zo?Gll`kZo5sS@*AhD=`-;s` zZLc3~YUpkZ2J`*7TwgwDeArX)<^ow?e|LZJN5P1U6)K9&&@ ziaLvOU(?!-riGZV4z6e_3?&hWuxixnjmH!ISa(yzpKOljMw>pgxTUu{(O@YtzgIRa zP)h8^YIk*&Qe&%H{qdM_tLp(c_{0*7JI^C>G!4b`*Ydd20PF^p>gULg%v=kp60WX#;h=@7BQ157qQ0tZmZeAWfKBOiD(D8R#l^ZY=sWIYR zUw;Clt!J~tn0(p^;@mhZ&Q^S`U`HNq;zIY>#wNHY|KFAk){*+ z`ZkR;WJZtg?ONFzlT!!7&7;NkmHEy)KxV21_3IkmqY;`R6;paz0~>a!qFsI5Ua z+S5(bp=dEtqD3RsOk;)Ki4zdldPlhceFXTl%@@ZVdKG~NK%fDWK!=16@M^`XwSdI?>S(2q((Eon)@g z-xhyO+z0cyT-mo1Zpx)RRrVR=h`MKy1NNKZe`VLvK*N0gS2)ZAPtl=Ug45p9?Hd@v zP=eF0)9@_a10^`;?HXR7wO@jB{;c6ehQE~Hv>P?N#Z?I}-@l#r$Gi=0a`|`TPZ;37 zc}T=T3yyper5;Mg2I}!hZs7=u zp3-s3ti47aJkO)Jg+gz`lc|jbj?p8W;@QQgFxn4`l7D7j`--<4}P#g-aB?&=hBXd-9B1nTd?qiv8m(HC7bA) zP8n|Kv|+>>>^7b~Bu)WddVzy=w5I)VQqh{OQlcht)GS?7sHXs1aIF9&`AJUL>i{}4p#{H009FPfJ&F|Fs`PPj}}CO7*G#!LZxt(hi5c& ztXhz5REr=N6|RKdQQf>ySDXl*2#Q-#4x-rLsR`rA3%E+6Z=zkkhoP^!#6tXn+q?}Y zd=IV%(EiYBYZ+?zamakh0sMHp`q7En$*5_E06VJskh7)<`xVRJ(jb(PiAA_C=!a7Xlj}Mo^xr+yIY(s(cyiMcQd|xAs181TmKw64o8L?4(+M z#=3PLb7TcMWIf{+t8$N3xfSbPs?A5N$~o%A!T4)YIT;1=U`O1^8pHyr6FwYUPT19Z ztjg_HS8u>{TK#l~s+8u*P4Jx3Vu-@Jn`zp?tQ+WGp#Rdx(TAy#*;qT1nr!Akr!9_g z!*Fl&2KVeqH~RcuyFXpudO{}I8u!!>ZJQY1)F1K3vw>tf9*H&VIW^l8xcT!9D_iru zp6pP2$5^8;C%x&;hD=Aw<4JX98ah*6`JmI+*}U^Or?WQfuJ(A`c9+lT2*G=s8*Yh( z8v8T#&FM(ByD=4O@`n};?KrO5G39o6s=Xb>a5n1k*XM)D26=L}GvTgHw&!vksoL5k zSMs1UmAoq*P9=@GIhPYlaO!FeZv(nX27X?HN1TW{HG;&AAO@> z*^T(~6U+~z;+L4`LH9&4vTLh}9#Gn(UTT6}@O@GfQNvjB{o3x%IdgX}HGr2xJe@Nx zWea0M0Cy*N$`4Qm#efV_Q3sWn(K{1XVuo(q4e3?vbc>;l?q2?1WRlIy~-2FE7xSHJIaoz&K!21`$_6IiPVK=7loiqk(L1R}9`vbTh8->qRZ4@TY`Rk6XTZ~YW+Es*pMjm9A8R*-8&iI)muCI0a9gye-=8ehegBw< zoViL0OFHeD2e(r56=EA)Vmm_%j?Gn;a{FK4k4lcPIKZU0;(3#|4F~8;ov+WaJ|`0| zK{gO(fPXXKwB%>QIYzLhLpH=J+e7EeEF877+kYMKJOW#0!!f4F!aVI^=gZ8$)A_|=BdqXnknBUqmWW^JIqp=6X+wHIeq;6=nf;f#JRy}s6rvn=?P z$9_OtEBMtMSjw{5LSb#G5Z3av9V(8|BBm2d2M^$uF5EH%CZw8uNEDP5=Z$nq1q z(5efN5RStz`9qNA&@4HQ2F$fA)2kmCoYmlr4I6gbJxa78#T0dq{qNz<)q@TF_0C8~ zW=TJO)?lldd~qr=hef}9^v_uSjaAvls;U-_8g;kNQ4c`rIPm>B;5!UdJf{60b--XP ziolD|ZHDCz$|PPXqxE72dNE_^#f+sF%}P6d;-DU>z`a3K8x^RoCZL*=aL&c47u|T6 z8+fc$X9gb2@mUi%0lXKK@H2wu5pWAsu}fSBZShHzdr`iIQne!l%~^?DEECSb?pC=d z+(vwL#nC4;xoHWm?&3zTj2{?NM*8TN@ZxwL`iZHFiZ$s59sqJiO#a7lP!g#D0|PQEo-4;{4%D zsDNMWfI0wGlkC30V4q#)i{bo9>;GfVw2;+jyaMxVs_(}?pZd?EN1-njUTm}_mMMI- zI$=u?K3yQbO7Q-lR^So5P$Rzh>UgXXj{jTmSVrt?;1Q(5178h~FklD!JhRauUwr=g z-%Y=SQG|Rlf#3u6|7~o{`0UuxZ8M(h6aU8LH~n0$YUt6H&#eZ3VvD>m6kfR~TXjVD zh~^bnHELn3dZ2)$YT-c(cgaRJu{U2|$@WHx?GM9cgqeW4g&Vi<;HG#FwN!{l;xTqW z9O#N$wPEz2ju+%UHalRnm_4RN&3C7q>vwk+2M756Sd$$SP1IOwT#pYn4EQ?wR&{#H5theF~w6=yE!aEFprf(f!I1 zog*CbeW1pmHc19z4^7+j($14{nFZ5Nh=gp~9)RiVuod zQ9_)3>$spuotld4lR&2&~2ax zRm&K7ZNimfxJrjz*|~; z89oi*Ee*V-z}I}Elqmt^aB78W1^3~oCBs+p)4w+IOvAm*({A##oAxFjh3JbC@}MSx zCG8dRAF*sNa;A=qBMuqnL0ew)S~$R%oTlO+Bc}(--X0SL8`t?W-s*6;yG=WNEL>c^ zW24O&tLk1TFEbrKN|$S28RIEwkYWAhr#L|0%!a4hE8&=bneFqk5{~(l32&jVPZ-lU z$Y+e-fGwNFR}fG0D%@IYVqH&PayUc8F2uC1q=jD_^KXD{=W;4_0)0!((BfQx)gF;D z-pj5v+qkXd%%xw+E1laX9EI&&OXzFMuWDSs!|CxLJ5FsN5f4^5JL^5WGXTB zZlk+45wEYQ3f9F!p_n)9j*cSI|Sn;KiODwiEK*OCA7it9Mzxdc3`B=LGnbT76l zm%+qPKV1evF)J!06FWeahQ#GJK&I7C`>e_(V0Z;N9kQ>T{s*jQywAFI$s2mD^^Esf z&$!aM^+&AA)z+=wZQXj4x^-dJ5bT`gW|x0x7(TAAZ{uJZ$KJk;L+K50hG#SV`B12_ zFPp{juj@`9jYWq~TgPSP$jF}K7OiXZ`C8YFkFQrp^0`g8rvHq1b<$=r*0-j04CfLs z(E_DMkT^=@lwRg4eh%nGdI9JiZq8Yt;MC&`>EZr@!*FB5m;(GT*0h8eQ7zV$#@!;- zNwH!s*F!*01t3L0s$x{F^ja737|dqC9x2rHY>%Pmixh0}5pJ2FdzYc-aomNGFYHKB zq*QGL_DzrK(g-@;gDY36D@RaUhmjRNqgiOSbK#lGBjs2NER)QQKrfo{=D)42O9g|; zU`jYGn#><%7fCKwnpWpfMOK3^m4^5&@^PE?tbz2te;BN1MOAXhSO~wSIh& zqSX4&*VHyQJGEj%I z=mw1gpcxHvYxUIw#0gwRL;Nu8U$;mobR~eGxQZdAAs$!1)&s(5zr)aWRy(fka@){h zJlMKRbE#dQd95YWrZb}~(`DNf)+jo~WodS~8r{`?j`_RC8O5u2jJ6Ye^7D3#CNnp` z@K>vg-~_IG>A+qFJYju|0Z#~|E+P&}$N5GYq!m-$RD4IKKuJt@2V44Ea(PN;syo;* zAe~<1aOiIg`8@63TsS+xT0C*)Nt8-w^}5*l)EOsIQmY-C>*enq4qw~)MZ+uWnsse( zc?=YRZdE!|tyOIS0OQ@W^TSh_N;v%%x;>);%J<=#l!j+#z&So@c-~y|($D3ZmxdQ+ zv}YWGhO0RKQa?GKYB=})&G%euEll74kEQnA-Bx?@F#WMym2+T`mH)U;pjG|}wh;FT zV8flYPe4a>835}oE2Z56SC|t9sx7^QR$o#_uRSbRy5cLNU@+`xYm(7{+Q?_TjZYa! zm#gh<){w-(Nyod+HruVOZ5QZq!j1vQiOdSvM@f6qZw(rp4X8nfdj(YGO;)9H!+>(u z*u=Z7LFZl8WnYCbmMne*&sdC{My82;$l_pa@Nb-O%#C%OwJSgwW>%aSf?XR%l9$TP z8QTIZI$_S5M92@U)=r3W5*kO(S?M85LZ}OXa2to7y{2XpraWt%vv(uOaU!XskrZLd z1{8e>F3Ze!%(r)gD{M5@IDcb}>zg{5oO5$VK+d}C2Jz83@~w9 zHu_DmP)5InO7QdyRD$QtZ7?)G=i3HDRF=2Fybq&^;@!_%l}}iecUTp~K_j*qmu5#PJ&8OQ4_=?Bs;; z1m`i%XwPZ$ij>t03VxH}B1$}vpQd8Zi<9fFa1g;sBwg+6+vBZxqn1P?b~AHhHO<}o!cC|s#=?QC?a9D||Z97iu_S8Q+~$ zHJ#dHrv0y6;9-DeHNcv5j8f8ZyV}Ik>-mhc4x3wab=14^u0e`#RvrOVu%B16>U~xv z4pUq)Z<|&5G^U_{Fxssh>pAUue0UU!N>4$)0;;Ls@v3T5s2V@oERktb`XA34vnto? z8`_XmOx>AYGe%pX&23iY-KwIN+VrL|n79xlZoSkyog6x12$A4wR==xwe6e*w&g;$$ zws$OQ4xMvmuu#bRYqHDoD@NT7{jFV#TSMo(rR})lGFPoToDPKQLqWGE+R)apWVx-% zSv6AaDl`Tnp+K!Cmg&eXSyxk|>6%w`T`relkL&BC>tWzk)B7;u=q$>UD+VEPi?L+O z&^=5SK(;QmTF-E~ab@8y!8lIWo#u_@AocQN^TrbL#*&KZiWya>mOhu@p0gQd$?IU4 zCFv41?;NaBBTJrqCXu=tO9HIT?PzSUXE{ z%;jv%Jhg}ojziFxegKZb^{4FFvdM)l#qhhkTy>3!Y)8_wb8EwB!jtpp^UnCs!*JX1p$))R@)gw-4XQRJ9mIww? z>3p=fFz>IgulHw*JrhSCrJb(ysM5#hX?@&;LkZ6LgoZbGD&f@A8gA_u#(E#+wgm70 zSF{HmJEs38|I@eyhTuo_N(M7jP@yu4MX!r7wutt-A5^r%qSqNKxIRT_{McT#@<51N zqAAy1ByPq!Z%Qf9ej*3XIJCJz9ISre%m-0oFfvz+2i5)~Gm_ujTt0xo?V%07`c+M$ zBUc>uRfm>!_bzP>UMpX`!~MmvsXr!)^=^-S#Ni7R78GOwgPTNr;opFPTSQ(wkKkYQ zKWV;e5|6G`e8_Im60TG4npB%|;NU}Bt~WU$|5#I2vkI80yaS*)v`r(XD5-diQCWm$ zN*2SMX-%aM1!P)$q{Y!Ww?sPC{X=DCE3Bv&E zbPuop)vum^S6pG@@Z8ahVvY5+B_v)kdM>a?dzd`)AGRoXra|1N zyYvIN{r@1YC|`LcUp=x%+d<4ALiu72kg|MrqKjI-tQ;bC z7&LVd0cI58PGSqrIMft4t{E)A4e^W;qD{zbBRWkC_ZGL%l2O0%&fTvQ!weQmP|+sL znH;X2PiVVL<~)|rGNwGC>|V|!Y1=XFNcsrbmNlAZMQd~{VstEGbSz?YM5Y;-!CZ1` zVbswa$v^g9;#uk-xU8#MZ6R)KaCnp4LflwilWI=~<|>Gp!`s%XP`0O$3PXx@+{>%t zVjk!8iduo8FSJt`MdZ}0VsuDEbsh2Y56s{_fM`yIgR}O4s z;w#5}&J14AlXGm1Aom?XLEj>Z7a19pC9{?BGhaaFER?CdH3=Pu8S5ShrkcX@A+a(7 zv$-QuM4p=73cNyZC>~Se`&)r$_z^iS&jYviE$Q|g_jUUQS=pX`L=Df*fYXnt;g%m! z--mug4KK`SPd}oD7iYj}S7><43^?IkE`|8lx66X znrWS6RU#PS6l9-Od5^Bxk=w+BgwKe;;nWQ7cDA#_vFb>M>$5 z6ulBVw7!r)1zpFlDhWyrTy9(f))t56YxLn(s9*I4+VMghCe=I#*J0;BR}$c=Q`b=w z>-hT!T5fwvvhU#IMRGKM?7gyb$zPi;@oIi0xl;x)%uFQi8A@I?RL1@fxb?6xWg zRfU_dLT1Jf3H7JLka=m<5!||pj6vg;?kXC$R_HBix5;>&Sh3K=YT!r6N zWuLBaM6AJxXtKiv7BVh@_^WnBRpAcfgSffeF<9(tfEx{Dc1H7EDmi@qXZP>;uu&6o zpK;=$M|XbQs0q8zJn(do4{rD?I0$JjjW!8|A4RGoN)Vg>3Ay^2zQ1Y;|hg+Wmi zS1y|vSTgV&V%1uyr3i5fY@&T*zd8G+(uMb$2 zn}7+`_+C|+q3@M(r5!cn#v++-*n9@nzZ0$osQ)vL|3$E=y+0dn^f`SQZ?GX*?@84| zLmZ8AEZ~3;k+!2h=p4y=s;b7|imNN6mnt2hcud&}*MQRS&357dTS3EV6KJ?)6KFVX z0u9f~%Jv-NHC&DH&<>N3spp|+d*lG=xDCCxy(H_23vw3 z5LsPP2y>#Q%c~kCr#2X;3YVGNY1GDI?xj=XF{9-ih?aAJd=4C5FLgWGp+Rq{jK?Nc$kbYapgs=`sHLg7|hZu=sc912EHxX*Nc zg;8VNw50*efjeFblXOzPofVF?a*VSkycT#)NBMfRyYv!-9-A)(Od%+>WoXRN{dyw6t9iP+0mwo(IWcF z16q^VkxAZ;$Erz?ot{`EeKco8%x|aq8M7)6ss&j{ZoZgz<_mE4VLZ3_|=orH!j)WbC z<|?S&{|u@rC?DrB$vh{NuuNtQKot{DXns!RI8m|!QM_uRL@!Fcvdz-wAdti>7VwgM z1%6dPuhWL+n?B9L@lW6U-7qqLM(Z(yV&>280q$h;90Tp%R3;OMh8^~Pr=z8v**@KK zC_!4_pAlkSUYHZmU_Pb6Xzlt;?Ztf|Ojj3#PNTf(6)5ii(DJ6kdl|6_)r42&YO6MV z9JrE^1A0#4!I9S<#)A-HjM_2rZjQL+No?8f;lQs~Bsj7n&JOqCoJh}Ot-fdv0J1x( zU%9o2Zc+NO`7W5ZX5rssW(AZ1FtS9Vrtit+pS$Ij&%JUZxHuKvYdpB@}c!9Pg{)e6EH! zuOi5X-TOlR1H8n{(CxArnTNmuTnUDu#$XVdVir4KtB>g@c0eLrr890iV)nvJ3EHuS`5o7 zeWo4IB8J-{ehHbmV9k_N$n%HTVl1V!$w0`=cG)JwYwlmTWjHa?8}H25rN&O4c=*vR zEB(dAy{Da?A8HN(8W>L@d@{S;|s-KovmCsm}eyg$+vu@R90%kQTH2sq>{gI}QCm%uO4t2u$in(*phR?c~Q@v7# zi)*d>Tm=WL+%Y2~(%h7oFEws%U4F*0d~wy;i(5BlYa7-ycCQ^s#{1UwHLl9KUEb9C z_nm+KwHq7Uu5njQWYI-Cc3wOYadZ7|82hn_^FbMXefcoG(77>i54ENCRR3@0!<>(9 z=1^wpST%`ZOvU`^FKd;Fr1fl24RPi98NJku4||o=msG%<{N&M0M=KR^c8t`Q2(xEo z*K4J|e5r9$OR%c9XL2N%_dC34-$W{(c6F^?kUl1fT8%wmQpFOgEu& zmvyoWgZy3;HRZbp%20{cE>!lSDCnmYlw#GVf4AWa31$#T!K$o*+$-_iVO73hRrXqy zPpOKj0KL$7gC&I*7=L8Rsf*H?$vsOB9qwG#5s9=f>pI7HFuCTcbI!SDL&Kuz!V9)- z+q*D)^jpLu11*S0KW3Zn(;CeWJaX3?Q@3+hi4LFCi5+SBH=t=mNmfHCI>MZTmF1+I zGoG$Jd?Q(1z(gH%GnQ8sxd_UcnV#TV*&|_UaMPJq@H5{}*&oNPSn>HKr{FCo_AL4A zoy_MH?pW5j?U=kZzbS^flsWA3O9?u@ot`i3|Ke&iri%O@K-n&@ocgXz zO+7FBr`~QES?nux;~&x2oWQzK9(~PK^p!FDGc8OV&rj1KiA(f6yK?R1nElUj>XxgR zy3JT1!E+exLfbNDzEIh=)V-i6<-k!~MrQEh-1U(eFFc=NUx|deCM5H(_ravEYlBH2 zNH*3@eZ#`bJVrd}tmvwA(mjg)$!9eEXT#IfF{Sp@Rl0q~RSBm~((oKprj**#-qi4> z8F1Qt8s2QLY)^jF@YZA8zXJv?`SMi!`4wpG;!ah|XF^G(N2E+=7zZT}$}#C#_K{Rh z4LAwW#=pgn6-3FO3LgBPj7|M!qee8R)-BU7%im&bF34`3l9cvPj#_v(SV8GAzp5}D zfnH-Nn7JVE1t4pbu1%_ z^BHY)aivh_EvDwv=_#~daTkPfFN#vz8Ow5-uqr*e;zT!-=w?#Tl(H#r(Z?~9Q?Fgh zMf`c|s*hWh_bbck)eR;UQ2E=&Gy50so@gknIBik;rh==urr5c%HxcVx(vcsm``|MX zZ=Eum-Vd{>cA={_G6A#cl8JC_H8L$Io>cTvJWn?^#^EKJ_cWZmt>Kw?C7e90;Z4Xu zLf+Qx$*UUP8moj;7BsvA8FX~}0{Nl@?|%t!@C$YDZKSSB!q}LlXZ*#qY`GmmReF5YR!VXw$r61oYYc_72dIiiq^&{DN zbd_8=1=-MJq>)6QLm=BTuqUBqL+B$VkKqICtF=gh>6bdg3?9GI-)7C^wdUgz2<;U5 z-I%e5F{tHu-#IU2u2Yw}d(P5EdCt#B@G5gfg#iQ{XSusYhxM|P4m^zNm)pd-Zzg~@ z(m4y6Q(y1@wsKDmn2DHyo4g#zhcV)AcwvM3BL`lP(_@$8-`JFt3#XotmtA!gX|8Ci z@;`hHcyq`M{+8k79Sv9WYVg7`@WOM77xrjgAVw=QOlh6Qk=Ie0#?HY}ndp{(m-d9t z7exX{ylpj{7dlIna$aPYefD;F^Jj0LI%Copn4CQNok?^Q{lQqu{^Z3$9kcan{o$Nh zn0l6TW_;EGBV4o;{W7PY<;4xWB$?CPpRZ;PH0-r=dcMxn@P};RWw=p4q#R}uoaq$Y zb}(|q%gvwT$$aBa))i8IIx0F{5SeO^xtT><-gHz>LLwqnsFbFry6egZ*+U|nTEH{XkUJ=^51|% zPMrRq^2eaJ4Qtp}5u1=@*t_MNNsPhaw|fp_p{LHA!FftH?;L$(u4k2{wQ?+)6-1(U znPZg|WYk|kF!d3fYUVB-GdMJG;)V_K3V-8*LZ}$Fhf=Z6{H*$dS8Iv zj>jlQ+H}kWr_%yTxOCnIrSd+MTTnP2GC`#sOCuaf=S#(7Rd`LEs-;7~v*VKzLyJzYp4qac7Yo-n& z{lb>1J1M&gKWff%MB%N~jsxM?O98w=Ry4f-R~nytfYjdtpLQ_`tqXkGOA=xCQ$CJ~ zn)0sf%F#8P-LpXsPF)6eJunG+#mxJA#G_<<3`EfGR@|S5Pk=zs`K4!_98C$Wg+~XY zftfglxpbVz9uZ8N5G>0D5G#9(#H0t|S>`Pm4#cGWwEijP`kVEqkAYzG)hV<7B;Q8h?}V9WPk*xq7uIvh5` z=5RQwTH5zEtOy#?hFr339a}ousy$AdGy*G(2k-xkFP=yTgXu)vcgL4tBYt}Lw86}R z>^)!p@;%uFnFXg0Pwiv}u;E7F`w|brGYURu)}93Toc08B^|-Z{id)vKT+uWa^;YXw zaZt^f?3e+x+G9nVqB5^5{GaA7?FhO-ym4+*D|VxM7ohA%xgOM=4#-=k0FKzT!@GF&VCSKYUUNkyr%C?z;%2C;k-%>}kCSVkI z8`!F~g01G@Wscr%BU{b$k;5|POv@V9m|h{{J|Ml7i@Ze%U=$~P90lA+W77=9(5RU) zY9s8u0#oOFwHBCi5mTYUf_z<}t~!wL6$=T4!THb@=~>bosIo7FqjhWuC~R%EPzW8M zcuVP$pMuw5kNpsbdEn{6N;vH+-M-PNgwtNq@K&1%hmHa7mf-!*0uHU%f?OU)jc-EU zi}Ko8xjcfFYjU?$*{>=O;YzMb9V4knS@6rlhn_R(%^Ho!>a0pB66lN_>PXm(la!EFQ5%0G=I?F zxS?-{5}k+S&?`yDZi`}s0*2TkTdDz~STa1#pn)<&m>$P6puApb+Nza8&5#AX;f~9c z81t38QD=nFUmw-3&t`~mLH(+g2uJc#R)-m%l(bSna8HX~^Oj*xx-Qk8^7-(mF75FL zJ7V1{x}x=ctGeskg1^4^)1SWAxXf;kEV_8tE-YTz?F;SB#QJOZUU=Pxl+&&k#?i}` z>HFkSTP;}W4d&?JZj1lpIXcP&`2TW_j&rkF@_xf$w0XEA*GPHD4M&S3vLo1^TF>^danM~8UA%AC`m-BHyzc1azFnK% zL@NZkSLsHjlb-_sI{63l!_#zrl-hHStlMV*F2gxj)$rU5ICZ#&TXSUnT+Wd-ylF;z z&XG0Tnj`D>)cG2&d@-f|l%K2S$Qo|=Z8w(M_bjsdNglq@D9RKpzq?>7KaU>_e1u!C zCwZ|h_i?>0$0(y9W)V7HIFl6U&tuF<#!=?9N;9UG@gquE@S`$%3d&#>uFhEj2xgc8 z+*wqVwTLXxt8Q1|_yH6yyurj_^gtLVVa`U&i%ZBiT#6hx?(wlLqlxs`$&1d~@bIP$ z!KSg+3lJaBvT|f-eNPOI!Sg287JHMmQ!f+I<@fbNnz33$OV5vY)!8=b(c~%`{Rmo9 z((gAX7h(CmD_6}pNb6NI1IDfwZ=kWjNfU#%;!2AVo%~)BeVO6%D}^xwv4SCv+i=l* z@AM(O)bP;y-smTOHo3Ogqh5(){B?#MV|=~nGak^{gP5;^T@;HESNb4s-Zo1XyIpQaR|5A@|m{XX@M+`!wb=3CZe z)AVwd5mjj|SYA5X3jE9*Q~7k70gHV=Rxd^->!JJ-=IqC5d!tcZX+2mo7Htjno*%a= zU(gjh>|{MB#{kU$l>n@1^9wa43!_V$5y)+ihc=?9!F&i6+|v#NBnNwdUmVBDE>!kf zCmS)S?`AYJe;Gh!nRT)ek#D1_~5){>&ZV+h#MV;(N<$8T$gM|~<7v5%7GTK&h z0yPP=OJJgr;N$2M%3^Yn)pubq&wVKBme<3AxD^E_%*JNE%A2gpb-H3lGVNaAtXH?Y z&-!_jdJVgCM!pZ7!Uf-R$JT0Qx+#CAwK!hjjwD=nmO#=UW9 zUE!^@H5C@p-i4>E9SkiBbd0R-sx+1yjtdLK7vs7hON0eGMRb!?3lK01RFOGxjDFg{PaL3z^a*S#pWYng5iR2~69m z>^0}6KSbLq4a>!D7o?cmjhW+7hyPLAY8^ut->fJv?n$aeNCd;PN)cI@XJg%RIaSC!iZ%vO z*NQdnYU4#Lt5LcZ+m!W<9taWi<5GrfUGD9qIbYZyh}(2gteHSkHe!3{cI)Lqi<=2}j(f-cy#}n3d0Jb&;RbjALg5U_`@6Iva!ERPX1+V>S5wl;ZLpEFrXZ9YD6pH z7~g6c{ncWJ$?r5R7}FL2juNn2^=<&VpR1MW zPM(Y^sg4S5%2&jxT{B}#9 zUOw(b^%{42L0j8Ex^`ov_k@W>$M@91Ip5Q^w6ngxYe}2@!PJ7`9g~gOMcanukH|+O z7&D27KJkRMlX^>d=v8>IHX(#S!Co~=7BD7isVP9C#T556fU8z`4aPw53002 zP4w>#I&vzzZw0FSsn$fKvECbvF}M)>g?jqEk(AfvaSpEUjm$=1|GL2@Z*4k@ugFHs zJwxHfhD41_k8NK_tWs_je^K8`&gsj(q1o^>))mU_p@+@(8Gy@h_-IUcZU!8_Aro%- zhV=d68#3XRZ%D)88#3X|vhx1W^CsNVJG%XCC3si4z2Tv6$ZX%Ea`vci^Qkp?k9Y-3 zhsYj)q3{R_I7CYoSCSdcLWhpdKE#PI7ei7-d?%~`iCe?*$y*6X(HurOUgoN6)y zM*t&27QZv^w5Hmv7S-NkRqobQvtbW_x#RjX)}-b$+MQwpF-`wNOjqosydh9D6`_1kAh|5=7MG)EPF^x}MjDW#bitHmBWg z*s5I4;hiJS>ME>%+8tGc%eS9DVzb+96922JY$NA^<~tKTz5S`wXrnw~>hp~w>C`|^ zPeOhg>!T;sCF60wKM_xcrarIaT=4^AT_ktGnsIc%1^l2&u0rAuAgzaTRnE`gF+=}U zw1ko^nkaLVFz|O9lQ7uG8gMntlY{~OS;a221LjY{FegmNj3+KjWqIhE#}Gbt5(a!G zO9j=DYpo;4ya;KYT7cW{1$cYeeek!Kly05uB~H}V`5s@iJb zWjT~Ls0w<_d~wJM_oqt>R~vtLf75Rc2z+W2q*)AtI*V-z@UfdWALiRQ%}hmFI>^SeJe&3zUzC8 zqw-U>cj9@AU;p!7<1yg_@ry64x4m<7_xN}>=(FG0A@49AgLpOYOBkHdvU3cTVlF~I zsjAX8;)JFRl`;d_Q?x>LScsKAmkD!Wn(MC%Ja4ZJ`BHUtDPO48{<_bxG4){3>W`WR1IX|dPJUJD zG1Z?^7osyye}u<-eIa*Mm76{L6%XiKRTVm#uCooJR}P2Om*k8y(BkdJCV7|fbyyUA z=n;D5WluuvA~A#FK~MN8Ibw;ZWB9zznhZ?oPitrc9XaE4R{FO)LNOI@74rn6t`=ty zXQ5O=of&WTr6L}Goj(~#`jhzJcPNm=1WD|(Rm+36GcbiU`{8CkxJ926e)5(!J~b;c zK$h6iK|bsUJS;OJ0g#W?xzFEI2&Ln3Z(Y*USW&mN$8xpa+K@jN%ey`Jjxe5old(d+ z-}p8LkZ%3Dqz=bj2aZnmrG{LujnXo+JIF5Dz0;=>D-Zk-30)d;LzAP!i;Qn)TU)au zt5%I@zQ5M^o4nb^g(p0N*~9saK;<*s`WYNS=6l9qpGEp_8pWn!!59kW`?A^IY`}Iw zqNyoS-(PPEL_5?lf2*ss0{#gFDNs1~u;#2xasA%4tE5v;z-^pwNvc2`x`2IKLd-Qj78 z%>UITDV~L1S`NJg6ArwkcmTXbw7D>vNX_)0c)1HP6G-4L0j45*jxHQME+#^0eQ6Jnvp0KM*(u8e5C zr1ZVHfxQc~AbWB<4INU{3-zUEV~VbljyrWqWR+7=Ug}E}A{|4+$juS=^~GbcIE(S& zXj8&B+}SbWOEyK~nM^#9$*@oN7(bJj*=~a@){E5|ONttJ7`CaBd)tsN-WaJ* zrRq`Gw+oFSdB5>TJih#f*wYtHo)x#l&1$S zZI=GNcNdL6HhmyBI!@_ctH6|XU(kyxlY(wwa;28{>oUZ2X}5feiT0MG}zQ{Nh1?>OXuCSsZ_!xBa!-0b+kDX zE(Ra8d;R)Be*K`DYB$yq#Uc35F2)q{ViEt0m^E|`&seTSmkm+*cU&AQJF->a-sZr4Dg-{DKa?b?`f&F61@5;>hWB4{E+ z`cob1@0fxX%7a`P+d)M%`+I0|qr)2w2BRQ>dF&5FeE4P(Hl;@hq;5NZdO|%TCYCT# z5n=)oQxj3@mBpr>Rk=fl3MfW?gP`3F@l=y4{Rv2X#jx~ID8>^&Pura5H;*UWZuTJ% z^Ej%j-G#3H_$OLdH#?#+vm-(BM@LT&=LLpP?=2s|dl$t}IewPC;$A@7Z|Tw!{!A=T zEh3U~9&D7{y~?Ic8*{N^VaYnq#+K|4Xk6m6u0Ffnht3)rf2yzT{O&9>(!|k&Milz; z;^-@vHh3(5>#&@5Q)k<@J}(dkoj4E59; zKD7of=0&CHPotKDS;0JSgHfWtS#J$$+VYoGRK4 zHs>XBZ0Z}bWeMlt<~4=`@5y&=#XbIO_B{;JPTQ^4JzC|DraE~KTqDE_n8WkAbM0KV z=RO~!>F7^Yb3D^*k7wd?UOyc-nx?no`dr00SgB{Qn4wq1x_g+|fj7Hj64x5yC*Z?% z#xHPfR9p^j!&_@RWwIX5DIqc_-6#_%8&P(nT!6A4<$9D`Q4XR!hT_ILm3FkNjH@Mv zHC^fD4_%ZUC)xzFK}MNGc;>7yZT#lM>g7As_n-0IXX}VhzXuU|&&oEdUrul)g*G?{&gl#&ISE;qIQ!?bC%5e;kI?(}o4H;vTRpD8LG?q|n#-^81+rs56wT}t9u3(zEeYis&PpQG9>y(GJ9IVc7 zEcr2|;>U+^NkWDC>%r&%`m9vthphF#JFH3$Mvbys--XJDP*gxzNJHu0=FfB&-e}$9 zDs^e7iFTCvu@S_^@rzE@7fPIS=>IM0jJ9Os`LJur;>aFzNVFfiu_N?9t!Qz`R?UdSdhX~w!8YJxlD zocR}zuf^T|ip!zbuEo7?;dk5R>RnuaSp8|h(X?z+b-z)Y>VMyWLcea5k6?cJ2jo6p zE1HeBt3G{4{#<^+=Ec%;UiV4Ic|lSso7@nr{5_zyGVNf`Ti^5K%yt1}U{HRcsEi0t z3`V6gVjva?)){NfxN_|S@IgZrVX?y{UrS0K-oP1ZD2-B5C4bZ*pM?Dm)1bBgneN^_ib z4UNTtBi#h7d*qMg>xilEkV{0saz0>f5hvh|&1zTu23O5<9jlDKvd<P;3h3g$uQRAo(tVW+-q|?k{Ar`xQz3s689{&s&1J3v47b%2Rak2FL_ws^0Uj1 z40O4^#PYl9xi$78vxA;&XKh2HD|n=v8lTq*m%LRz58~X3)}yiH#EC9ktt{lkxtS%q z%KJmNKhf<*%r2u_+!T(g@J588SE^!51!bOPMCcY zUY=`uPv6xq*WB29=Gp!4|E&C>hy5@9y8PSUQSFoBzW8GKptS^x;K@Kj0ED7AYX4{% z$m#$mF8!H}B#{ni_bo7SwZM4RqOEdvA)^-KiP|gu*|wC z3-DRo@|@Ns9bRw8lGgTyxlN^>rnwDYX`9+{?)>@Z?wD#1HE*2SIeYl@sSVAfwOi26 zU8o!Qa_TrBxjH`H>cOj!1bTxQ%WEiyA3G{SoHsLOH z7cvhT#zP>0W*!6Jt$YE|7d6}H#cVj5ft#YmfW?S5 zN7H!i*vGIo9*Cax+dPRH;xiQunUS5Elu(+x_!=zjs{gl}j+0j_BV|0=Yi4c-$0twF zhkf@+0;0X&iVSG3%Uuj_fpTt5VStG%v;y*ZTVck@C+3F-8yW_~`K#At6x!;#D{}I2 z&U003Fh94VyY@CI7p>e~-dI_Z-skXy>b*NwEtIk=t0Y>!qoO@po|WmV=?b0Wi+ZRi zlwvtx_%j8=?`jwlC+Xiz4wEs35usB-k_b;ek=I5p=6j$-;Ck zrd=@shAoETPH9R-u{|Sh)f=beRRXdhWnPtqyL8;5xg@1Z>gg%y%gZxbMyiUMn>ETI6e$G;&1~k=cC;zWf1hk zqU~uKU*LLOe$~b=mv1OO5A`JX!klAzSyFr2!&p6a!!Xt?>_1l1vK{y^ZECK=pP~8A`Z5pQOV;HO z$D3H8N65qrj@v)1*|0`N%`_O-G3oIl{MgcfXPUsJf&TKV#rn(qc5KIku?x6XhvNT@ z*kSL%WI;BtXsWB8tA7^;EK9MJmFUA2Hi;)CR^#?G_mnAE7}} zn$a7DI{b?shj=e!(zn~p41?0~{31WDJS7YQIZX0^GSK7^gds&oef|=HFSDLcgJ!a-c zEKBOqauZG?X6B0+a`otoIHXo(u2waIIm?x%9uZ4|q0{4T24V;8lBdoS=7Bh!tziFA z-aJIo;_aFjJif1PZcABVMS~ZX5IHBTiuOgE1qB@$jx1NGw5dJIY6;uk9AeGmY27CLIo8C1wMC9XNNmlUF&(F z^7zi7Gg_YWE$axhhMcu9pS6fce5?Gc^MlT!`c6A$djl4iN6><>5}TZX&+>@6kXn4gsIw2XXbk1y z5NgaA=0Rm9%#6!qYF*f4t4GD~2~e4PmAfUta0l>9-ML0(7{Fp3aDE1V3hgS)I`){E zUhRvGjYE-w?lf<2q+`V0ytu0}!(CGyX%FN^ z$~}#K%SF)>ub)0@*Yet&jP9)5wzd0@-~HvOW?%cYBiya(-w5!D$B8pHB1{2`sv7?P>faFL^+v`5_=Fz)fw z`h74w+RTOAwxS58M8gOhpFCfjoVPxWIvjB#UXvybcpah<(vF?Jfr_qy>_Ast+w7{G z_He#?{R!c@-mHUe=ay7Bi=67gT_xeXU?|hq)!>fi1S&KAosEukUsXYAsozyr8>#U$ z^||w^L$imo9KCo@S*RXRnCT7&JlO>}v3w{qUH&+yII}3?&-eH$O0wM<&PXt?th|D} zJQWGATlRoypVGTuYKF)=Q7c6LkT$hirp&D@b$;my`H*4Rm>i2#FI_m&7-qRNq}R@4 ztb*IB4D5o<$er|%dgq>d7Tia zPDV7Po{w=#iMQECJ~zQJ8Sw#=ZB82gGM1XtaHcc0F65ii4U^+E^g|z*$xl!vK>EfV zKcgbDUp#cAQy(DQsw0vz6iYGtr+SD!-rM{2-h1vraxZuf2`ce8>`eE7GX4gwMnB1~ zQgY8enU=nQIfy00yXl~3c6^FR&MU`=W)(EANCVO{^cxQ%LjQ4>(dtYQ3B@IZ2d{b0 zQdb3&YPK1F_%Qpy$NaDZ6@h;;D&mt=X%c%+^BaPnXCJX)+FqXxqSS+fLzr-NAzYLZ zv66SVBdrc4o{6|a()NYQ?>he^bAV}Rbg6<_4RReR@G?A}lJJTUfDyVtappvfB>>h*bW5;;hSMmCk*f)e zAVwevaN(>>5Z)XNV?+ToM@P?w?ICWmc#$fuv65mV?IT5REaoC;6nI&{^q+>K9?<&v zBS2SfcQ$x~9pNHZb!X61UzA=PE-ntbb8<>5id|LC`;GwZOB|Vnb&Gp?7B@Q6)7#SR zS%L2Q`tCrs!*Sl>pa<$5E02~>gBQyJ_g)3A=D)!_0s533W@7||$U#TAuP#K6G9kNx zPE{xsfCR;h#Y&%S#bcy!db;t8F~9xl?Eu~ms$3Ovl`2R4j;fr}KqV-ip{Z1^4wP*& z`Z^9iLmMc4Dn^c{k7O8!qE!)j)QTKJ%k(MQA?}=B#cD}$jUNM9g*mMUl!gXm4Okt6 z0yiKB9xcU|FBP>TdLG~q$q1;T3i-mRAfH})^wDeiS2u5TbRPd+T2vSDmGm@sI-_&S zoduqtC3oeTH7ofyx^Uqr{=Vcb_xY^H9ewn+{QUgvUhpm%ag-I zD>RNWa*`#kZ`$#QGC9KEjVt{}KoC{fNQ8w{awgJJcfzwoOR}i(%u{dSh)*K~218H6 z_rf^!3a4Kg2hHK^SmRzXQ2}2tDUY#9_a%6k!`xI43#4uMt*SxPZmNVhDX;^b@?d%3 zPE0Qk#b{6#e(PU+o{#5@j_FZTj^-_e#tO{Ummw!{w5JmxCiA3DRxEscwE30=b#8b4 z!ki|%EU6!8D3SI?%cV6nI0o?eTbC}oC3felD_7od!^)MfD%c+l*nbn9@0aIurUSbG zX>%HDOwR*u=`fsmXrcfl`HOx(=7D`&YSN#@AK>gzaL&Xtu4fn>oPVlg)KWmeWd}#G zsa!V7=z9<(8>13LO4_xck))JFWy!1(WAaXKB!+!!Xpf8#NcDYnvJE%*wKK!N0Nb6lFq*z zKJY)!t1R>d$|{{@&h(C!!cZBW1JafRT+nrK-W-6G#sZSC0<2r&SErx}$!lvwmL3tgdjYFT2w3>kfV> zhhpEh1OvW|^v3k8)|OZ-=q$-D346-w{P}em1)ltXr`Wmb9Z0{dVgum&DBw#wzFIM< zVMD1N<9xyV22jx9E_Dugh2B?_dZHImUd9&POMqwe~lXmp^~RZ>3~tr@5-9?0=Tz22xN$Gpa3vM%<5e7SRet+SwJZbt{N zwWD1%a2L<^wbvNeAGKrsEx<;n>{Nt%Vv@A4ehXG`%^+dy2x<(GuQ>xMI8Io6SR!{M@R6=BA-Y zL4M_63;4*)%(CV%t{E9+P4_^sD;ndgErsyEbBa}Z|3_@&j;;Xx)Huu8mZL^a`ODC6 zNAdN>9M|L+ZxFX>rKGoOoSEE?DA6A0A6G#B`=oD4qqC&zgpofl>ssFRiY)0ldEVfv z)}qFbU$EAF`~ucE;#D#BYGuN2!E!`nL?^g44;rbXc6i7q`Ei31<}$VL@XQMRuz(MJ zsDuym)kDU{)X{rDi;PVsH=Y*tls@MAz;UffB(Ea*Os#o5V$zM8hz+xQxWR z8K7cWiTjAKY=j8ULmMc1dj#uKfx+(-Cvq-yf?GOrhGqv!P*Z8*K2F~=T2h|qg)dPj zxK#BWljAWWO(Z9T5jikeQKlp2xyVcnFEwc*cJGbx($8Q3P1;tGZZbW#>PfrM=+7A zz%#AtXf$#fa2tUq3OeVZCn|F>1`Zh;B8TK43Kw^M_`!(B3>=~aur>IEDmzb2CiIf= zRMbmzv4|awKZ`OG{Ipr=E?ucrtTNvyM88!Xrz!9GL#dx6D}(?f5Xv#Kx*2EBE&uA9 zwW_OYd8fC$XJvQiicW9riGpY#+!JU&$S~4@8vnG!V_qRs#F*umI2t_LY2>OvJ?kBQhKY}q-c5qAh9D6GYaj1}W zU<84G2|=4N7|Gd^JjQ|ASt2*rUzmI#$1_2o>_d+G9fyIyUjs!@;J8+0DD$4e3uog` z!T%OyzNmj#aW;}MR!5;Gc>+#rf$#?B+Z6`~zV~_03;ox}Rt(8^PH5fzi8?O;O@OLd z{t`IqgPFBbXZaLz(r?@%n7{BR1n+=vSxtB$jq2XbQ@Zx9$jr_wy6wF zRPQlS&Om4@>ixjOc& zEZnes`TREy^vW;AjvhYnOSvX?v!;7XfV;m2JVMeA3n4U(e7A>d*M2q6bOcc{H$Vl| z8_AV?zn;1_sFtPp0{*DjuK=>>V<0IE16Pm`=Z45)hf-MVWKd=;n&J^#+`;7mx;NBnj5g;d+FF@sB@pK;xv<>oMmQC(iw){ z^}J8q$lZI+XE7L3IM4E=G3+B$l zCOqu1?3w+vHEsC`Ek||vGadcukYRRI40SSki-cz{^>}088UCR5)b$cpowR+WJ~*rw z7Icw1VL$HZQ`>!zIOrXCNiGcDEJ-esN)#xBG0C;M$0QjQpg~&A zTfy2d!zhwtA-+BW;F%#^NF97?3@C)wQSZ6AP9EJoq8Bk6`eB1?+Bomx3Qo&AI9I=7^p%PDd^ZX_^*#Y4DAd@RbO3>jl`h*GD64s1x=&HyT8D0@u0eJIwMW<81m&>zOg1VHu`ooz8QSDBd+opFFD z=Rk#?10z4fobwL-#EQ6ae7hC4>p?^lge&45{@&icVC-}9-im>qp7OCPFWonPcH5#W zue@>$s52M1`$zB+5vb1RSn?Q|6uUUkj3MAF*<4D^v&HD!cdx?SRDit6&?tnm{>+(!%E^d(^O^=Y=880*>85^2D8!knVCz? z%++QS_nJ+-!))1|rv1;I=ErU@zp)+0SL*ZIf&VIVpZY53#*GLcj+G}xjA3lz%{cN{ z)epAOfvJUdYbKj7|5)C!q^)&vo5x+U#Z_(hR*y87mDUf0LtVAOoV-AFvp>*PQ{oD@2Li3pU|w#py7luV zJ@w8CPhMwLNu{rBnR~dUeQ>C)v^vObav#>em&hB7dRe7uG5rt1|Pfl^jHCDAa;72`R* zp&2=@(0H!p{}eV*>PYWfYUQa?qfV|yvo#C>9KnaP6-9y2OKqg|9*CkJZUFd6eP35W z`3B_{ROhmRrXf2&<-_j^G=$osAh1!_K@|uaz*q9J()XY^08HxCu)9!aohnzFsJj&JmnZJ~61iHuLloh`4rZ>+$Z0W3 zmuhog;@kbkx6Q@dP(mfAdNrBbYOQJ)$WUYSb=XdE2{$zuHuZ~46t~6fkS?cjjRG%P z#S{T$T);!U7vynx1L{3`I(PuAQuT|rTIH%1U!rU^-mXO{Uh7axgHb=bX@034&)R@q zUB+9FKm=!gYXHys4Qa$}CIz_K%-m-3WLKG)D5UU;IP|Ctx7;V2G-auoxyR%&ZZb2s zn>6WaGqcD1#vC(qote1_Opp4;{W@dAq3g}!RQ#z;&n1YhX3!@dIDr=IQRaNejDvqr zcUG90y=vuhH(1HeEBSj{M-NOyF?pzEi z?Kl{)&yi#Oq`0c4CA9SDwHqy2_Fh|-&^dTpFG#;$B}@) z>LQ<6jdQXb*ei6);KO1Th)x^kSQsNL0QfL4O|MgJzzOKXfmsFM6|}6+nJD4JWT0G- z{*a&4-{Hef>+zSD%~%|#=0rG5@Rjsa=I5e@Y`qAGt3~`I z$mF<4GfnPR%YWGnvpg*T5t|t$Xwj;dzbd@Rpuk~upH6`dxI_QHW?YMK?F90ws9%QG z6gxF+fbB)aUg<{0XH5j_#n?gu+$-Dhf2jTRjM|}NyQ)XZGRylywFC8Kw%7k4SlH@uW5wQ;PdS zXbeyC)M|`OOj|ne;2AzbXDlA3TBOFnG# z9umSjRi4bgxw0u2H_GIVNojSpPz+3`w@{6Q=-yi7ayxUav4-Kg;>zI@yYo8>N*kOR zt_D}P-I10TstD%V^D4uULTiRSAL8Mzu5e#%=?Qj!=hDuR)gA7W*IF`cJvN6Wc8|2$ z9M+yRhuykXE?&AgLoS!Ok=f`x<{aG7;fOU=n8|BDEc-W%=o$HV*S98>jtG2EvP1M1-GDK`m>seZxbvL5!rbMZxgkJM7 zTgfUeLsfbiqL^P>m^1>Rbl7xmLh}^NO_{8gNl^wx4GWc+{CE}0MO3*8&MCvn{vcxn zOsFF5;t#oLJNAy4OPExjOUul3Y+BbeP@duMjSLPsvNEmDJSiP{CHXQO8|%w2$#=+; z6UbatV&CjicPEPkFP8~9yI>o>Z$WB_gwvRy5_noi9345DN4LmgtuIHuCY9d`n0c6P2wvx2~0LDa+2Wm5}aOIjk6N3 zAx_}|^*EFbXux%ZCVJX|Q(L^6`UdTf#8Ls2qKF+LYy6@}ElPZbmwv*uhLV2-EU<#U zBn5q)&QRxX($mTshic0^N^)FHZkTQqSTpXjeJ)`0;#l#r>XMw|5H_Zz`PRUtHhIC( zts~LG412HLky%y~JiaIPRts*}vBKN4JhcJoMI=M=%%8#;B43pgSPi+_-Kp(9DLV-( z*@qY+4qf-pqTn;q>< zLM~b7e0ZjLV|th{r=wMv9yfqn#MH*Qa1yeiqzgynSBq=MqqRlO+R+wXm-*7tasutuk(R`A2&TRjUi*_Zg`LthJ2i4wf3?cQj6z^Lo|W#XeD{z&!}_9I+Ypcx@iWPdn|sk6$$ zZ7qOi2!9w>;2Fi#+SXV{QYDy(wFsA^*c#}p5Zaz(l4iApiIUQ*bA|qaPDy)yM6Pi+ zlr*E4dAdA&7NwN1;8>S%3EOY{12i*wT(GYX2ci;C^GM!TaS zR1wWes|&UEWB`-404E+&IGQ7_qMTPtKzT|GZ96E{1WiR};J1#>Q0c=Ji&6wGy_vWs zbx4MJX%bR~a9HV(5V~5KYUt_=Yj#w@r~=d>aRFqtb};I6Zl}p5@dL*q#cH-iK$E&?f(2bq~kiRP1p4Qx!Xg zsZ_G{sgi7(Z&}p1@!T*jCud@4={IIqqkOP7hvS~q<|xxV^dVKYuT?QTu!#D?cDeWN z!m`}%xvrZ2YEO&X=B_JgX{oI%j+DvO%_m4%-(FT*USLaWN=vKodCM%;Z=*FAfCk?T zy!Szn^I7bf(R1ov5IF#!r^GL*dm$WrXgERvVmy6`_3AL(K3u_)ir=XU7VVL6xUi4q z$)8m!xKOWx4FaXo|3t%~Y_}a+geuQ1ins%jk_<~xqqnEOFw|BtGA}1Q(pggDtf>fB z*F+fD1J;EGnaB|LeEf4 zp&~wl-^KjRs32O(MbjL*SujX~HsmLpr;Sm$zS_ZiFnUmG8b6w>g9NHCh4Q@zsr%9sMl zkv~}eojM;<<=;o130my^kLHA-k3FLNxs&qePE8=L_td3KiGoUVN|ZLb+srA^ZnGUe zBkZZAa>Di%#774rq$VUwfv&xVca`6aqm*xyWa9B?wyyocbQxz zZ&3I4B<^iNxrfxddlUCq?tr?7*ht1VF2HwhR`0^~-?(=n-n~VY<1E!}*^6?YRqeYd zaqmLZcZ<4rvA&0K{v6`eoh^sJK}Q%zkG@!kTNodL`GJHF#G%~e!DhvWa*2#$%!uo` zFs@M~*&+upm-mAGQY*#be4pl)4(I!lEi#tGWQz{w z`@jGy;`G1g`$AtE@RXGn=auF=io>pk=8(U6$2V#h`jgYjW#W6h~pX~?9~K_^Ra*W~ZWma#-(q68@^Z7WlGKI8n-WIvPJ;zN19 zbYp)3B7?;QOcMw(&n(sJgDG30&mKRMt~RFN`M^8qb%g7r!SivlxAPRkLu`mlPv39k zmgWrv+H1ni$k+?Qg-y*tx2LM7t2j{5Xh~~#m)4aPhpo1Hn=KM552xF!0!{5{X{3!e zV*D=zzEKW#nVvJ`@#xz^NsobpppxY7h==5z{t1tlgiLZ>7xRkj)H=)8i^zE zb4gnolVTj!$A8Yx{Xbp5w7)5NI=xf*mpq-_Wa=hz%koOS`8JvFE39tL^;CP>TC>Yr zBZdClXlZedE3X9q$qZ{+o~Od;NUv{lS9=Ra=GDz<@}#A`=qu6|d_IkX* zUQlgUNokSG?kg)UD=#T6TVB)LP~)r4&aEu3s;#c{Rpn$?pXGEFISaj6nPvNm%Cj@e zi`<@4(yT9G&hM6kkT9wJ4TbutyqwmPQ{+PtKRuj|Kh&99Pr>~S4*7C{S7@Mso2!}8GD zW~|c)>W^D^hT$zA2@#Rk#*dQ=g+pEkt2*O347%0xzo$MwAg)L}m-;y@sLc26^7@^a z5vV_qtp7v(e7UOs2AE^=c_{v_Sw9YS<@>AD^BZA-d&u*@rau3S0MDxHhpthz5AHM( zd0qTe_5J~I;Lzu=nomBz0TF@uel@;tv>(sIs@)EGAU=&+4yoV5_tkrV&w= zM~5TwGcbHblq~%mA~rYb&r{>)2X@!X&02DmgEbi=X!y+Y09|@<)1R}(z;e@XM=P@E z7sRt2wf_!vH$Je%dOlFTLElzAD@qkbseyo{3hzWAC8$xeCYo4bDzN%fBN0WJI^=7B z+Bj4+fkPD(dsUeYf;fm*a!40IT^F-nBqENf8@1u9%z$rSkwQ~NTs z1^ftF?7$lgM@Qp(m%2j-8meF6C4}d!y;}97+6Yn1elQ4vDJ;kS4`o7li~R{hs8ol> zQ}S;hJOncTXvwbXOcgrGC!(<{qw>BjT*e#wI-QjTY34E>`|8YCB+{{O-|?1fU7t+4 zWNQPK^?EMrb#{MglhtzHg-`yVvA4JJh8qsW8~CI~H4RdPa26y1WIr&xj5Dr9(QIbmlPIv1TGoGi9alg+i67DAA1H zsVKqc41P-fLQ`CZ5YR5KEZc+6&QU|$jQdNF)3%PsV3NQ@f;Q#?Hs(T2H3afwU`Bz! zj95$f<7)Km4*cPV1IG(n;0j~`H8J9s9*qoQ{(%(gqsg?}EG_;H+W@8*1|ISG(>1a2 z=uh&>qotnevfO;QmzLs+U1Cv|+9evhMcHjWGK+R5Hj+kB%XKB6OqR&MBZNe5PN1{8 zx&vl_fsPtqxENjn;c{Qt1*7b$*j+4u2h~wspw@WcGp+yuNI_BjL-;!G18zV|0%Mv1 zu~eME=u0OW_%R6JlmF+~b3Nge62&AAc-5$<;XbJapOaEh&e(>l7uQ+14&r(Y-dmtb z4`Q&EA!p)<;endekwp^nbgJhH3}XPQ9HnwPN7OOHUf+UyR@{S#7oQ-mFm#RH!4p@s zqjUt%8u9r~g)5BY(P!ikXb{b#c6c$aow%;VwGY?hp+AvsgceQ=ZigOQLv96rK8Y8H zJxbb&9`?wR<%nfC-p=#ZlzD5sdA%KFHQw9~f0@@GC@U}T_y_mpP+obh#~W2IM9cX? zxeq2aK6z*L`s$~`tpVUeYt@3DTwhD1qpGsKGh7+_B5&vVc{|6SxZQokyWCT?h+g?V zRt?iM>hDOa$>=!rNaL3S;IY#ZZZ-%uy~il@&!Xc96*}50jM59Lq3C16$E4r9 z^1v;p8KNlE9%}ja?C*SM_P1rAmDSq?CT?6 z*o(%$ZRtn5^TaN!5&xp)W`p%^){a)?FlGtGMyb5CB2nzQ?h*0-&>m6zX&C$*(k~u? z(fhU84?Q&dYx4fsGP(EbU+;Sa3M)1h*tb}|CI1WU#g2|}W^9lQK!`rG0*tqLs;q`S zt{Yf4I10WeZaI|oDgv7$0NkG8dInFIQcC+vSZ zt`v}D;2o-ZFj%n0)Nzv>k>B4_clSMY_uR|>rT_N2JMOH%{m!~O@2bZ)TEsCJx8EVh zbq2(paS#;Du*T%#Hg)8n5WtW$_}pPF!Kc*e9cT<`M+J2dX7nrMaGL=UIHzeaz(Da4 z0vUj{CFUf#YMkz1W(IN77sub#>Q#38V97-+&Q5S}^K)1A4 zO_uv(*U3$>Wxc&}@3-dMaPu7MwtB^F@@;TO2+G1J^o$;*u?r)BHWOVO&kCBz0Lrz* z84e3SsY4ah4}u?pA4t&r%CcAc|JDaM_KG0rhZn5mFUeDC#3ScjU~tl`*5s+R3yb!N zFHqVRhFi583ldotD|ky=;*O4`#`5W~3#AfMbLyEWm1W$aR!2Xh?TneDe>`Z@n_Yix`5nyaMscIoOfjM|<4I+S3^as*b{jc8 ztEs#tpPh|sC9ZB<8#y)+^h5Uo?M5YLyOY*i?4P#5qpdXc<6OHL(4Boxk%{2Td)gEfWjLa)2pxV{;v zHGbDRc|W-Z{fqfTyvQ(g=$vKtM69gC=Tjy+t%sT=ZJb#)&MZy$^?V{u*%VHZWNYob zf#&tH-BxVVn7#?~35!r~?~^y*Fy~vN-zH5v9yIM2ilzbQlQfO{0pPB}Qm%|R-2op~ zM~!lt+37~t2HaM}Xj)}V0>H&lYrQpnr*3=+b4wVIW14r|L?c(bV@ToGyNuY;vQItfBq zgle^?TL_iXrWVhUYgIXx?qXxQSYs=G^`VY>T!+cU>+_Pe>A*t%r)RA717EX zSD8{P6>F|Vx^lf0*s9eAoJGOb`gdQA%jv6LSX}ANZ)$F7$@f&0s(edxOI}$8 z>B(&PBEErm=zeUhuff&?kf--DV+1is0|S1dX9ZA&EBF&VwOt`0ti56Bmcba|BL%OkzV57&CKyl_ozS={dRwk>R|?srOCS@WW<-$|KfE$OQWG*=WB1Y7)p=0Jhv zy{g&AowB2U#pF;~$*i>tM^5hZ=BCTa#RD}mw%8S_2o>cNIP2$k^e(E+FKk$bsTPg< z<$E|IHpqCgw58<&L!TWkE~Uz%Bbe}QH$aeti4o}m(d$jF!IVp|zuGc0so^0U2&JHc zgWIqbEHIA3FuJap(r_eN7%KACmglWG!3D$VN+-OZ>t?GZ%TrfjSwFGdYVEgL zv&!m&pWN6sTI;l87bZnvyv9<5`2Ja93jmKkC1d28v2h*12gbGlW1r}qA<9km&WMhy z&ht_`97D~aZs?$X>=Gv)SqLLYZqN)+bjmRn%P|WcU0}JhukYi%)=z)D7j3J@*#jS_ zwx#Z2K=**1hQ5uqG(299{E@k*;eh~L1N9Dvk&O6#-2<9N(DvpK%6FuGXeJWP1#RF5 z4eJ!edXoPp8Pp6XPq}tGtz`S0RwVWR{f2xXcJ~{9m0M$-pOIge7xneU&WMfnp^?o1 z`d`r}Ht-72Dzr{*KL{72-8!Nkmjr%B@5=BwJVm%z)eMXTo^ofP8^N(*Ij-A8n$#W| zVf&LkOtnSeda4fQz?IwPGDJ$WhMZZ_*?j-T`|scQgR8H;8Y<9F#V(6ohU=`@_hR3} zbOy+4?H~_LtwTxp-93>mgXf9c5p5_ocfg5I9jgTKn-orqH6wbC zAGk|Sm2wnPnVb}=nL1O|h$Ocb+%8}rsa~dkftt9%Dl2>hLpV>u`itowfAWF6XDYum zSLT-HPg)-OWd49WvtxBz+wq+-=+S^rPPEx+c@i?7?`atiWg+HbNvfeEeQ@vK#cDuX zejRZss;CSOLRUSaD+5mxBje#UeEn#FPOXp&{bxM?VlpKtZDON=Ye~kpmU7}+txHf{ zO&T9j+ha2DtdHv&8A`4(T(T(VYgs+=9 z>eNAxXW*2hwqH}NeSTb`#*%Nj6ukA0q|}9y49-SMS+tEZ##XJOFbql~Q_B^EbXV;d zl?)F*NWe1zWD5#wlCI_9RC-zPOp|<0JKiA(($QgOo`g)#(I^W-@0DL!`^hJDSCo%h zTz-|k+#h4;M+t5)gmzwlnorg3B$Xf?1IDS=lKumoFg|7*iKU4)@(evLJ7mMSN@LM6 z*aBtT_AFWm_CQ<9>&1rJo2mi0tVTNhvY=IVBpP=k+7^q|T^_(ZX4@k1??V^;9#)W_ z)9w{j;UnaZiHGE3s0?7|IWM(!S3ZD5_7-hLJXNm7$SHP#QVPWk&?D9QhNn9IEdWIdk-sh)p3Sx0Kw)lW+rcN)$n) zf6k=o@9Hp_#yb*z59W0{Yxx7jL*5(t1eG0OA)b^!>K4wsd0z9MY9{nmH(xww>)0v~sDua@; za*|9|n#s9M_@l#^MCdR^Byw&0(Jr~swW{NaE0BvFV9qk?za$vEIPmr#_4SYFWKgUD z&)5sRnM%?n+D~df4+iq$dc={@1V>v5S^y==r!u(v(8^*(T+tpP6`k+w3C7qCqRtga zo8u9CGKo13p6M29@01aF`K*`a*&{M`Z3EP@{jurSdt%o%s<8=*4QSu&Bt0TtQ`SOY z(YJ>(cuX&}lOkX(!D7s2SevNz67AE0+4V4R<3z@TaMK+k25Fg<7SgKI%Fw9x)&lr} zx`Pei@X(Hka+XlM@UzIN8jvE3t5p3-o;rC;uUy+@wfsM@v$ZR5Babewa|gdLs7 zv@Vx$Tsx5XI45(61^q2-`<&AtM%BL+n~P zBF}z#))kHNl%Ch+ehoJZ)bl6eq~b4wrx+2!nX(2`K-1akhD@f<(iTCa{)*xvKa5@t zv96NV^hsSn!Zn=D)Y(Q5kF0iUq19)tv36KzTgR-&S=Xn{ zPJ7q(ob46c+qMtv7W+$%ThsSv^k;mS`Do@-nJ;F(micbxM_Kl)!Yp6b-8r}B+?Vrk z&J#J$=KLz>t=x0+O7bf6n)2??U!8w*{$2SGg%1=y z>RjMlwWiG?u*^mx^HveUox*`MQMd6+w(!0r7XA1 zQx-03DeEs=P`0XUP1$7GF7KH4o$??1*7zoUyL{*SrvuxAHNlSH?BH1NxZtxDGZnE= zX6UWT$tq7(xT>Y9ziL6%s;V_rlU2K_&ab*M9EkWLHIZ1fDcT#I7hMrOIr>iY!ntNDTEN1LB&ezEzr=69PvY8h!QY7Mm3wRW|Rv>w&Ey7j@f1#PR^ z*0kN*-qAk0eXRYs_Vw-4?Ps-L+Eb0t&)^)D#e5vz|&i6V$?n>`^ zwtIDVY*ywh*Q|MSV~7*9|;3 zI6ZjQ;KhU24qZO`%399MyEx9ZOwHXD^*xdg0Q`m)^Vd@ug2KeQVj+vYVH0Tp?C8teCZ8*NQzW9$neA za@NY*Rz9;bwrbI;n^wJd^vKa~9&_u?@#g9((n%FC71+)i0dz;}c6x+;@`i zq=!%5KHf6^-rC%?kFM*OD4AHZ{^kwmZg_9wt(&%QikQXFhe` z^o3i;wthJC)or8O_HX-W`+@Br?bv?0{q$w0$9C@Dd0^*lJMY{1;LgW(KDG0Oov-YC zYv-SLt=P41*9V{8_vv@eIQfh}pV@onn`h0Ob;ns>J?n|HUO4NGv)(^D?d+nnE6;8_ zd*tjD=Nxs;$>(f2=bYX9&%O5Cm(Kn3c?-__>Yj={`}VxCw{Y*R=eM1|?}F?Lnl8Bc z!qpePf6<8--FLC;;$0U%c1g=6=j;>v#`fKP>AXvCy7cY+r|*C2GS_8SU-ri3Etj8j z`7>8kU(s>JB<8GN?jjXY|II?G^AM9ElC93e(-BrpI?od;7a939(32@6PZPg$jl3QA zFEjEEI5FI2q~I+-T%;MT7i` zkuMZZ`CHI8nFb|=n33-rdF&S~8;v~nwU)DtJYp#+`y!T46Jg79#(kUcSUxoJb`iEh zRiWy1h+l|4CJpg@|ofX);o-RmZ(eHY~-_%KVal@#IK8m2~@9*23ne$I_g`Rnp*>Fb_N!VPXZh@oBuE%FhaxJTNmozHZ{Q@##|oQ|nV2m}qJu^S|$x*?9HA?cn8d)&dh9?)!2B*?IYh^u@UVbotm5pET39GvtxXEg7t6Sw02^0 z>%_Xiw#ju9(}CgXiSe0D+b06Ufcn(r*1+&^VD_=~Vwv0+ zxn^jR0%8ry24JK%E+%mu#d}kTt$G>)P6ZGicr*S5QtH~OeoY`=@C5E|N4gFrhw=7l z_}(PGIHg*!4o{ZhZv*TLH{EIr$J*4Kf2i4nvU(=Wgjeuxs`?lf^XJ5T)VjCn3NeZ6DulV7L!>p z#mW|QWsZ1T=8AbTPkag^H7&Nvd|4n1rBloo3uKWj7Jrj2SpSw_B`lR5Stb@qulTtv z2OMVrvmFQ#;+Fv#lohb%3&~0`CaYvvMqr2hx~!H_StDz4pzu;zC+lT{I9)c%CfSVH z^=0u{7$xr%pB86`Gi3`-6>pR6vO{)aEZ;?7@s+YmcFS3S_Q&EP*@N}@cd%198gVfO z(UQ8`!6!$=(`=fkdJwRlG^5Rbt6`vkd2{9Y~=m2ym6 zj!4!&6yFDw@0UyDQF5tVCf35gb_F!NVc^9la;1pNRnYbS0jJ0vBdX=G;zz)iABd;q zaq@V0=biw%StC!BCy5W`$#NWV25J%5Z5{lp>*RWH7e9s%>oanL+z9Q{De_dg8D0#a zopMr6VI*IJx9O+kwA_kuZI&}~o7^te%N_D`(6cYWN91|&toSJ~j!&46P*Z8HpQQic* z`rjgk!Y$%g@>cO{`C0KBd7Hdl-XZT4ugbf`EAn%Y%H)Z1xK(^!-i=e@^W{C_0r3@i zFXl=bPQ$JM{{@!?@dVB?cu+hEKijX0N5!`hwEtf4c-i7aaWW_bRb2z(B=HvbvJk9T z&J~Y~9Qk>12~5@Z$@>ro`)2tCSi+FED}o@L;f6{e4)ZqJPftwBk~*ao7i1HD!(lsli!h#%kRo3!%_}W}2Zp5s-MgBtm681H}maoX)$XDfW?+Q-*SPi&uXjGs2Xc6w^kKE8Gwm(1~X zQ#0dh!92`3#wW(tZkw4%9|vE=B3WzKZkk@Z?X>lqCr-~?nS*d-4F0>(0D0>5$ka69hw2f=Vr?WPul;5a7xk-OAYg0qw zMf;|iO`F$E*f;4`Y%)5zNxfj%bV@o(Zl2h>^^~krQtCTZJ1`)1W<`({-xZ8Iv#-keg{Ix)GyKDl9feEWobQWu?6MYATyw@huFnV#CRaUy#% zvZ#!-C__mp>sjZvGw{Fx`Pa7BA=;_p2x2i{3 zTa$gu-kS0}Z3d9E&*&FtQXVKIY3^usY%@l2n+D@H-O6o7E4QgPZQG{7r{`=tsDV3@ zpUm2s%sX}(ukKPU%iNXdpkv7R)R6whkWp|*Lt-eU;2iaC`p_I*Bx^WXf97zaoP9*S zi3`!vF~_KWj;`K#*FHyAKPUOxTn)3i$x7{Wb)mV5LfLaufR#3n_&6`6{5)0OG2i&) zd=0$$`pff;j?LGV&QDZonZF=wK}szPRe|hhkb(=PC9%nvx%f$4i zsdXgOXy!Uqx@l;HS8Rt>EiKK>omt#dV=u^^t$Nnn+>thC+w@e}SenbXCxR10)ITjh1xt(k0(zMr`s4N`S&&0^Llk*ykK{IHEoY@Qi+j89Kb z?bwDn!0WoH9g{k@ZOb|%w|QdyOs0COgf#l`8Z;|c-JG17p4m7tzI8_b+&Z=Gu%A07 z%%`d_e=0m|ADWXfzIoGz$|JHFkpBsD^(OYMg~Oa~;*oEn`G!MuFUswh{4Ch}PcX12{bk&S13CC9K zpc===H_u3~N-I@br_wf+_NsJ*C?FT9beT$zQR#^)U8mAhHczeHEVrn1yGqYc>A5Ps zaB6zpq};F4YgKx)O7BwX{VIKME9SO*RHaX-^eL4-tI`)$`m3#5n>yrcDt$|(@2d2D zm43w3BDQW@v(;i(X|_rWRa&A_pGqq+dA3?=RNAD{4wd$*bhb+8VLZ9FVVK1{D`}OVEi=K}+@m~5O%oSd*)xWXVQTI_!UpE`qQ;e&YG0VjB zb;kWQ3SQED-$5IH)ay8)pF3`YQP%<7+bT{MA4@f3;sIGDVB?^F6)oeGSk+louBqZ+8eel_ON}O{W1Hi4up`v z46H=&yRgq&gub5)Ny7|w@O$K!L>hL-Tky}!?M~z_F><>TPj@4Ng)X-ndsUsgB=Pi; z#M4Xg^ox*dux5STZCoz_<@m?rupfKEo5fw&<=?8_p2i-QwQQBQsq2iqU0t_H$k1_r zJ9f6bo^F&s&nUmgD8JVzf4))v0;BvzM)^yP^81bQml@?RH_BgOl;;si2sdcr5cbl# zRi86jqkr$g{+jpCH=ge|eqRpU<++lTpnz@I&yQdXR$%|lvNPC$^STXta9&S0?(a43 zpKsj1$hd!*asP7T{#C#ax@MJN|E=rM*Yl0vmmkvd`&6mz*q`gK>E9O^zc0e>o%gRW zekW_c-zcxI7hwm_a##Hav;KowdOjPN^B>Im56$}jJI%7l6NN>|c%@v8HJLnZ8l=4z zaSZMsh0|Dn3Mt~#kR|>Evc+d1PyDfb?%%zK8pvsMnX9|>Le?IT6|xfY^=in~>mf^T zhQz$<->y+&rDi-QoTyuYl>psYqU%>TJNSL3-b-&yrpU3qw zxmW%K*UPagJ%j5NkUBq$>y?l_{|wiwHj` z0h@O78?p>`@qTC_LeM@$pmnH22(~8Z6FN~^$;#1sLr#wNrAWuok1NsktI?X5<$wPB zzY_vLI)zOZ)jj?yw7n@lOy@2%JstyBl@b30IF*GI+6koDA_pl>&qbOm^5P%UAsuPH zC_oCI9i*@ViT|CN38c_YAcckkDYO*vkEp3Y3T*{aXe^LIYZ3n&H5W*|q8usoCrEvW z`t>1pyFsJ@QGqmwIA0%PmR8392m9qJq?NF$`ycFwBS^!D!u0|6yHTXoq6TSH)FQ1B zb@9Jq$6SxJPBb8`7mY}vLyW%<-BUBtCeeZvdVZuWqCNf>=$1N=wuw%p?V<~5hv<&~ z8NRNwkame4q}_|@T6UcbRJI7c^A6I#Yh*xOXp8wp;&@+kvIzJVzCtI zm{=Bn2l~Y2NRJXLkS-M~kuDRf;(vs;@Mxqf#4$)$ier(k634~ghI91sNRJV#ksd2f zKzf`wDgFm&22V!1T8tw-L99V~qF5V$3tFgkNKY0MNXNx`q-(^6`0t@T-iUOa*o1UK zoPu<{I5qwzbab1MZWN~>g`ES^Q^ZvKchI_SLAn_yLHrID0nsEd*A5tks{EA}BhUtAi01vDR=gNFNm6jz0&z zM*6DwBhufBcaXj&{uKYdcwM}U^bPS}NPj2ZL;9xpbNqYa_u?-|-xBX5{e$=`(znG2 z@h8O}#s46EM|_C%PvUP#-xVLlpMduC??~ShA0z#5@d?sDi&*@-;x7>8eHZ#yf%LCZ zBK<&G;*W!Kup<3XrXl^Cv?2XSI^y4f?mHdn$1(%yCo&T$tQq2uL2I9l^glHHKQ#S6 RH2ps`{XaDQ{~nqy{tt~3IX(aY literal 0 HcmV?d00001 diff --git a/gui/gui.go b/gui/gui.go index ee99ddd..c14f3c1 100644 --- a/gui/gui.go +++ b/gui/gui.go @@ -1,3 +1,185 @@ package gui +import ( + "fmt" + "os" + "runtime" + "github.com/4ydx/gltext" + v41 "github.com/4ydx/gltext/v4.1" + "github.com/go-gl/gl/v4.1-core/gl" + "github.com/go-gl/glfw/v3.2/glfw" + "github.com/go-gl/mathgl/mgl32" + "gitlab.com/liamg/terminal/config" + "go.uber.org/zap" + "golang.org/x/image/math/fixed" +) + +type GUI struct { + window *glfw.Window + logger *zap.SugaredLogger + config config.Config + font *v41.Font + width int + height int +} + +func New(config config.Config, logger *zap.SugaredLogger) *GUI { + + //logger. + return &GUI{ + config: config, + logger: logger, + width: 600, + height: 300, + } +} + +// inspired by https://kylewbanks.com/blog/tutorial-opengl-with-golang-part-1-hello-opengl + +func (gui *GUI) SetSize(w int, h int) { + gui.window.SetSize(w, h) + gui.resize(gui.window, w, h) +} + +func (gui *GUI) resize(w *glfw.Window, width int, height int) { + gui.width = width + gui.height = height + if gui.font != nil { + gui.font.ResizeWindow(float32(width), float32(height)) + } + gl.Viewport(0, 0, int32(width), int32(height)) +} + +func (gui *GUI) getTermSize() (int, int) { + scaleMin, scaleMax := float32(1.0), float32(1.1) + text := v41.NewText(gui.font, scaleMin, scaleMax) + text.SetString("A") + return gui.width / int(text.Width()), gui.height / int(text.Height()) +} + +func (gui *GUI) Render() error { + + gui.logger.Debugf("Locking OS thread...") + runtime.LockOSThread() + + gui.logger.Debugf("Creating window...") + var err error + gui.window, err = gui.createWindow(gui.width, gui.height) + if err != nil { + return fmt.Errorf("Failed to create window: %s", err) + } + defer glfw.Terminate() + + gui.logger.Debugf("Initialising OpenGL and creating program...") + program, err := gui.createProgram() + if err != nil { + return fmt.Errorf("Failed to initialise OpenGL: %s", err) + } + + gui.logger.Debugf("Loading font...") + //gui.font, err = gui.loadFont("/usr/share/fonts/nerd-fonts-complete/ttf/Roboto Mono Nerd Font Complete.ttf", 12) + if err := gui.loadFont("./fonts/CamingoCode-Regular.ttf", 12); err != nil { + return fmt.Errorf("Failed to load font: %s", err) + } + + gui.resize(gui.window, gui.width, gui.height) + + gui.window.SetFramebufferSizeCallback(gui.resize) + w, h := gui.window.GetFramebufferSize() + gl.Viewport(0, 0, int32(w), int32(h)) + + scaleMin, scaleMax := float32(1.0), float32(1.1) + text := v41.NewText(gui.font, scaleMin, scaleMax) + text.SetString("hello") + text.SetColor(mgl32.Vec3{1, 1, 1}) + text.SetPosition(mgl32.Vec2{-float32(gui.width) / 2, -float32(gui.height) / 2}) + text.SetPosition(mgl32.Vec2{0, 0}) + + //gl.Disable(gl.MULTISAMPLE) + // stop smoothing fonts + gl.TexParameterf(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST) + + gui.logger.Debugf("Starting render...") + for !gui.window.ShouldClose() { + + gl.UseProgram(program) + gl.Clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT) + + // Render the string. + + text.Draw() + + glfw.PollEvents() + gui.window.SwapBuffers() + + } + + gui.logger.Debugf("Stopping render...") + return nil + +} + +func (gui *GUI) loadFont(path string, scale int32) error { + + fd, err := os.Open(path) + if err != nil { + return err + } + defer fd.Close() + + runeRanges := make(gltext.RuneRanges, 0) + runeRanges = append(runeRanges, gltext.RuneRange{Low: 32, High: 127}) + /*runeRanges = append(runeRanges, gltext.RuneRange{Low: 0x3000, High: 0x3030}) + runeRanges = append(runeRanges, gltext.RuneRange{Low: 0x3040, High: 0x309f}) + runeRanges = append(runeRanges, gltext.RuneRange{Low: 0x30a0, High: 0x30ff}) + runeRanges = append(runeRanges, gltext.RuneRange{Low: 0x4e00, High: 0x9faf}) + runeRanges = append(runeRanges, gltext.RuneRange{Low: 0xff00, High: 0xffef}) + */ + + runesPerRow := fixed.Int26_6(128) + conf, err := gltext.NewTruetypeFontConfig(fd, fixed.Int26_6(scale), runeRanges, runesPerRow) + if err != nil { + return err + } + + font, err := v41.NewFont(conf) + if err != nil { + return err + } + font.ResizeWindow(float32(gui.width), float32(gui.height)) + gui.font = font + return nil +} + +func (gui *GUI) createWindow(width int, height int) (*glfw.Window, error) { + if err := glfw.Init(); err != nil { + return nil, err + } + + glfw.WindowHint(glfw.Resizable, glfw.True) + glfw.WindowHint(glfw.ContextVersionMajor, 4) // OR 2 + glfw.WindowHint(glfw.ContextVersionMinor, 1) + glfw.WindowHint(glfw.OpenGLProfile, glfw.OpenGLCoreProfile) + glfw.WindowHint(glfw.OpenGLForwardCompatible, glfw.True) + + window, err := glfw.CreateWindow(width, height, "Terminal", nil, nil) + if err != nil { + return nil, err + } + window.MakeContextCurrent() + + return window, nil +} + +// initOpenGL initializes OpenGL and returns an intiialized program. +func (gui *GUI) createProgram() (uint32, error) { + if err := gl.Init(); err != nil { + return 0, fmt.Errorf("Failed to initialise OpenGL: %s", err) + } + gui.logger.Infof("OpenGL version %s", gl.GoStr(gl.GetString(gl.VERSION))) + + prog := gl.CreateProgram() + gl.LinkProgram(prog) + return prog, nil +} diff --git a/main.go b/main.go index 842d68c..02ee5d6 100644 --- a/main.go +++ b/main.go @@ -1,21 +1,48 @@ package main import ( - "io" + "fmt" "os" - "gitlab.com/liamg/terminal/pty" + "gitlab.com/liamg/terminal/config" + "gitlab.com/liamg/terminal/gui" + "go.uber.org/zap" ) func main() { - pty, err := pty.NewPtyWithShell() + // parse this + conf := config.Config{DebugMode: true} + + var logger *zap.Logger + var err error + if conf.DebugMode { + logger, err = zap.NewDevelopment() + } else { + logger, err = zap.NewProduction() + } if err != nil { - panic(err) + fmt.Printf("Failed to create logger: %s", err) + os.Exit(1) + } + sugaredLogger := logger.Sugar() + defer sugaredLogger.Sync() + + /* + sugaredLogger.Infof("Allocationg pty...") + pty, err := pty.NewPtyWithShell() + if err != nil { + panic(err) + } + */ + + g := gui.New(conf, sugaredLogger) + if err := g.Render(); err != nil { + sugaredLogger.Fatalf("Render error: %s", err) } - go io.Copy(pty, os.Stdin) - io.Copy(os.Stdout, pty) + //go io.Copy(pty, os.Stdin) + //io.Copy(os.Stdout, pty) // return pty, err } diff --git a/vendor/github.com/4ydx/gltext/.gitignore b/vendor/github.com/4ydx/gltext/.gitignore new file mode 100644 index 0000000..6351454 --- /dev/null +++ b/vendor/github.com/4ydx/gltext/.gitignore @@ -0,0 +1,2 @@ +tags +fontconfigs diff --git a/vendor/github.com/4ydx/gltext/CONTRIBUTORS b/vendor/github.com/4ydx/gltext/CONTRIBUTORS new file mode 100644 index 0000000..34612a6 --- /dev/null +++ b/vendor/github.com/4ydx/gltext/CONTRIBUTORS @@ -0,0 +1,13 @@ +# This is the list of people who can contribute (or have contributed) to this +# project. This includes code, documentation, testing, content creation and +# bugfixes. +# +# Names should be added to this file like so: +# Name [] +# +# Please keep the list sorted. + +André Moraes +Jim Teeuwen +Nathan Findley +Tim Howard diff --git a/vendor/github.com/4ydx/gltext/LICENSE b/vendor/github.com/4ydx/gltext/LICENSE new file mode 100644 index 0000000..23e6ea8 --- /dev/null +++ b/vendor/github.com/4ydx/gltext/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 The go-gl Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of go-gl nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/4ydx/gltext/README.md b/vendor/github.com/4ydx/gltext/README.md new file mode 100644 index 0000000..aa98123 --- /dev/null +++ b/vendor/github.com/4ydx/gltext/README.md @@ -0,0 +1,35 @@ +## Modern opengl text rendering + +A simple package for rendering a string using modern opengl. Based on the bounding +box of a string, positioning of the string on screen prior to rendering is possible. +There do seem to be issues with the dimensions reported by freetype-go unfortunately. + +- Unicode support. +- Dynamic text zooming along the z-axis. +- Dynamic text positioning within the orthographic projection space. +- Dynamic color changes. + +Unicode support is based on the underlying truetype font being used (or bitmap). + +![Alt text](/example/example.png?raw=true "Simple Screenshot") + +### Install + +* go get github.com/4ydx/gltext + +### Example + +* Provided using Japanese text. + +### Dependencies + +This packages uses [freetype-go](https://github.com/golang/freetype) which is licensed +under GPLv2 and FTL licenses. You can choose which one is a better fit for your +use case but FTL requires you to give some form of credit to Freetype.org + +### License + +Copyright 2012 The go-gl Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. + diff --git a/vendor/github.com/4ydx/gltext/charset.go b/vendor/github.com/4ydx/gltext/charset.go new file mode 100644 index 0000000..3149726 --- /dev/null +++ b/vendor/github.com/4ydx/gltext/charset.go @@ -0,0 +1,90 @@ +// Copyright 2012 The go-gl Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package gltext + +// A Glyph describes metrics for a single font glyph. +// These indicate which area of a given image contains the +// glyph data and how the glyph should be spaced in a rendered string. +type Point struct { + X float32 + Y float32 +} + +type Glyph struct { + X int `json:"x"` // The x location of the glyph on a sprite sheet. + Y int `json:"y"` // The y location of the glyph on a sprite sheet. + Width int `json:"width"` // The width of the glyph on a sprite sheet. + Height int `json:"height"` // The height of the glyph on a sprite sheet. + + // Advance determines the distance to the next glyph. + // This is used to properly align non-monospaced fonts. + Advance int `json:"advance"` +} + +func (g *Glyph) GetTexturePositions(font FontLike) (tP1, tP2 Point) { + // Quad width/height + + // Originally the ttf width value was being used. This, however, differs from the Advance value. + // This has been changed to advance so that the resulting quads that are generated for text to not + // overlap one another. + vw := float32(g.Advance) + + vh := float32(g.Height) + + // Unfortunately with the current font, if I don't add a small offset to the Y axis location + // the bottom edge of the character above might appear. + // + // EG: + // Wrapping 16 characters per line: + // runesPerRow := fixed.Int26_6(16) + // runeRanges := make(gltext.RuneRanges, 0) + // runeRange := gltext.RuneRange{Low: 1, High: 128} + // runeRanges = append(runeRanges, runeRange) + // + // The resulting image file will place "g" above "w". The very bottom edge of "g" will show up + // when using the "w" character in a line of text. So the dirty hack is to remove just a bit of + // the original top as per below. This is not ideal. Either I am not understanding something + // about the glyph layout or this will have to be tweaked based on the font being used. + // See the file example_image.png. + + // texture point 1 + tP1 = Point{X: float32(g.X) / font.GetTextureWidth(), Y: float32(g.Y) / font.GetTextureHeight()} + + // texture point 2 + tP2 = Point{X: (float32(g.X) + vw) / font.GetTextureWidth(), Y: (float32(g.Y) + vh) / font.GetTextureHeight()} + + return +} + +// A Charset represents a set of glyph descriptors for a font. +// Each glyph descriptor holds glyph metrics which are used to +// properly align the given glyph in the resulting rendered string. +type Charset []Glyph + +// Scale scales all glyphs by the given factor and repositions them +// appropriately. A scale of 1 retains the original size. A scale of 2 +// doubles the size of each glyph, etc. +// +// This is useful when the accompanying sprite sheet is scaled by the +// same factor. In this case, we want the glyph data to match up with the +// new image. +func (c Charset) Scale(factor int) { + if factor <= 1 { + // A factor of zero results in zero-sized glyphs and + // is therefore not valid. A factor of 1 does not change + // the glyphs, so we can ignore it. + return + } + + // Multiply each glyph field by the given factor + // to scale them up to the new size. + for i := range c { + c[i].X *= factor + c[i].Y *= factor + c[i].Width *= factor + c[i].Height *= factor + c[i].Advance *= factor + } +} diff --git a/vendor/github.com/4ydx/gltext/debug.go b/vendor/github.com/4ydx/gltext/debug.go new file mode 100644 index 0000000..4ddd1fd --- /dev/null +++ b/vendor/github.com/4ydx/gltext/debug.go @@ -0,0 +1,60 @@ +package gltext + +import ( + "fmt" + "runtime" +) + +var IsDebug = false + +func DebugPrefix() string { + _, fn, line, _ := runtime.Caller(1) + return fmt.Sprintf("DB: [%s:%d]", fn, line) +} + +func TextDebug(message string) { + if IsDebug { + pc, fn, line, _ := runtime.Caller(1) + fmt.Printf("[error] in %s[%s:%d] %s", runtime.FuncForPC(pc).Name(), fn, line, message) + } +} + +// PrintVBO prints the individual index locations as well as the texture locations +// +// (0,0) (x1,y1): This shows the layout of the runes. There relative locations to one another can be seen here. +// - If called just after makeBufferData, the left-most x value will start at 0. +// - If called after centerTheData, all indices will have been shifted so that the entire text value is +// centered around the screen's origin of (0,0). +// +// (U,V) (u1,v1) -> (x,y): The (x,y) values refer to pixel locations within the texture +// - Open the texture in an image editor and, using the upper left hand corner as (0,0) +// move to the location (x,y). This is where opengl will pinpoint your rune within the image. +func PrintVBO(vbo []float32, w, h float32) { + if len(vbo)%4 != 0 { + fmt.Println("VBO appears to have an incorrect size. Should be a multiple of 4.") + } + // drawing a quad take 16 floats: (2 x,y + 2 u,v) * 4 indices + for i := 0; i < len(vbo); i += 16 { + fmt.Println("Quad") + at := i + fmt.Printf( + "(0,0) (%.2f,%.2f); (U,V) (%f,%f) -> (%f,%f)\n", + vbo[at], vbo[at+1], vbo[at+2], vbo[at+3], vbo[at+2]*w, vbo[at+3]*h, + ) + at += 4 + fmt.Printf( + "(1,0) (%.2f,%.2f); (U,V) (%f,%f) -> (%f,%f)\n", + vbo[at], vbo[at+1], vbo[at+2], vbo[at+3], vbo[at+2]*w, vbo[at+3]*h, + ) + at += 4 + fmt.Printf( + "(1,1) (%.2f,%.2f); (U,V) (%f,%f) -> (%f,%f)\n", + vbo[at], vbo[at+1], vbo[at+2], vbo[at+3], vbo[at+2]*w, vbo[at+3]*h, + ) + at += 4 + fmt.Printf( + "(0,1) (%.2f,%.2f); (U,V) (%f,%f) -> (%f,%f)\n", + vbo[at], vbo[at+1], vbo[at+2], vbo[at+3], vbo[at+2]*w, vbo[at+3]*h, + ) + } +} diff --git a/vendor/github.com/4ydx/gltext/example/font/COPYING b/vendor/github.com/4ydx/gltext/example/font/COPYING new file mode 100644 index 0000000..78c6065 --- /dev/null +++ b/vendor/github.com/4ydx/gltext/example/font/COPYING @@ -0,0 +1,42 @@ +Luxi fonts copyright (c) 2001 by Bigelow & Holmes Inc. Luxi font +instruction code copyright (c) 2001 by URW++ GmbH. All Rights +Reserved. Luxi is a registered trademark of Bigelow & Holmes Inc. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of these Fonts and associated documentation files (the "Font +Software"), to deal in the Font Software, including without +limitation the rights to use, copy, merge, publish, distribute, +sublicense, and/or sell copies of the Font Software, and to permit +persons to whom the Font Software is furnished to do so, subject to +the following conditions: + +The above copyright and trademark notices and this permission notice +shall be included in all copies of one or more of the Font Software. + +The Font Software may not be modified, altered, or added to, and in +particular the designs of glyphs or characters in the Fonts may not +be modified nor may additional glyphs or characters be added to the +Fonts. This License becomes null and void when the Fonts or Font +Software have been modified. + +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL +BIGELOW & HOLMES INC. OR URW++ GMBH. BE LIABLE FOR ANY CLAIM, DAMAGES +OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, +INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR +INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT +SOFTWARE. + +Except as contained in this notice, the names of Bigelow & Holmes +Inc. and URW++ GmbH. shall not be used in advertising or otherwise to +promote the sale, use or other dealings in this Font Software without +prior written authorization from Bigelow & Holmes Inc. and URW++ GmbH. + +For further information, contact: + +info@urwpp.de +or +design@bigelowandholmes.com diff --git a/vendor/github.com/4ydx/gltext/fontconfig.go b/vendor/github.com/4ydx/gltext/fontconfig.go new file mode 100644 index 0000000..99a892a --- /dev/null +++ b/vendor/github.com/4ydx/gltext/fontconfig.go @@ -0,0 +1,109 @@ +// Copyright 2012 The go-gl Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package gltext + +import ( + "bufio" + "encoding/json" + "errors" + "fmt" + "image" + "image/png" + "io/ioutil" + "os" + "time" +) + +// Direction represents the direction in which strings should be rendered. +type Direction uint8 + +// FontConfig describes raster font metadata. +// +// It can be loaded from, or saved to a JSON encoded file, +// which should come with any bitmap font image. +type FontConfig struct { + // The range of glyphs covered by this fontconfig + // An array of Low, High values allowing the user to select disjoint subsets of the ttf + RuneRanges RuneRanges + + // Glyphs holds a set of glyph descriptors, defining the location, + // size and advance of each glyph in the sprite sheet. + Glyphs Charset + + Image *image.NRGBA `json:"-"` + + Name string +} + +// Load reads font configuration data from the given JSON encoded stream. +func (fc *FontConfig) Load(rootPath string) (err error) { + file := fmt.Sprintf("%s/%s.config", rootPath, fc.Name) + data, err := ioutil.ReadFile(file) + if err != nil { + return + } + err = json.Unmarshal(data, fc) + if err != nil { + return err + } + fmt.Printf("%+v\n", time.Now()) + fc.Image, err = LoadFontImage(rootPath, fc.Name) + if err != nil { + return err + } + fmt.Printf("%+v\n", time.Now()) + fc.Glyphs.Scale(1) + return nil +} + +// Save writes font configuration data to the given stream as JSON data. +func (fc *FontConfig) Save(rootPath string) error { + if _, err := os.Stat(rootPath); err != nil { + if os.IsNotExist(err) { + os.MkdirAll(rootPath, os.ModeDir|os.ModePerm) + } else { + return err + } + } + data, err := json.Marshal(fc) + if err != nil { + return err + } + file := fmt.Sprintf("%s/%s.config", rootPath, fc.Name) + err = ioutil.WriteFile(file, data, os.ModePerm) + if err != nil { + return err + } + if fc.Image == nil { + return errors.New("Should not be nil.") + } + err = SaveImage(rootPath, fc.Name, fc.Image) + if err != nil { + return err + } + err = ioutil.WriteFile(file, data, os.ModePerm) + return err +} + +func LoadFontImage(rootPath, name string) (*image.NRGBA, error) { + file := fmt.Sprintf("%s/%s.png", rootPath, name) + return LoadImage(file) +} + +func SaveImage(rootPath, name string, img *image.NRGBA) error { + file := fmt.Sprintf("%s/%s.png", rootPath, name) + image, err := os.Create(file) + if err != nil { + return err + } + defer image.Close() + + b := bufio.NewWriter(image) + err = png.Encode(b, img) + if err != nil { + return err + } + return b.Flush() +} diff --git a/vendor/github.com/4ydx/gltext/fontlike.go b/vendor/github.com/4ydx/gltext/fontlike.go new file mode 100644 index 0000000..2338122 --- /dev/null +++ b/vendor/github.com/4ydx/gltext/fontlike.go @@ -0,0 +1,10 @@ +// Copyright 2012 The go-gl Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package gltext + +type FontLike interface { + GetTextureWidth() float32 + GetTextureHeight() float32 +} diff --git a/vendor/github.com/4ydx/gltext/misc.go b/vendor/github.com/4ydx/gltext/misc.go new file mode 100644 index 0000000..c218a02 --- /dev/null +++ b/vendor/github.com/4ydx/gltext/misc.go @@ -0,0 +1,112 @@ +// Copyright 2012 The go-gl Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package gltext + +import ( + "errors" + "fmt" + "image" + "image/color" + "os" +) + +// Pow2 returns the first power-of-two value >= to n. +// This can be used to create suitable texture dimensions. +func Pow2(x uint32) uint32 { + x-- + x |= x >> 1 + x |= x >> 2 + x |= x >> 4 + x |= x >> 8 + x |= x >> 16 + return x + 1 +} + +// IsPow2 returns true if the given value is a power-of-two. +func IsPow2(x uint32) bool { return (x & (x - 1)) == 0 } + +// Pow2Image returns the given image, scaled to the smallest power-of-two +// dimensions larger or equal to the input dimensions. +// It preserves the image format and contents. +// +// This is useful if an image is to be used as an OpenGL texture. +// These often require image data to have power-of-two dimensions. +func Pow2Image(src image.Image) image.Image { + sb := src.Bounds() + w, h := uint32(sb.Dx()), uint32(sb.Dy()) + + if IsPow2(w) && IsPow2(h) { + return src // Nothing to do. + } + + rect := image.Rect(0, 0, int(Pow2(w)), int(Pow2(h))) + + switch src := src.(type) { + case *image.Alpha: + return copyImg(src, image.NewAlpha(rect)) + + case *image.Alpha16: + return copyImg(src, image.NewAlpha16(rect)) + + case *image.Gray: + return copyImg(src, image.NewGray(rect)) + + case *image.Gray16: + return copyImg(src, image.NewGray16(rect)) + + case *image.NRGBA: + return copyImg(src, image.NewNRGBA(rect)) + + case *image.NRGBA64: + return copyImg(src, image.NewNRGBA64(rect)) + + case *image.Paletted: + return copyImg(src, image.NewPaletted(rect, src.Palette)) + + case *image.RGBA: + return copyImg(src, image.NewRGBA(rect)) + + case *image.RGBA64: + return copyImg(src, image.NewRGBA64(rect)) + } + + panic(fmt.Sprintf("Unsupported image format: %T", src)) +} + +// Why the image.Image interface does not support this, +// I can never understand. +type copyable interface { + image.Image + Set(x, y int, clr color.Color) +} + +func copyImg(src, dst copyable) image.Image { + var x, y int + sb := src.Bounds() + + for y = 0; y < sb.Dy(); y++ { + for x = 0; x < sb.Dx(); x++ { + dst.Set(x, y, src.At(x, y)) + } + } + + return dst +} + +func LoadImage(path string) (*image.NRGBA, error) { + img, err := os.Open(path) + if err != nil { + return nil, err + } + pix, _, err := image.Decode(img) + if err != nil { + return nil, err + } + p, ok := pix.(*image.NRGBA) + if ok { + return p, nil + } + return nil, errors.New("Not a NRGBA image.") +} diff --git a/vendor/github.com/4ydx/gltext/truetype.go b/vendor/github.com/4ydx/gltext/truetype.go new file mode 100644 index 0000000..5b8c898 --- /dev/null +++ b/vendor/github.com/4ydx/gltext/truetype.go @@ -0,0 +1,163 @@ +// Copyright 2012 The go-gl Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package gltext + +import ( + "errors" + "github.com/golang/freetype" + "github.com/golang/freetype/truetype" + "golang.org/x/image/math/fixed" + "image" + "image/draw" + "io" + "io/ioutil" + "sort" +) + +// RuneRanges specify the rune ranges for ordered disjoint subsets of the ttf +// EG 32 - 127, 5000 - 6000 will created a more compact bitmap that holds the +// specified ranges of runes. +type RuneRange struct { + Low, High rune +} + +type RuneRanges []RuneRange + +func (rr RuneRanges) Len() int { return len(rr) } +func (rr RuneRanges) Swap(i, j int) { rr[i], rr[j] = rr[j], rr[i] } +func (rr RuneRanges) Less(i, j int) bool { return rr[i].Low < rr[j].Low } + +func (rr RuneRanges) Validate() bool { + sort.Sort(rr) + previousMax := rune(0) + for _, r := range rr { + if r.Low <= previousMax { + return false + } + if r.Low > r.High { + return false + } + previousMax = r.High + } + return true +} + +// GetGlyphIndex returns the location of the glyph data within +// the compressed rune ranges covered by the font +// EG if runes 0-25, 100-110 are supported by the font then +// the actual location of 100 will be in position 26 in the png image +func (rr RuneRanges) GetGlyphIndex(char rune) rune { + var index, offset rune + index = -1 + for _, runes := range rr { + if char >= runes.Low && char <= runes.High { + index = char - runes.Low + offset + } + offset += runes.High - runes.Low + 1 + } + return index +} + +// http://www.freetype.org/freetype2/docs/tutorial/step2.html + +// LoadTruetype loads a truetype font from the given stream and +// applies the given font scale in points. +// +// The low and high values determine the lower and upper rune limits +// we should load for this font. For standard ASCII this would be: 32, 127. +func NewTruetypeFontConfig(r io.Reader, scale fixed.Int26_6, runeRanges RuneRanges, runesPerRow fixed.Int26_6) (*FontConfig, error) { + if !runeRanges.Validate() { + return nil, errors.New("Invalid rune ranges supplied.") + } + + data, err := ioutil.ReadAll(r) + if err != nil { + return nil, err + } + + // Read the truetype font. + ttf, err := truetype.Parse(data) + if err != nil { + return nil, err + } + + // Create our FontConfig type. + fc := &FontConfig{} + length := rune(0) + for _, r := range runeRanges { + length += r.High - r.Low + 1 + } + fc.RuneRanges = runeRanges + fc.Glyphs = make(Charset, int(length)) + + // Create an image, large enough to store all requested glyphs. + // The resulting image is set to power of 2 dimensions so it might be wise to adjust the runesPerRow + // parameter to ensure that unnecessary space isn't created based on the character set being used + gc := fixed.Int26_6(len(fc.Glyphs)) + runesPerCol := (gc / runesPerRow) + 1 + + gb := ttf.Bounds(scale) + gw := (gb.Max.X - gb.Min.X) + gh := (gb.Max.Y - gb.Min.Y) + + iw := Pow2(uint32(gw * runesPerRow)) + ih := Pow2(uint32(gh * runesPerCol)) + + fg, bg := image.White, image.Transparent + rect := image.Rect(0, 0, int(iw), int(ih)) + fc.Image = image.NewNRGBA(rect) + draw.Draw(fc.Image, fc.Image.Bounds(), bg, image.ZP, draw.Src) + + // Use a freetype context to do the drawing. + c := freetype.NewContext() + c.SetDPI(72) // Do not change this. It is required in order to have a properly aligned bounding box!!! + c.SetFont(ttf) + c.SetFontSize(float64(scale)) + c.SetClip(fc.Image.Bounds()) + c.SetDst(fc.Image) + c.SetSrc(fg) + + // Iterate over all relevant glyphs in the truetype font and draw them all to the image buffer + // Add Glyph objects to track various glyph values + var gi fixed.Int26_6 + var gx, gy fixed.Int26_6 + + for _, runeRange := range fc.RuneRanges { + for ch := runeRange.Low; ch <= runeRange.High; ch++ { + index := ttf.Index(ch) + metric := ttf.HMetric(scale, index) + + if gi%runesPerRow == 0 { + gx = 0 + if gi > 0 { + gy += gh + } + } else { + gx += gw + } + fc.Glyphs[gi].Advance = int(metric.AdvanceWidth) + fc.Glyphs[gi].X = int(gx) + fc.Glyphs[gi].Y = int(gy) + fc.Glyphs[gi].Width = int(gw) + fc.Glyphs[gi].Height = int(gh) + + pt := freetype.Pt(int(gx), int(gy)+int(c.PointToFixed(float64(scale))>>6)) + c.DrawString(string(ch), pt) + gi++ + } + } + return fc, nil +} + +func LoadTruetypeFontConfig(rootPath, name string) (*FontConfig, error) { + fc := &FontConfig{} + fc.Name = name + + err := fc.Load(rootPath) + if err != nil { + return nil, err + } + return fc, nil +} diff --git a/vendor/github.com/4ydx/gltext/v4.1/bounding_box.go b/vendor/github.com/4ydx/gltext/v4.1/bounding_box.go new file mode 100644 index 0000000..3fcbf6a --- /dev/null +++ b/vendor/github.com/4ydx/gltext/v4.1/bounding_box.go @@ -0,0 +1,182 @@ +// Copyright 2012 The go-gl Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package v41 + +import ( + "fmt" + "github.com/4ydx/gltext" + "github.com/go-gl/gl/v4.1-core/gl" + "github.com/go-gl/mathgl/mgl32" +) + +var boxVertexShaderSource string = ` +#version 330 + +uniform mat4 orthographic_matrix; +uniform vec2 final_position; + +in vec4 centered_position; + +void main() { + vec4 center = orthographic_matrix * centered_position; + gl_Position = vec4(center.x + final_position.x, center.y + final_position.y, center.z, center.w); +} +` + "\x00" + +var boxFragmentShaderSource string = ` +#version 330 + +out vec4 fragment_color; + +void main() { + fragment_color = vec4(0.3,0.3,0.3,1); +} +` + "\x00" + +type BoundingBox struct { + program uint32 // program compiled from shaders + + // font holds our orthographic matrix + font *Font + + // attributes + centeredPosition uint32 // vertex position + + // the final screen position post-scaling + finalPositionUniform int32 + finalPosition mgl32.Vec2 + + // transform to orthographic projection + orthographicMatrixUniform int32 + + vao uint32 + vbo uint32 + ebo uint32 + windowWidth float32 + windowHeight float32 + vboData []float32 + vboIndexCount int + eboData []int32 + eboIndexCount int + + // X1, X2: the lower left and upper right points of a box that bounds the text + X1 gltext.Point + X2 gltext.Point +} + +func loadBoundingBox(f *Font, X1 gltext.Point, X2 gltext.Point) (b *BoundingBox, err error) { + b = new(BoundingBox) + b.font = f + + // create shader program and define attributes and uniforms + b.program, err = NewProgram(boxVertexShaderSource, boxFragmentShaderSource) + if err != nil { + return b, err + } + + // ebo, vbo data + b.vboIndexCount = 4 * 2 // 4 indexes per bounding box (containing 2 position) + b.eboIndexCount = 6 // each rune requires 6 triangle indices for a quad + b.vboData = make([]float32, b.vboIndexCount, b.vboIndexCount) + b.eboData = make([]int32, b.eboIndexCount, b.eboIndexCount) + b.makeBufferData(X1, X2) + + if gltext.IsDebug { + prefix := gltext.DebugPrefix() + fmt.Printf("%s bounding %v %v\n", prefix, X1, X2) + fmt.Printf("%s bounding vbo data\n%v\n", prefix, b.vboData) + fmt.Printf("%s bounding ebo data\n%v\n", prefix, b.eboData) + } + + // attributes + b.centeredPosition = uint32(gl.GetAttribLocation(b.program, gl.Str("centered_position\x00"))) + + // uniforms + b.finalPositionUniform = gl.GetUniformLocation(b.program, gl.Str("final_position\x00")) + b.orthographicMatrixUniform = gl.GetUniformLocation(b.program, gl.Str("orthographic_matrix\x00")) + + // size of glfloat + glfloatSize := int32(4) + + gl.GenVertexArrays(1, &b.vao) + gl.GenBuffers(1, &b.vbo) + gl.GenBuffers(1, &b.ebo) + + // vao + gl.BindVertexArray(b.vao) + + // vbo + // specify the buffer for which the VertexAttribPointer calls apply + gl.BindBuffer(gl.ARRAY_BUFFER, b.vbo) + + gl.EnableVertexAttribArray(b.centeredPosition) + gl.VertexAttribPointer( + b.centeredPosition, + 2, + gl.FLOAT, + false, + 0, + gl.PtrOffset(0), + ) + gl.BufferData(gl.ARRAY_BUFFER, int(glfloatSize)*b.vboIndexCount, gl.Ptr(b.vboData), gl.DYNAMIC_DRAW) + + gl.BindBuffer(gl.ELEMENT_ARRAY_BUFFER, b.ebo) + gl.BufferData(gl.ELEMENT_ARRAY_BUFFER, int(glfloatSize)*b.eboIndexCount, gl.Ptr(b.eboData), gl.DYNAMIC_DRAW) + gl.BindVertexArray(0) + + // not necesssary, but i just want to better understand using vertex arrays + gl.BindBuffer(gl.ARRAY_BUFFER, 0) + gl.BindBuffer(gl.ELEMENT_ARRAY_BUFFER, 0) + + return b, nil +} + +func (b *BoundingBox) Release() { + gl.DeleteBuffers(1, &b.vbo) + gl.DeleteBuffers(1, &b.ebo) + gl.DeleteBuffers(1, &b.vao) +} + +func (b *BoundingBox) Draw() { + gl.UseProgram(b.program) + + // uniforms + gl.Uniform2fv(b.finalPositionUniform, 1, &b.finalPosition[0]) + gl.UniformMatrix4fv(b.orthographicMatrixUniform, 1, false, &b.font.OrthographicMatrix[0]) + + // draw + gl.BindVertexArray(b.vao) + gl.DrawElements(gl.TRIANGLES, int32(b.eboIndexCount), gl.UNSIGNED_INT, nil) + gl.BindVertexArray(0) +} + +func (b *BoundingBox) makeBufferData(X1, X2 gltext.Point) { + // counter-clockwise quad + + // index (0,0) + b.vboData[0] = X1.X // position + b.vboData[1] = X1.Y + + // index (1,0) + b.vboData[2] = X2.X + b.vboData[3] = X1.Y + + // index (1,1) + b.vboData[4] = X2.X + b.vboData[5] = X2.Y + + // index (0,1) + b.vboData[6] = X1.X + b.vboData[7] = X2.Y + + // ebo data + b.eboData[0] = 0 + b.eboData[1] = 1 + b.eboData[2] = 2 + b.eboData[3] = 0 + b.eboData[4] = 2 + b.eboData[5] = 3 + return +} diff --git a/vendor/github.com/4ydx/gltext/v4.1/font.go b/vendor/github.com/4ydx/gltext/v4.1/font.go new file mode 100644 index 0000000..888c9bd --- /dev/null +++ b/vendor/github.com/4ydx/gltext/v4.1/font.go @@ -0,0 +1,177 @@ +// Copyright 2012 The go-gl Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package v41 + +import ( + "github.com/4ydx/gltext" + "github.com/go-gl/gl/v4.1-core/gl" + "github.com/go-gl/mathgl/mgl32" + "image" +) + +var fontVertexShaderSource string = ` +#version 330 + +uniform mat4 scale_matrix; +uniform mat4 orthographic_matrix; +uniform vec2 final_position; + +in vec4 centered_position; +in vec2 uv; + +out vec2 fragment_uv; + +// The orthographic projection uses a lower left-hand point of (0,0) +// 1) We center the text on screen. +// 2) We perform othographic transformation and then scaling. +// 3) We move the text to its final resting place. +// This is all pretty standard I would imagine, but it took me a bit to sort out what has to happen :P + +void main() { + fragment_uv = uv; + vec4 scaled = scale_matrix * orthographic_matrix * centered_position; + gl_Position = vec4(scaled.x + final_position.x, scaled.y + final_position.y, scaled.z, scaled.w); +} +` + "\x00" + +var fontFragmentShaderSource string = ` +#version 330 + +uniform sampler2D fragment_texture; +uniform float fadeout; +uniform vec4 fragment_color_adjustment; + +in vec2 fragment_uv; +out vec4 fragment_color; + +void main() { + vec4 color = texture(fragment_texture, fragment_uv); + color.xyz = fragment_color_adjustment.xyz; + color.w = color.w - fadeout; + fragment_color = color; +} +` + "\x00" + +type Font struct { + Config *gltext.FontConfig // Character set for this font. + textureID uint32 // Holds the glyph texture id. + maxGlyphWidth int // Largest glyph width. + maxGlyphHeight int // Largest glyph height. + program uint32 // program compiled from shaders + + // attributes + centeredPositionAttribute uint32 // vertex centered_position required for scaling around the orthographic projections center + uvAttribute uint32 // texture position + + // The final screen position post-scaling + finalPositionUniform int32 + + // Position of the shaders fragment texture variable + fragmentTextureUniform int32 + + // The desired color of the text + colorUniform int32 + fadeoutUniform int32 + + // View matrix + orthographicMatrixUniform int32 + OrthographicMatrix mgl32.Mat4 + + // Scale the resulting text + scaleMatrixUniform int32 + + textureWidth float32 + textureHeight float32 + WindowWidth float32 + WindowHeight float32 +} + +func (f *Font) GetTextureWidth() float32 { + return f.textureWidth +} + +func (f *Font) GetTextureHeight() float32 { + return f.textureHeight +} + +func NewFont(config *gltext.FontConfig) (f *Font, err error) { + if config == nil { + panic("Nil config") + } + f = &Font{} + f.Config = config + + // Resize image to next power-of-two. + config.Image = gltext.Pow2Image(config.Image).(*image.NRGBA) + ib := config.Image.Bounds() + + f.textureWidth = float32(ib.Dx()) + f.textureHeight = float32(ib.Dy()) + + for _, glyph := range config.Glyphs { + if glyph.Width > f.maxGlyphWidth { + f.maxGlyphWidth = glyph.Width + } + if glyph.Height > f.maxGlyphHeight { + f.maxGlyphHeight = glyph.Height + } + } + + // save to disk for testing + if gltext.IsDebug { + err = gltext.SaveImage(".", "Debug", config.Image) + if err != nil { + return f, err + } + } + + // generate texture + gl.GenTextures(1, &f.textureID) + gl.BindTexture(gl.TEXTURE_2D, f.textureID) + gl.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR) + gl.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR) + gl.TexImage2D( + gl.TEXTURE_2D, + 0, + gl.RGBA, + int32(ib.Dx()), + int32(ib.Dy()), + 0, + gl.RGBA, + gl.UNSIGNED_BYTE, + gl.Ptr(config.Image.Pix), + ) + gl.BindTexture(gl.TEXTURE_2D, 0) + + // create shader program and define attributes and uniforms + f.program, err = NewProgram(fontVertexShaderSource, fontFragmentShaderSource) + if err != nil { + return f, err + } + + // attributes + f.centeredPositionAttribute = uint32(gl.GetAttribLocation(f.program, gl.Str("centered_position\x00"))) + f.uvAttribute = uint32(gl.GetAttribLocation(f.program, gl.Str("uv\x00"))) + + // uniforms + f.finalPositionUniform = gl.GetUniformLocation(f.program, gl.Str("final_position\x00")) + f.orthographicMatrixUniform = gl.GetUniformLocation(f.program, gl.Str("orthographic_matrix\x00")) + f.scaleMatrixUniform = gl.GetUniformLocation(f.program, gl.Str("scale_matrix\x00")) + f.fragmentTextureUniform = gl.GetUniformLocation(f.program, gl.Str("fragment_texture\x00")) + f.colorUniform = gl.GetUniformLocation(f.program, gl.Str("fragment_color_adjustment\x00")) + f.fadeoutUniform = gl.GetUniformLocation(f.program, gl.Str("fadeout\x00")) + + return f, nil +} + +func (f *Font) ResizeWindow(width float32, height float32) { + f.WindowWidth = width + f.WindowHeight = height + f.OrthographicMatrix = mgl32.Ortho2D(-f.WindowWidth/2, f.WindowWidth/2, -f.WindowHeight/2, f.WindowHeight/2) +} + +func (f *Font) Release() { + gl.DeleteTextures(1, &f.textureID) +} diff --git a/vendor/github.com/4ydx/gltext/v4.1/shaders.go b/vendor/github.com/4ydx/gltext/v4.1/shaders.go new file mode 100644 index 0000000..6c88d56 --- /dev/null +++ b/vendor/github.com/4ydx/gltext/v4.1/shaders.go @@ -0,0 +1,70 @@ +// Copyright 2012 The go-gl Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package v41 + +import ( + "errors" + "fmt" + "github.com/go-gl/gl/v4.1-core/gl" + "strings" +) + +func NewProgram(vertexShaderSource, fragmentShaderSource string) (uint32, error) { + vertexShader, err := compileShader(vertexShaderSource, gl.VERTEX_SHADER) + if err != nil { + return 0, err + } + fragmentShader, err := compileShader(fragmentShaderSource, gl.FRAGMENT_SHADER) + if err != nil { + return 0, err + } + program := gl.CreateProgram() + gl.AttachShader(program, vertexShader) + gl.AttachShader(program, fragmentShader) + gl.LinkProgram(program) + + var status int32 + gl.GetProgramiv(program, gl.LINK_STATUS, &status) + if status == gl.FALSE { + var logLength int32 + gl.GetProgramiv(program, gl.INFO_LOG_LENGTH, &logLength) + + log := strings.Repeat("\x00", int(logLength+1)) + gl.GetProgramInfoLog(program, logLength, nil, gl.Str(log)) + + gl.DeleteProgram(program) + gl.DeleteShader(vertexShader) + gl.DeleteShader(fragmentShader) + + return 0, errors.New(fmt.Sprintf("failed to link program: %v", log)) + } + gl.DetachShader(program, vertexShader) + gl.DetachShader(program, fragmentShader) + + gl.DeleteShader(vertexShader) + gl.DeleteShader(fragmentShader) + + return program, nil +} + +func compileShader(source string, shaderType uint32) (uint32, error) { + shader := gl.CreateShader(shaderType) + csource := gl.Str(source) + gl.ShaderSource(shader, 1, &csource, nil) + gl.CompileShader(shader) + + var status int32 + gl.GetShaderiv(shader, gl.COMPILE_STATUS, &status) + if status == gl.FALSE { + var logLength int32 + gl.GetShaderiv(shader, gl.INFO_LOG_LENGTH, &logLength) + + log := strings.Repeat("\x00", int(logLength+1)) + gl.GetShaderInfoLog(shader, logLength, nil, gl.Str(log)) + + return 0, fmt.Errorf("failed to compile %v: %v", source, log) + } + return shader, nil +} diff --git a/vendor/github.com/4ydx/gltext/v4.1/text.go b/vendor/github.com/4ydx/gltext/v4.1/text.go new file mode 100644 index 0000000..b6761a1 --- /dev/null +++ b/vendor/github.com/4ydx/gltext/v4.1/text.go @@ -0,0 +1,538 @@ +// Copyright 2012 The go-gl Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package v41 + +import ( + "fmt" + "github.com/4ydx/gltext" + "github.com/go-gl/gl/v4.1-core/gl" + "github.com/go-gl/mathgl/mgl32" +) + +// CharacterSide shows which side of a character is +// clicked +type CharacterSide int + +const ( + CSLeft CharacterSide = iota + CSRight + CSUnknown +) + +// Text is not designed to be accessed concurrently +type Text struct { + Font *Font + + // final position on screen + finalPosition mgl32.Vec2 + + // text color + color mgl32.Vec3 + + // scaling the text + Scale float32 + ScaleMin float32 + ScaleMax float32 + scaleMatrix mgl32.Mat4 + + // Fadeout reduces alpha + FadeOutBegun bool + FadeOutFrameCount float32 // number of frames since drawing began + FadeOutPerFrame float32 // smaller value takes more time + + // bounding box of text + BoundingBox *BoundingBox + + // general opengl values + vao uint32 + vbo uint32 + ebo uint32 + vboData []float32 + vboIndexCount int + eboData []int32 + eboIndexCount int + + // determines how many prefix characters are drawn on screen + RuneCount int + + // no longer than this string + MaxRuneCount int + + // X1, X2: the lower left and upper right points of a box that bounds the text with a center point (0,0) + + // lower left + X1 gltext.Point + // upper right + X2 gltext.Point + + // Screen position away from center + Position mgl32.Vec2 + + String string + CharSpacing []float32 +} + +func (t *Text) GetLength() int { + return t.eboIndexCount / 6 +} + +// NewText creates a new text object with scaling boundaries +// the rest state of the text when not being interacted with +// is scaleMin. most likely one wants to use 1.0. +func NewText(f *Font, scaleMin, scaleMax float32) (t *Text) { + t = &Text{} + t.Font = f + + // text hover values + // "resting state" of a text object is the min scale + t.ScaleMin, t.ScaleMax = scaleMin, scaleMax + t.SetScale(1) + glfloat_size := int32(4) + + // stride of the buffered data + xy_count := int32(2) + stride := xy_count + int32(2) + + gl.GenVertexArrays(1, &t.vao) + gl.GenBuffers(1, &t.vbo) + gl.GenBuffers(1, &t.ebo) + + // vao + gl.BindVertexArray(t.vao) + + // i think this call isnt necessary here + // gl.ActiveTexture(gl.TEXTURE0) + + gl.BindTexture(gl.TEXTURE_2D, t.Font.textureID) + + // vbo + // specify the buffer for which the VertexAttribPointer calls apply + gl.BindBuffer(gl.ARRAY_BUFFER, t.vbo) + + gl.EnableVertexAttribArray(t.Font.centeredPositionAttribute) + gl.VertexAttribPointer( + t.Font.centeredPositionAttribute, + 2, + gl.FLOAT, + false, + glfloat_size*stride, + gl.PtrOffset(0), + ) + + gl.EnableVertexAttribArray(t.Font.uvAttribute) + gl.VertexAttribPointer( + t.Font.uvAttribute, + 2, + gl.FLOAT, + false, + glfloat_size*stride, + gl.PtrOffset(int(glfloat_size*xy_count)), + ) + + // ebo + gl.BindBuffer(gl.ELEMENT_ARRAY_BUFFER, t.ebo) + + // i am guessing that order is important here + gl.BindVertexArray(0) + gl.BindBuffer(gl.ARRAY_BUFFER, 0) + gl.BindBuffer(gl.ELEMENT_ARRAY_BUFFER, 0) + return t +} + +// Release releases text resources. +func (t *Text) Release() { + gl.DeleteBuffers(1, &t.vbo) + gl.DeleteBuffers(1, &t.ebo) + gl.DeleteVertexArrays(1, &t.vao) +} + +// SetScale returns true when a change occured +func (t *Text) SetScale(s float32) bool { + if s > t.ScaleMax || s < t.ScaleMin { + return false + } + t.Scale = s + t.scaleMatrix = mgl32.Scale3D(s, s, s) + return true +} + +// AddScale returns true when a change occured +func (t *Text) AddScale(s float32) bool { + if s < 0 && t.Scale <= t.ScaleMin { + return false + } + if s > 0 && t.Scale >= t.ScaleMax { + return false + } + t.Scale += s + t.scaleMatrix = mgl32.Scale3D(t.Scale, t.Scale, t.Scale) + return true +} + +func (t *Text) SetColor(color mgl32.Vec3) { + t.color = color +} + +// SetString performs creates new vbo and ebo objects as well as to perform all +// binding required for displaying text to screen +func (t *Text) SetString(fs string, argv ...interface{}) { + indices := []rune(fmt.Sprintf(fs, argv...)) + if t.MaxRuneCount > 0 && len(indices) > t.MaxRuneCount+1 { + indices = indices[0:t.MaxRuneCount] + } + t.String = string(indices) + + // ebo, vbo data + glfloat_size := int32(4) + + t.vboIndexCount = len(indices) * 4 * 2 * 2 // 4 indexes per rune (containing 2 position + 2 texture) + t.eboIndexCount = len(indices) * 6 // each rune requires 6 triangle indices for a quad + t.RuneCount = len(indices) + t.vboData = make([]float32, t.vboIndexCount, t.vboIndexCount) + t.eboData = make([]int32, t.eboIndexCount, t.eboIndexCount) + + // generate the basic vbo data and bounding box + // center the vbo data around the orthographic (0,0) point + t.X1 = gltext.Point{0, 0} + t.X2 = gltext.Point{0, 0} + t.makeBufferData(indices) + t.centerTheData(t.getLowerLeft()) + + if gltext.IsDebug { + prefix := gltext.DebugPrefix() + fmt.Printf("%s bounding box %v %v\n", prefix, t.X1, t.X2) + fmt.Printf("%s text vbo data\n%v\n", prefix, t.vboData) + fmt.Printf("%s text ebo data\n%v\n", prefix, t.eboData) + } + if len(indices) > 0 { + // in the event that we have no data to draw dont bother here + gl.BindVertexArray(t.vao) + gl.BindBuffer(gl.ARRAY_BUFFER, t.vbo) + gl.BufferData( + gl.ARRAY_BUFFER, int(glfloat_size)*t.vboIndexCount, gl.Ptr(t.vboData), gl.DYNAMIC_DRAW) + gl.BindBuffer(gl.ELEMENT_ARRAY_BUFFER, t.ebo) + gl.BufferData( + gl.ELEMENT_ARRAY_BUFFER, int(glfloat_size)*t.eboIndexCount, gl.Ptr(t.eboData), gl.DYNAMIC_DRAW) + gl.BindVertexArray(0) + + // possibly not necesssary? + gl.BindBuffer(gl.ARRAY_BUFFER, 0) + gl.BindBuffer(gl.ELEMENT_ARRAY_BUFFER, 0) + } + + // SetString can be called at anytime. we want to make sure that if the user is updating the text, + // the previous position will be maintained + t.SetPosition(t.Position) +} + +// The block of text is positioned around the center of the screen, which in this case must +// be considered (0,0). This is necessary for orthographic projection and scaling to work +// well together. If the text is *not* at (0,0), then scaling doesnt produce a direct zoom effect. +func (t *Text) getLowerLeft() (lowerLeft gltext.Point) { + lineWidthHalf := (t.X2.X - t.X1.X) / 2 + lineHeightHalf := (t.X2.Y - t.X1.Y) / 2 + + lowerLeft.X = -lineWidthHalf + lowerLeft.Y = -lineHeightHalf + return +} + +// SetPosition prepares variables passed to the shader as well as values +// used for bounding box calculations when clicking or hovering above text +func (t *Text) SetPosition(v mgl32.Vec2) { + // transform to orthographic coordinates ranged -1 to 1 for the shader + t.finalPosition[0] = v.X() / (t.Font.WindowWidth / 2) + t.finalPosition[1] = v.Y() / (t.Font.WindowHeight / 2) + if gltext.IsDebug { + t.BoundingBox.finalPosition[0] = v.X() / (t.Font.WindowWidth / 2) + t.BoundingBox.finalPosition[1] = v.Y() / (t.Font.WindowHeight / 2) + } + t.Position = v +} + +func (t *Text) GetBoundingBox() (X1, X2 gltext.Point) { + x, y := t.Position.X(), t.Position.Y() + X1.X = t.X1.X + x + X1.Y = t.X1.Y + y + X2.X = t.X2.X + x + X2.Y = t.X2.Y + y + return +} + +func (t *Text) Draw() { + if gltext.IsDebug { + t.BoundingBox.Draw() + } + if t.FadeOutBegun { + t.FadeOutFrameCount++ + if t.FadeOutPerFrame*t.FadeOutFrameCount > 1 { + // prevent overflow + t.FadeOutFrameCount-- + } + } + + gl.UseProgram(t.Font.program) + + gl.ActiveTexture(gl.TEXTURE0) + gl.BindTexture(gl.TEXTURE_2D, t.Font.textureID) + + // uniforms + gl.Uniform1i(t.Font.fragmentTextureUniform, 0) + gl.Uniform1f(t.Font.fadeoutUniform, t.FadeOutPerFrame*t.FadeOutFrameCount) + gl.Uniform4fv(t.Font.colorUniform, 1, &t.color[0]) + gl.Uniform2fv(t.Font.finalPositionUniform, 1, &t.finalPosition[0]) + gl.UniformMatrix4fv(t.Font.orthographicMatrixUniform, 1, false, &t.Font.OrthographicMatrix[0]) + gl.UniformMatrix4fv(t.Font.scaleMatrixUniform, 1, false, &t.scaleMatrix[0]) + + // draw + drawCount := int32(t.RuneCount * 6) + if drawCount > int32(t.eboIndexCount) { + drawCount = int32(t.eboIndexCount) + } + if drawCount <= 0 { + return + } + gl.Enable(gl.BLEND) + gl.BlendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA) + gl.BindVertexArray(t.vao) + gl.DrawElements(gl.TRIANGLES, drawCount, gl.UNSIGNED_INT, nil) + gl.BindVertexArray(0) + gl.Disable(gl.BLEND) +} + +func (t *Text) BeginFadeOut() { + if t.FadeOutBegun == false { + t.FadeOutBegun = true + t.FadeOutFrameCount = 0 + } +} + +func (t *Text) Show() { + t.FadeOutBegun = false + t.FadeOutFrameCount = 0 +} + +func (t *Text) Hide() { + t.FadeOutBegun = false + t.FadeOutFrameCount = 1.0 / t.FadeOutPerFrame +} + +// centerTheData prepares the value "centered_position" found in the font shader +// as named, the function centers the text around the orthographic center of the screen +// expected to only be called within SetString +func (t *Text) centerTheData(lowerLeft gltext.Point) (err error) { + length := len(t.vboData) + for index := 0; index < length; { + // index (0,0) + t.vboData[index] += lowerLeft.X + index++ + t.vboData[index] += lowerLeft.Y + index += 3 // skip texture data + + // index (1,0) + t.vboData[index] += lowerLeft.X + index++ + t.vboData[index] += lowerLeft.Y + index += 3 + + // index (1,1) + t.vboData[index] += lowerLeft.X + index++ + t.vboData[index] += lowerLeft.Y + index += 3 + + // index (0,1) + t.vboData[index] += lowerLeft.X + index++ + t.vboData[index] += lowerLeft.Y + index += 3 + } + + // update bounding box so that it is centered around (0,0) + t.X1.X += lowerLeft.X + t.X2.X += lowerLeft.X + t.X1.Y += lowerLeft.Y + t.X2.Y += lowerLeft.Y + + // prepare objects for drawing the bounding box + if gltext.IsDebug { + t.BoundingBox, err = loadBoundingBox(t.Font, t.X1, t.X2) + } + return +} + +func (t *Text) Width() float32 { + return t.X2.X - t.X1.X +} + +func (t *Text) Height() float32 { + return t.X2.Y - t.X1.Y +} + +// PrintCharSpacing is used for debugging +func (t *Text) PrintCharSpacing() { + fmt.Printf("\n%s:\n", t.String) + at := t.X1.X + for i, cs := range t.CharSpacing { + at = cs + at + fmt.Printf("'%c': %.2f ", t.String[i], at) + } +} + +// ClickedCharacter should only be called after a bounding box hit is confirmed because +// it does not check y-axis values at all. Returns the index and side of the char clicked. +func (t *Text) ClickedCharacter(xPos, offset float64) (index int, side CharacterSide) { + // transform from screen coordinates to... window coordinates? + xPos = xPos - float64(t.Font.WindowWidth/2) - offset + + // could do a binary search... + at := float64(t.X1.X) + for i, cs := range t.CharSpacing { + at = float64(cs) + at + if i == 0 && xPos <= at-float64(cs) { + return i, CSLeft + } + if i == len(t.CharSpacing)-1 && xPos > at { + return i, CSRight + } + if xPos <= at && xPos > at-float64(cs) { + if xPos-(at-float64(cs)) > float64(cs)/2 { + return i, CSRight + } else { + return i, CSLeft + } + } + } + return -1, CSUnknown +} + +func (t *Text) CharPosition(index int) float64 { + at := float64(t.X1.X) + for i, cs := range t.CharSpacing { + if i == index { + break + } + at = float64(cs) + at + } + return at +} + +func (t *Text) HasRune(r rune) bool { + for _, runes := range t.Font.Config.RuneRanges { + if r >= runes.Low && r <= runes.High { + return true + } + } + return false +} + +// makeBufferData positions quads for drawing the text in the indices parameter using glyph dimensions +// it also generates the bounding box (which needs to later be centered around (0,0)) +// expected to only be called by SetString +func (t *Text) makeBufferData(indices []rune) { + glyphs := t.Font.Config.Glyphs + + vboIndex := 0 + eboIndex := 0 + lineX := float32(0) + eboOffset := int32(0) + + t.CharSpacing = make([]float32, 0) + for i, r := range indices { + glyphIndex := t.Font.Config.RuneRanges.GetGlyphIndex(r) + if glyphIndex >= 0 { + if gltext.IsDebug { + prefix := gltext.DebugPrefix() + fmt.Printf("%s png index %3d: %s rune %+v line at %f", prefix, glyphIndex, string(r), glyphs[glyphIndex], lineX) + } + advance := float32(glyphs[glyphIndex].Advance) + + // Originally the glyph Width was used, but that results in quads that overlap one another. + vw := float32(glyphs[glyphIndex].Advance) + vh := float32(glyphs[glyphIndex].Height) + + // used to determine which character inside of the text was clicked + t.CharSpacing = append(t.CharSpacing, advance) + + // variable width characters will produce a bounding box that is just + // a bit too long on the right-hand side unless we trim off the excess + // when processing the right-most character + trim := float32(0) + if i == len(indices)-1 { + trim = vw - advance + } + tP1, tP2 := glyphs[glyphIndex].GetTexturePositions(t.Font) + + // counter-clockwise quad + // the bounding box value X2 is being expanded as characters are added + + // index (0,0) + t.vboData[vboIndex] = lineX // position + vboIndex++ + t.vboData[vboIndex] = 0 + vboIndex++ + t.vboData[vboIndex] = tP1.X // texture uv + vboIndex++ + t.vboData[vboIndex] = tP2.Y + vboIndex++ + + // index (1,0) - expanding X2 + t.vboData[vboIndex], t.X2.X = lineX+vw, lineX+vw-trim + vboIndex++ + t.vboData[vboIndex] = 0 + vboIndex++ + t.vboData[vboIndex] = tP2.X + vboIndex++ + t.vboData[vboIndex] = tP2.Y + vboIndex++ + + // index (1,1) - expanding X2 + t.vboData[vboIndex] = lineX + vw + vboIndex++ + t.vboData[vboIndex], t.X2.Y = vh, vh + vboIndex++ + t.vboData[vboIndex] = tP2.X + vboIndex++ + t.vboData[vboIndex] = tP1.Y + vboIndex++ + + // index (0,1) + t.vboData[vboIndex] = lineX + vboIndex++ + t.vboData[vboIndex] = vh + vboIndex++ + t.vboData[vboIndex] = tP1.X + vboIndex++ + t.vboData[vboIndex] = tP1.Y + vboIndex++ + + // ebo data + t.eboData[eboIndex] = 0 + eboOffset + eboIndex++ + t.eboData[eboIndex] = 1 + eboOffset + eboIndex++ + t.eboData[eboIndex] = 2 + eboOffset + eboIndex++ + + t.eboData[eboIndex] = 0 + eboOffset + eboIndex++ + t.eboData[eboIndex] = 2 + eboOffset + eboIndex++ + t.eboData[eboIndex] = 3 + eboOffset + eboIndex++ + eboOffset += 4 + + // shift to the right + lineX += advance + if gltext.IsDebug { + fmt.Printf("-> %f\n", lineX) + } + } + } + if gltext.IsDebug { + gltext.PrintVBO(t.vboData, t.Font.GetTextureHeight(), t.Font.GetTextureWidth()) + } + return +} diff --git a/vendor/github.com/go-gl/gl/LICENSE b/vendor/github.com/go-gl/gl/LICENSE new file mode 100644 index 0000000..bac95ec --- /dev/null +++ b/vendor/github.com/go-gl/gl/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Eric Woroshow + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/vendor/github.com/go-gl/gl/v4.1-core/gl/conversions.go b/vendor/github.com/go-gl/gl/v4.1-core/gl/conversions.go new file mode 100644 index 0000000..866fcd4 --- /dev/null +++ b/vendor/github.com/go-gl/gl/v4.1-core/gl/conversions.go @@ -0,0 +1,109 @@ +// Glow automatically generated OpenGL binding: http://github.com/go-gl/glow + +package gl + +import ( + "fmt" + "reflect" + "strings" + "unsafe" +) + +// #include +import "C" + +// Ptr takes a slice or pointer (to a singular scalar value or the first +// element of an array or slice) and returns its GL-compatible address. +// +// For example: +// +// var data []uint8 +// ... +// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) +func Ptr(data interface{}) unsafe.Pointer { + if data == nil { + return unsafe.Pointer(nil) + } + var addr unsafe.Pointer + v := reflect.ValueOf(data) + switch v.Type().Kind() { + case reflect.Ptr: + e := v.Elem() + switch e.Kind() { + case + reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, + reflect.Float32, reflect.Float64: + addr = unsafe.Pointer(e.UnsafeAddr()) + default: + panic(fmt.Errorf("unsupported pointer to type %s; must be a slice or pointer to a singular scalar value or the first element of an array or slice", e.Kind())) + } + case reflect.Uintptr: + addr = unsafe.Pointer(v.Pointer()) + case reflect.Slice: + addr = unsafe.Pointer(v.Index(0).UnsafeAddr()) + default: + panic(fmt.Errorf("unsupported type %s; must be a slice or pointer to a singular scalar value or the first element of an array or slice", v.Type())) + } + return addr +} + +// PtrOffset takes a pointer offset and returns a GL-compatible pointer. +// Useful for functions such as glVertexAttribPointer that take pointer +// parameters indicating an offset rather than an absolute memory address. +func PtrOffset(offset int) unsafe.Pointer { + return unsafe.Pointer(uintptr(offset)) +} + +// Str takes a null-terminated Go string and returns its GL-compatible address. +// This function reaches into Go string storage in an unsafe way so the caller +// must ensure the string is not garbage collected. +func Str(str string) *uint8 { + if !strings.HasSuffix(str, "\x00") { + panic("str argument missing null terminator: " + str) + } + header := (*reflect.StringHeader)(unsafe.Pointer(&str)) + return (*uint8)(unsafe.Pointer(header.Data)) +} + +// GoStr takes a null-terminated string returned by OpenGL and constructs a +// corresponding Go string. +func GoStr(cstr *uint8) string { + return C.GoString((*C.char)(unsafe.Pointer(cstr))) +} + +// Strs takes a list of Go strings (with or without null-termination) and +// returns their C counterpart. +// +// The returned free function must be called once you are done using the strings +// in order to free the memory. +// +// If no strings are provided as a parameter this function will panic. +func Strs(strs ...string) (cstrs **uint8, free func()) { + if len(strs) == 0 { + panic("Strs: expected at least 1 string") + } + + // Allocate a contiguous array large enough to hold all the strings' contents. + n := 0 + for i := range strs { + n += len(strs[i]) + } + data := C.malloc(C.size_t(n)) + + // Copy all the strings into data. + dataSlice := *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{ + Data: uintptr(data), + Len: n, + Cap: n, + })) + css := make([]*uint8, len(strs)) // Populated with pointers to each string. + offset := 0 + for i := range strs { + copy(dataSlice[offset:offset+len(strs[i])], strs[i][:]) // Copy strs[i] into proper data location. + css[i] = (*uint8)(unsafe.Pointer(&dataSlice[offset])) // Set a pointer to it. + offset += len(strs[i]) + } + + return (**uint8)(&css[0]), func() { C.free(data) } +} diff --git a/vendor/github.com/go-gl/gl/v4.1-core/gl/debug.go b/vendor/github.com/go-gl/gl/v4.1-core/gl/debug.go new file mode 100644 index 0000000..7e7ab40 --- /dev/null +++ b/vendor/github.com/go-gl/gl/v4.1-core/gl/debug.go @@ -0,0 +1,31 @@ +// Glow automatically generated OpenGL binding: http://github.com/go-gl/glow + +package gl + +import "C" +import "unsafe" + +type DebugProc func( + source uint32, + gltype uint32, + id uint32, + severity uint32, + length int32, + message string, + userParam unsafe.Pointer) + +var userDebugCallback DebugProc + +//export glowDebugCallback_glcore41 +func glowDebugCallback_glcore41( + source uint32, + gltype uint32, + id uint32, + severity uint32, + length int32, + message *uint8, + userParam unsafe.Pointer) { + if userDebugCallback != nil { + userDebugCallback(source, gltype, id, severity, length, GoStr(message), userParam) + } +} diff --git a/vendor/github.com/go-gl/gl/v4.1-core/gl/package.go b/vendor/github.com/go-gl/gl/v4.1-core/gl/package.go new file mode 100644 index 0000000..0f5b36d --- /dev/null +++ b/vendor/github.com/go-gl/gl/v4.1-core/gl/package.go @@ -0,0 +1,15893 @@ +// Copyright (c) 2010 Khronos Group. +// This material may be distributed subject to the terms and conditions +// set forth in the Open Publication License, v 1.0, 8 June 1999. +// http://opencontent.org/openpub/. +// +// Copyright (c) 1991-2006 Silicon Graphics, Inc. +// This document is licensed under the SGI Free Software B License. +// For details, see http://oss.sgi.com/projects/FreeB. + +// Package gl implements Go bindings to OpenGL. +// +// This package was automatically generated using Glow: +// http://github.com/go-gl/glow +// +package gl + +// #cgo darwin LDFLAGS: -framework OpenGL +// #cgo linux freebsd LDFLAGS: -lGL +// #cgo windows LDFLAGS: -lopengl32 +// #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) +// #ifndef WIN32_LEAN_AND_MEAN +// #define WIN32_LEAN_AND_MEAN 1 +// #endif +// #include +// #endif +// #ifndef APIENTRY +// #define APIENTRY +// #endif +// #ifndef APIENTRYP +// #define APIENTRYP APIENTRY * +// #endif +// #ifndef GLAPI +// #define GLAPI extern +// #endif +// #include +// #ifndef GLEXT_64_TYPES_DEFINED +// /* This code block is duplicated in glxext.h, so must be protected */ +// #define GLEXT_64_TYPES_DEFINED +// /* Define int32_t, int64_t, and uint64_t types for UST/MSC */ +// /* (as used in the GL_EXT_timer_query extension). */ +// #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +// #include +// #elif defined(__sun__) || defined(__digital__) +// #include +// #if defined(__STDC__) +// #if defined(__arch64__) || defined(_LP64) +// typedef long int int64_t; +// typedef unsigned long int uint64_t; +// #else +// typedef long long int int64_t; +// typedef unsigned long long int uint64_t; +// #endif /* __arch64__ */ +// #endif /* __STDC__ */ +// #elif defined( __VMS ) || defined(__sgi) +// #include +// #elif defined(__SCO__) || defined(__USLC__) +// #include +// #elif defined(__UNIXOS2__) || defined(__SOL64__) +// typedef long int int32_t; +// typedef long long int int64_t; +// typedef unsigned long long int uint64_t; +// #elif defined(_WIN32) && defined(__GNUC__) +// #include +// #elif defined(_WIN32) +// typedef __int32 int32_t; +// typedef __int64 int64_t; +// typedef unsigned __int64 uint64_t; +// #else +// /* Fallback if nothing above works */ +// #include +// #endif +// #endif +// typedef unsigned int GLenum; +// typedef unsigned char GLboolean; +// typedef unsigned int GLbitfield; +// typedef signed char GLbyte; +// typedef short GLshort; +// typedef int GLint; +// typedef unsigned char GLubyte; +// typedef unsigned short GLushort; +// typedef unsigned int GLuint; +// typedef int GLsizei; +// typedef float GLfloat; +// typedef double GLdouble; +// typedef void *GLeglImageOES; +// typedef char GLchar; +// typedef ptrdiff_t GLintptr; +// typedef ptrdiff_t GLsizeiptr; +// typedef int64_t GLint64; +// typedef uint64_t GLuint64; +// typedef int64_t GLint64EXT; +// typedef uint64_t GLuint64EXT; +// typedef uintptr_t GLsync; +// struct _cl_context; +// struct _cl_event; +// typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); +// typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); +// typedef void (APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); +// typedef void (APIENTRY *GLVULKANPROCNV)(void); +// extern void glowDebugCallback_glcore41(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam); +// static void APIENTRY glowCDebugCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam) { +// glowDebugCallback_glcore41(source, type, id, severity, length, message, userParam); +// } +// typedef void (APIENTRYP GPACTIVEPROGRAMEXT)(GLuint program); +// typedef void (APIENTRYP GPACTIVESHADERPROGRAM)(GLuint pipeline, GLuint program); +// typedef void (APIENTRYP GPACTIVESHADERPROGRAMEXT)(GLuint pipeline, GLuint program); +// typedef void (APIENTRYP GPACTIVETEXTURE)(GLenum texture); +// typedef void (APIENTRYP GPAPPLYFRAMEBUFFERATTACHMENTCMAAINTEL)(); +// typedef void (APIENTRYP GPATTACHSHADER)(GLuint program, GLuint shader); +// typedef void (APIENTRYP GPBEGINCONDITIONALRENDER)(GLuint id, GLenum mode); +// typedef void (APIENTRYP GPBEGINCONDITIONALRENDERNV)(GLuint id, GLenum mode); +// typedef void (APIENTRYP GPBEGINPERFMONITORAMD)(GLuint monitor); +// typedef void (APIENTRYP GPBEGINPERFQUERYINTEL)(GLuint queryHandle); +// typedef void (APIENTRYP GPBEGINQUERY)(GLenum target, GLuint id); +// typedef void (APIENTRYP GPBEGINQUERYINDEXED)(GLenum target, GLuint index, GLuint id); +// typedef void (APIENTRYP GPBEGINTRANSFORMFEEDBACK)(GLenum primitiveMode); +// typedef void (APIENTRYP GPBINDATTRIBLOCATION)(GLuint program, GLuint index, const GLchar * name); +// typedef void (APIENTRYP GPBINDBUFFER)(GLenum target, GLuint buffer); +// typedef void (APIENTRYP GPBINDBUFFERBASE)(GLenum target, GLuint index, GLuint buffer); +// typedef void (APIENTRYP GPBINDBUFFERRANGE)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +// typedef void (APIENTRYP GPBINDBUFFERSBASE)(GLenum target, GLuint first, GLsizei count, const GLuint * buffers); +// typedef void (APIENTRYP GPBINDBUFFERSRANGE)(GLenum target, GLuint first, GLsizei count, const GLuint * buffers, const GLintptr * offsets, const GLsizeiptr * sizes); +// typedef void (APIENTRYP GPBINDFRAGDATALOCATION)(GLuint program, GLuint color, const GLchar * name); +// typedef void (APIENTRYP GPBINDFRAGDATALOCATIONINDEXED)(GLuint program, GLuint colorNumber, GLuint index, const GLchar * name); +// typedef void (APIENTRYP GPBINDFRAMEBUFFER)(GLenum target, GLuint framebuffer); +// typedef void (APIENTRYP GPBINDIMAGETEXTURE)(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); +// typedef void (APIENTRYP GPBINDIMAGETEXTURES)(GLuint first, GLsizei count, const GLuint * textures); +// typedef void (APIENTRYP GPBINDMULTITEXTUREEXT)(GLenum texunit, GLenum target, GLuint texture); +// typedef void (APIENTRYP GPBINDPROGRAMPIPELINE)(GLuint pipeline); +// typedef void (APIENTRYP GPBINDPROGRAMPIPELINEEXT)(GLuint pipeline); +// typedef void (APIENTRYP GPBINDRENDERBUFFER)(GLenum target, GLuint renderbuffer); +// typedef void (APIENTRYP GPBINDSAMPLER)(GLuint unit, GLuint sampler); +// typedef void (APIENTRYP GPBINDSAMPLERS)(GLuint first, GLsizei count, const GLuint * samplers); +// typedef void (APIENTRYP GPBINDTEXTURE)(GLenum target, GLuint texture); +// typedef void (APIENTRYP GPBINDTEXTUREUNIT)(GLuint unit, GLuint texture); +// typedef void (APIENTRYP GPBINDTEXTURES)(GLuint first, GLsizei count, const GLuint * textures); +// typedef void (APIENTRYP GPBINDTRANSFORMFEEDBACK)(GLenum target, GLuint id); +// typedef void (APIENTRYP GPBINDVERTEXARRAY)(GLuint array); +// typedef void (APIENTRYP GPBINDVERTEXBUFFER)(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +// typedef void (APIENTRYP GPBINDVERTEXBUFFERS)(GLuint first, GLsizei count, const GLuint * buffers, const GLintptr * offsets, const GLsizei * strides); +// typedef void (APIENTRYP GPBLENDBARRIERKHR)(); +// typedef void (APIENTRYP GPBLENDBARRIERNV)(); +// typedef void (APIENTRYP GPBLENDCOLOR)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +// typedef void (APIENTRYP GPBLENDEQUATION)(GLenum mode); +// typedef void (APIENTRYP GPBLENDEQUATIONSEPARATE)(GLenum modeRGB, GLenum modeAlpha); +// typedef void (APIENTRYP GPBLENDEQUATIONSEPARATEI)(GLuint buf, GLenum modeRGB, GLenum modeAlpha); +// typedef void (APIENTRYP GPBLENDEQUATIONSEPARATEIARB)(GLuint buf, GLenum modeRGB, GLenum modeAlpha); +// typedef void (APIENTRYP GPBLENDEQUATIONI)(GLuint buf, GLenum mode); +// typedef void (APIENTRYP GPBLENDEQUATIONIARB)(GLuint buf, GLenum mode); +// typedef void (APIENTRYP GPBLENDFUNC)(GLenum sfactor, GLenum dfactor); +// typedef void (APIENTRYP GPBLENDFUNCSEPARATE)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +// typedef void (APIENTRYP GPBLENDFUNCSEPARATEI)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +// typedef void (APIENTRYP GPBLENDFUNCSEPARATEIARB)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +// typedef void (APIENTRYP GPBLENDFUNCI)(GLuint buf, GLenum src, GLenum dst); +// typedef void (APIENTRYP GPBLENDFUNCIARB)(GLuint buf, GLenum src, GLenum dst); +// typedef void (APIENTRYP GPBLENDPARAMETERINV)(GLenum pname, GLint value); +// typedef void (APIENTRYP GPBLITFRAMEBUFFER)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +// typedef void (APIENTRYP GPBLITNAMEDFRAMEBUFFER)(GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +// typedef void (APIENTRYP GPBUFFERADDRESSRANGENV)(GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); +// typedef void (APIENTRYP GPBUFFERDATA)(GLenum target, GLsizeiptr size, const void * data, GLenum usage); +// typedef void (APIENTRYP GPBUFFERPAGECOMMITMENTARB)(GLenum target, GLintptr offset, GLsizeiptr size, GLboolean commit); +// typedef void (APIENTRYP GPBUFFERSTORAGE)(GLenum target, GLsizeiptr size, const void * data, GLbitfield flags); +// typedef void (APIENTRYP GPBUFFERSUBDATA)(GLenum target, GLintptr offset, GLsizeiptr size, const void * data); +// typedef void (APIENTRYP GPCALLCOMMANDLISTNV)(GLuint list); +// typedef GLenum (APIENTRYP GPCHECKFRAMEBUFFERSTATUS)(GLenum target); +// typedef GLenum (APIENTRYP GPCHECKNAMEDFRAMEBUFFERSTATUS)(GLuint framebuffer, GLenum target); +// typedef GLenum (APIENTRYP GPCHECKNAMEDFRAMEBUFFERSTATUSEXT)(GLuint framebuffer, GLenum target); +// typedef void (APIENTRYP GPCLAMPCOLOR)(GLenum target, GLenum clamp); +// typedef void (APIENTRYP GPCLEAR)(GLbitfield mask); +// typedef void (APIENTRYP GPCLEARBUFFERDATA)(GLenum target, GLenum internalformat, GLenum format, GLenum type, const void * data); +// typedef void (APIENTRYP GPCLEARBUFFERSUBDATA)(GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void * data); +// typedef void (APIENTRYP GPCLEARBUFFERFI)(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +// typedef void (APIENTRYP GPCLEARBUFFERFV)(GLenum buffer, GLint drawbuffer, const GLfloat * value); +// typedef void (APIENTRYP GPCLEARBUFFERIV)(GLenum buffer, GLint drawbuffer, const GLint * value); +// typedef void (APIENTRYP GPCLEARBUFFERUIV)(GLenum buffer, GLint drawbuffer, const GLuint * value); +// typedef void (APIENTRYP GPCLEARCOLOR)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +// typedef void (APIENTRYP GPCLEARDEPTH)(GLdouble depth); +// typedef void (APIENTRYP GPCLEARDEPTHF)(GLfloat d); +// typedef void (APIENTRYP GPCLEARNAMEDBUFFERDATA)(GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void * data); +// typedef void (APIENTRYP GPCLEARNAMEDBUFFERDATAEXT)(GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void * data); +// typedef void (APIENTRYP GPCLEARNAMEDBUFFERSUBDATA)(GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void * data); +// typedef void (APIENTRYP GPCLEARNAMEDBUFFERSUBDATAEXT)(GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void * data); +// typedef void (APIENTRYP GPCLEARNAMEDFRAMEBUFFERFI)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +// typedef void (APIENTRYP GPCLEARNAMEDFRAMEBUFFERFV)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat * value); +// typedef void (APIENTRYP GPCLEARNAMEDFRAMEBUFFERIV)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint * value); +// typedef void (APIENTRYP GPCLEARNAMEDFRAMEBUFFERUIV)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint * value); +// typedef void (APIENTRYP GPCLEARSTENCIL)(GLint s); +// typedef void (APIENTRYP GPCLEARTEXIMAGE)(GLuint texture, GLint level, GLenum format, GLenum type, const void * data); +// typedef void (APIENTRYP GPCLEARTEXSUBIMAGE)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); +// typedef void (APIENTRYP GPCLIENTATTRIBDEFAULTEXT)(GLbitfield mask); +// typedef GLenum (APIENTRYP GPCLIENTWAITSYNC)(GLsync sync, GLbitfield flags, GLuint64 timeout); +// typedef void (APIENTRYP GPCLIPCONTROL)(GLenum origin, GLenum depth); +// typedef void (APIENTRYP GPCOLORFORMATNV)(GLint size, GLenum type, GLsizei stride); +// typedef void (APIENTRYP GPCOLORMASK)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +// typedef void (APIENTRYP GPCOLORMASKI)(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +// typedef void (APIENTRYP GPCOMMANDLISTSEGMENTSNV)(GLuint list, GLuint segments); +// typedef void (APIENTRYP GPCOMPILECOMMANDLISTNV)(GLuint list); +// typedef void (APIENTRYP GPCOMPILESHADER)(GLuint shader); +// typedef void (APIENTRYP GPCOMPILESHADERINCLUDEARB)(GLuint shader, GLsizei count, const GLchar *const* path, const GLint * length); +// typedef void (APIENTRYP GPCOMPRESSEDMULTITEXIMAGE1DEXT)(GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void * bits); +// typedef void (APIENTRYP GPCOMPRESSEDMULTITEXIMAGE2DEXT)(GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void * bits); +// typedef void (APIENTRYP GPCOMPRESSEDMULTITEXIMAGE3DEXT)(GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void * bits); +// typedef void (APIENTRYP GPCOMPRESSEDMULTITEXSUBIMAGE1DEXT)(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void * bits); +// typedef void (APIENTRYP GPCOMPRESSEDMULTITEXSUBIMAGE2DEXT)(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void * bits); +// typedef void (APIENTRYP GPCOMPRESSEDMULTITEXSUBIMAGE3DEXT)(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * bits); +// typedef void (APIENTRYP GPCOMPRESSEDTEXIMAGE1D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void * data); +// typedef void (APIENTRYP GPCOMPRESSEDTEXIMAGE2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void * data); +// typedef void (APIENTRYP GPCOMPRESSEDTEXIMAGE3D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void * data); +// typedef void (APIENTRYP GPCOMPRESSEDTEXSUBIMAGE1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void * data); +// typedef void (APIENTRYP GPCOMPRESSEDTEXSUBIMAGE2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void * data); +// typedef void (APIENTRYP GPCOMPRESSEDTEXSUBIMAGE3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * data); +// typedef void (APIENTRYP GPCOMPRESSEDTEXTUREIMAGE1DEXT)(GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void * bits); +// typedef void (APIENTRYP GPCOMPRESSEDTEXTUREIMAGE2DEXT)(GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void * bits); +// typedef void (APIENTRYP GPCOMPRESSEDTEXTUREIMAGE3DEXT)(GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void * bits); +// typedef void (APIENTRYP GPCOMPRESSEDTEXTURESUBIMAGE1D)(GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void * data); +// typedef void (APIENTRYP GPCOMPRESSEDTEXTURESUBIMAGE1DEXT)(GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void * bits); +// typedef void (APIENTRYP GPCOMPRESSEDTEXTURESUBIMAGE2D)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void * data); +// typedef void (APIENTRYP GPCOMPRESSEDTEXTURESUBIMAGE2DEXT)(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void * bits); +// typedef void (APIENTRYP GPCOMPRESSEDTEXTURESUBIMAGE3D)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * data); +// typedef void (APIENTRYP GPCOMPRESSEDTEXTURESUBIMAGE3DEXT)(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * bits); +// typedef void (APIENTRYP GPCONSERVATIVERASTERPARAMETERFNV)(GLenum pname, GLfloat value); +// typedef void (APIENTRYP GPCONSERVATIVERASTERPARAMETERINV)(GLenum pname, GLint param); +// typedef void (APIENTRYP GPCOPYBUFFERSUBDATA)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +// typedef void (APIENTRYP GPCOPYIMAGESUBDATA)(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); +// typedef void (APIENTRYP GPCOPYMULTITEXIMAGE1DEXT)(GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +// typedef void (APIENTRYP GPCOPYMULTITEXIMAGE2DEXT)(GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +// typedef void (APIENTRYP GPCOPYMULTITEXSUBIMAGE1DEXT)(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +// typedef void (APIENTRYP GPCOPYMULTITEXSUBIMAGE2DEXT)(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +// typedef void (APIENTRYP GPCOPYMULTITEXSUBIMAGE3DEXT)(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +// typedef void (APIENTRYP GPCOPYNAMEDBUFFERSUBDATA)(GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +// typedef void (APIENTRYP GPCOPYPATHNV)(GLuint resultPath, GLuint srcPath); +// typedef void (APIENTRYP GPCOPYTEXIMAGE1D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +// typedef void (APIENTRYP GPCOPYTEXIMAGE2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +// typedef void (APIENTRYP GPCOPYTEXSUBIMAGE1D)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +// typedef void (APIENTRYP GPCOPYTEXSUBIMAGE2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +// typedef void (APIENTRYP GPCOPYTEXSUBIMAGE3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +// typedef void (APIENTRYP GPCOPYTEXTUREIMAGE1DEXT)(GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +// typedef void (APIENTRYP GPCOPYTEXTUREIMAGE2DEXT)(GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +// typedef void (APIENTRYP GPCOPYTEXTURESUBIMAGE1D)(GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +// typedef void (APIENTRYP GPCOPYTEXTURESUBIMAGE1DEXT)(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +// typedef void (APIENTRYP GPCOPYTEXTURESUBIMAGE2D)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +// typedef void (APIENTRYP GPCOPYTEXTURESUBIMAGE2DEXT)(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +// typedef void (APIENTRYP GPCOPYTEXTURESUBIMAGE3D)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +// typedef void (APIENTRYP GPCOPYTEXTURESUBIMAGE3DEXT)(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +// typedef void (APIENTRYP GPCOVERFILLPATHINSTANCEDNV)(GLsizei numPaths, GLenum pathNameType, const void * paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat * transformValues); +// typedef void (APIENTRYP GPCOVERFILLPATHNV)(GLuint path, GLenum coverMode); +// typedef void (APIENTRYP GPCOVERSTROKEPATHINSTANCEDNV)(GLsizei numPaths, GLenum pathNameType, const void * paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat * transformValues); +// typedef void (APIENTRYP GPCOVERSTROKEPATHNV)(GLuint path, GLenum coverMode); +// typedef void (APIENTRYP GPCOVERAGEMODULATIONNV)(GLenum components); +// typedef void (APIENTRYP GPCOVERAGEMODULATIONTABLENV)(GLsizei n, const GLfloat * v); +// typedef void (APIENTRYP GPCREATEBUFFERS)(GLsizei n, GLuint * buffers); +// typedef void (APIENTRYP GPCREATECOMMANDLISTSNV)(GLsizei n, GLuint * lists); +// typedef void (APIENTRYP GPCREATEFRAMEBUFFERS)(GLsizei n, GLuint * framebuffers); +// typedef void (APIENTRYP GPCREATEPERFQUERYINTEL)(GLuint queryId, GLuint * queryHandle); +// typedef GLuint (APIENTRYP GPCREATEPROGRAM)(); +// typedef void (APIENTRYP GPCREATEPROGRAMPIPELINES)(GLsizei n, GLuint * pipelines); +// typedef void (APIENTRYP GPCREATEQUERIES)(GLenum target, GLsizei n, GLuint * ids); +// typedef void (APIENTRYP GPCREATERENDERBUFFERS)(GLsizei n, GLuint * renderbuffers); +// typedef void (APIENTRYP GPCREATESAMPLERS)(GLsizei n, GLuint * samplers); +// typedef GLuint (APIENTRYP GPCREATESHADER)(GLenum type); +// typedef GLuint (APIENTRYP GPCREATESHADERPROGRAMEXT)(GLenum type, const GLchar * string); +// typedef GLuint (APIENTRYP GPCREATESHADERPROGRAMV)(GLenum type, GLsizei count, const GLchar *const* strings); +// typedef GLuint (APIENTRYP GPCREATESHADERPROGRAMVEXT)(GLenum type, GLsizei count, const GLchar ** strings); +// typedef void (APIENTRYP GPCREATESTATESNV)(GLsizei n, GLuint * states); +// typedef GLsync (APIENTRYP GPCREATESYNCFROMCLEVENTARB)(struct _cl_context * context, struct _cl_event * event, GLbitfield flags); +// typedef void (APIENTRYP GPCREATETEXTURES)(GLenum target, GLsizei n, GLuint * textures); +// typedef void (APIENTRYP GPCREATETRANSFORMFEEDBACKS)(GLsizei n, GLuint * ids); +// typedef void (APIENTRYP GPCREATEVERTEXARRAYS)(GLsizei n, GLuint * arrays); +// typedef void (APIENTRYP GPCULLFACE)(GLenum mode); +// typedef void (APIENTRYP GPDEBUGMESSAGECALLBACK)(GLDEBUGPROC callback, const void * userParam); +// typedef void (APIENTRYP GPDEBUGMESSAGECALLBACKARB)(GLDEBUGPROCARB callback, const void * userParam); +// typedef void (APIENTRYP GPDEBUGMESSAGECALLBACKKHR)(GLDEBUGPROCKHR callback, const void * userParam); +// typedef void (APIENTRYP GPDEBUGMESSAGECONTROL)(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled); +// typedef void (APIENTRYP GPDEBUGMESSAGECONTROLARB)(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled); +// typedef void (APIENTRYP GPDEBUGMESSAGECONTROLKHR)(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled); +// typedef void (APIENTRYP GPDEBUGMESSAGEINSERT)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf); +// typedef void (APIENTRYP GPDEBUGMESSAGEINSERTARB)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf); +// typedef void (APIENTRYP GPDEBUGMESSAGEINSERTKHR)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf); +// typedef void (APIENTRYP GPDELETEBUFFERS)(GLsizei n, const GLuint * buffers); +// typedef void (APIENTRYP GPDELETECOMMANDLISTSNV)(GLsizei n, const GLuint * lists); +// typedef void (APIENTRYP GPDELETEFRAMEBUFFERS)(GLsizei n, const GLuint * framebuffers); +// typedef void (APIENTRYP GPDELETENAMEDSTRINGARB)(GLint namelen, const GLchar * name); +// typedef void (APIENTRYP GPDELETEPATHSNV)(GLuint path, GLsizei range); +// typedef void (APIENTRYP GPDELETEPERFMONITORSAMD)(GLsizei n, GLuint * monitors); +// typedef void (APIENTRYP GPDELETEPERFQUERYINTEL)(GLuint queryHandle); +// typedef void (APIENTRYP GPDELETEPROGRAM)(GLuint program); +// typedef void (APIENTRYP GPDELETEPROGRAMPIPELINES)(GLsizei n, const GLuint * pipelines); +// typedef void (APIENTRYP GPDELETEPROGRAMPIPELINESEXT)(GLsizei n, const GLuint * pipelines); +// typedef void (APIENTRYP GPDELETEQUERIES)(GLsizei n, const GLuint * ids); +// typedef void (APIENTRYP GPDELETERENDERBUFFERS)(GLsizei n, const GLuint * renderbuffers); +// typedef void (APIENTRYP GPDELETESAMPLERS)(GLsizei count, const GLuint * samplers); +// typedef void (APIENTRYP GPDELETESHADER)(GLuint shader); +// typedef void (APIENTRYP GPDELETESTATESNV)(GLsizei n, const GLuint * states); +// typedef void (APIENTRYP GPDELETESYNC)(GLsync sync); +// typedef void (APIENTRYP GPDELETETEXTURES)(GLsizei n, const GLuint * textures); +// typedef void (APIENTRYP GPDELETETRANSFORMFEEDBACKS)(GLsizei n, const GLuint * ids); +// typedef void (APIENTRYP GPDELETEVERTEXARRAYS)(GLsizei n, const GLuint * arrays); +// typedef void (APIENTRYP GPDEPTHFUNC)(GLenum func); +// typedef void (APIENTRYP GPDEPTHMASK)(GLboolean flag); +// typedef void (APIENTRYP GPDEPTHRANGE)(GLdouble n, GLdouble f); +// typedef void (APIENTRYP GPDEPTHRANGEARRAYV)(GLuint first, GLsizei count, const GLdouble * v); +// typedef void (APIENTRYP GPDEPTHRANGEINDEXED)(GLuint index, GLdouble n, GLdouble f); +// typedef void (APIENTRYP GPDEPTHRANGEF)(GLfloat n, GLfloat f); +// typedef void (APIENTRYP GPDETACHSHADER)(GLuint program, GLuint shader); +// typedef void (APIENTRYP GPDISABLE)(GLenum cap); +// typedef void (APIENTRYP GPDISABLECLIENTSTATEINDEXEDEXT)(GLenum array, GLuint index); +// typedef void (APIENTRYP GPDISABLECLIENTSTATEIEXT)(GLenum array, GLuint index); +// typedef void (APIENTRYP GPDISABLEINDEXEDEXT)(GLenum target, GLuint index); +// typedef void (APIENTRYP GPDISABLEVERTEXARRAYATTRIB)(GLuint vaobj, GLuint index); +// typedef void (APIENTRYP GPDISABLEVERTEXARRAYATTRIBEXT)(GLuint vaobj, GLuint index); +// typedef void (APIENTRYP GPDISABLEVERTEXARRAYEXT)(GLuint vaobj, GLenum array); +// typedef void (APIENTRYP GPDISABLEVERTEXATTRIBARRAY)(GLuint index); +// typedef void (APIENTRYP GPDISABLEI)(GLenum target, GLuint index); +// typedef void (APIENTRYP GPDISPATCHCOMPUTE)(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); +// typedef void (APIENTRYP GPDISPATCHCOMPUTEGROUPSIZEARB)(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z); +// typedef void (APIENTRYP GPDISPATCHCOMPUTEINDIRECT)(GLintptr indirect); +// typedef void (APIENTRYP GPDRAWARRAYS)(GLenum mode, GLint first, GLsizei count); +// typedef void (APIENTRYP GPDRAWARRAYSINDIRECT)(GLenum mode, const void * indirect); +// typedef void (APIENTRYP GPDRAWARRAYSINSTANCED)(GLenum mode, GLint first, GLsizei count, GLsizei instancecount); +// typedef void (APIENTRYP GPDRAWARRAYSINSTANCEDARB)(GLenum mode, GLint first, GLsizei count, GLsizei primcount); +// typedef void (APIENTRYP GPDRAWARRAYSINSTANCEDBASEINSTANCE)(GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); +// typedef void (APIENTRYP GPDRAWARRAYSINSTANCEDEXT)(GLenum mode, GLint start, GLsizei count, GLsizei primcount); +// typedef void (APIENTRYP GPDRAWBUFFER)(GLenum buf); +// typedef void (APIENTRYP GPDRAWBUFFERS)(GLsizei n, const GLenum * bufs); +// typedef void (APIENTRYP GPDRAWCOMMANDSADDRESSNV)(GLenum primitiveMode, const GLuint64 * indirects, const GLsizei * sizes, GLuint count); +// typedef void (APIENTRYP GPDRAWCOMMANDSNV)(GLenum primitiveMode, GLuint buffer, const GLintptr * indirects, const GLsizei * sizes, GLuint count); +// typedef void (APIENTRYP GPDRAWCOMMANDSSTATESADDRESSNV)(const GLuint64 * indirects, const GLsizei * sizes, const GLuint * states, const GLuint * fbos, GLuint count); +// typedef void (APIENTRYP GPDRAWCOMMANDSSTATESNV)(GLuint buffer, const GLintptr * indirects, const GLsizei * sizes, const GLuint * states, const GLuint * fbos, GLuint count); +// typedef void (APIENTRYP GPDRAWELEMENTS)(GLenum mode, GLsizei count, GLenum type, const void * indices); +// typedef void (APIENTRYP GPDRAWELEMENTSBASEVERTEX)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLint basevertex); +// typedef void (APIENTRYP GPDRAWELEMENTSINDIRECT)(GLenum mode, GLenum type, const void * indirect); +// typedef void (APIENTRYP GPDRAWELEMENTSINSTANCED)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount); +// typedef void (APIENTRYP GPDRAWELEMENTSINSTANCEDARB)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei primcount); +// typedef void (APIENTRYP GPDRAWELEMENTSINSTANCEDBASEINSTANCE)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount, GLuint baseinstance); +// typedef void (APIENTRYP GPDRAWELEMENTSINSTANCEDBASEVERTEX)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount, GLint basevertex); +// typedef void (APIENTRYP GPDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCE)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); +// typedef void (APIENTRYP GPDRAWELEMENTSINSTANCEDEXT)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei primcount); +// typedef void (APIENTRYP GPDRAWRANGEELEMENTS)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void * indices); +// typedef void (APIENTRYP GPDRAWRANGEELEMENTSBASEVERTEX)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void * indices, GLint basevertex); +// typedef void (APIENTRYP GPDRAWTRANSFORMFEEDBACK)(GLenum mode, GLuint id); +// typedef void (APIENTRYP GPDRAWTRANSFORMFEEDBACKINSTANCED)(GLenum mode, GLuint id, GLsizei instancecount); +// typedef void (APIENTRYP GPDRAWTRANSFORMFEEDBACKSTREAM)(GLenum mode, GLuint id, GLuint stream); +// typedef void (APIENTRYP GPDRAWTRANSFORMFEEDBACKSTREAMINSTANCED)(GLenum mode, GLuint id, GLuint stream, GLsizei instancecount); +// typedef void (APIENTRYP GPDRAWVKIMAGENV)(GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); +// typedef void (APIENTRYP GPEGLIMAGETARGETTEXSTORAGEEXT)(GLenum target, GLeglImageOES image, const GLint* attrib_list); +// typedef void (APIENTRYP GPEGLIMAGETARGETTEXTURESTORAGEEXT)(GLuint texture, GLeglImageOES image, const GLint* attrib_list); +// typedef void (APIENTRYP GPEDGEFLAGFORMATNV)(GLsizei stride); +// typedef void (APIENTRYP GPENABLE)(GLenum cap); +// typedef void (APIENTRYP GPENABLECLIENTSTATEINDEXEDEXT)(GLenum array, GLuint index); +// typedef void (APIENTRYP GPENABLECLIENTSTATEIEXT)(GLenum array, GLuint index); +// typedef void (APIENTRYP GPENABLEINDEXEDEXT)(GLenum target, GLuint index); +// typedef void (APIENTRYP GPENABLEVERTEXARRAYATTRIB)(GLuint vaobj, GLuint index); +// typedef void (APIENTRYP GPENABLEVERTEXARRAYATTRIBEXT)(GLuint vaobj, GLuint index); +// typedef void (APIENTRYP GPENABLEVERTEXARRAYEXT)(GLuint vaobj, GLenum array); +// typedef void (APIENTRYP GPENABLEVERTEXATTRIBARRAY)(GLuint index); +// typedef void (APIENTRYP GPENABLEI)(GLenum target, GLuint index); +// typedef void (APIENTRYP GPENDCONDITIONALRENDER)(); +// typedef void (APIENTRYP GPENDCONDITIONALRENDERNV)(); +// typedef void (APIENTRYP GPENDPERFMONITORAMD)(GLuint monitor); +// typedef void (APIENTRYP GPENDPERFQUERYINTEL)(GLuint queryHandle); +// typedef void (APIENTRYP GPENDQUERY)(GLenum target); +// typedef void (APIENTRYP GPENDQUERYINDEXED)(GLenum target, GLuint index); +// typedef void (APIENTRYP GPENDTRANSFORMFEEDBACK)(); +// typedef void (APIENTRYP GPEVALUATEDEPTHVALUESARB)(); +// typedef GLsync (APIENTRYP GPFENCESYNC)(GLenum condition, GLbitfield flags); +// typedef void (APIENTRYP GPFINISH)(); +// typedef void (APIENTRYP GPFLUSH)(); +// typedef void (APIENTRYP GPFLUSHMAPPEDBUFFERRANGE)(GLenum target, GLintptr offset, GLsizeiptr length); +// typedef void (APIENTRYP GPFLUSHMAPPEDNAMEDBUFFERRANGE)(GLuint buffer, GLintptr offset, GLsizeiptr length); +// typedef void (APIENTRYP GPFLUSHMAPPEDNAMEDBUFFERRANGEEXT)(GLuint buffer, GLintptr offset, GLsizeiptr length); +// typedef void (APIENTRYP GPFOGCOORDFORMATNV)(GLenum type, GLsizei stride); +// typedef void (APIENTRYP GPFRAGMENTCOVERAGECOLORNV)(GLuint color); +// typedef void (APIENTRYP GPFRAMEBUFFERDRAWBUFFEREXT)(GLuint framebuffer, GLenum mode); +// typedef void (APIENTRYP GPFRAMEBUFFERDRAWBUFFERSEXT)(GLuint framebuffer, GLsizei n, const GLenum * bufs); +// typedef void (APIENTRYP GPFRAMEBUFFERFETCHBARRIEREXT)(); +// typedef void (APIENTRYP GPFRAMEBUFFERPARAMETERI)(GLenum target, GLenum pname, GLint param); +// typedef void (APIENTRYP GPFRAMEBUFFERREADBUFFEREXT)(GLuint framebuffer, GLenum mode); +// typedef void (APIENTRYP GPFRAMEBUFFERRENDERBUFFER)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +// typedef void (APIENTRYP GPFRAMEBUFFERSAMPLELOCATIONSFVARB)(GLenum target, GLuint start, GLsizei count, const GLfloat * v); +// typedef void (APIENTRYP GPFRAMEBUFFERSAMPLELOCATIONSFVNV)(GLenum target, GLuint start, GLsizei count, const GLfloat * v); +// typedef void (APIENTRYP GPFRAMEBUFFERTEXTURE)(GLenum target, GLenum attachment, GLuint texture, GLint level); +// typedef void (APIENTRYP GPFRAMEBUFFERTEXTURE1D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +// typedef void (APIENTRYP GPFRAMEBUFFERTEXTURE2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +// typedef void (APIENTRYP GPFRAMEBUFFERTEXTURE3D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +// typedef void (APIENTRYP GPFRAMEBUFFERTEXTUREARB)(GLenum target, GLenum attachment, GLuint texture, GLint level); +// typedef void (APIENTRYP GPFRAMEBUFFERTEXTUREFACEARB)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +// typedef void (APIENTRYP GPFRAMEBUFFERTEXTURELAYER)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +// typedef void (APIENTRYP GPFRAMEBUFFERTEXTURELAYERARB)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +// typedef void (APIENTRYP GPFRAMEBUFFERTEXTUREMULTIVIEWOVR)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews); +// typedef void (APIENTRYP GPFRONTFACE)(GLenum mode); +// typedef void (APIENTRYP GPGENBUFFERS)(GLsizei n, GLuint * buffers); +// typedef void (APIENTRYP GPGENFRAMEBUFFERS)(GLsizei n, GLuint * framebuffers); +// typedef GLuint (APIENTRYP GPGENPATHSNV)(GLsizei range); +// typedef void (APIENTRYP GPGENPERFMONITORSAMD)(GLsizei n, GLuint * monitors); +// typedef void (APIENTRYP GPGENPROGRAMPIPELINES)(GLsizei n, GLuint * pipelines); +// typedef void (APIENTRYP GPGENPROGRAMPIPELINESEXT)(GLsizei n, GLuint * pipelines); +// typedef void (APIENTRYP GPGENQUERIES)(GLsizei n, GLuint * ids); +// typedef void (APIENTRYP GPGENRENDERBUFFERS)(GLsizei n, GLuint * renderbuffers); +// typedef void (APIENTRYP GPGENSAMPLERS)(GLsizei count, GLuint * samplers); +// typedef void (APIENTRYP GPGENTEXTURES)(GLsizei n, GLuint * textures); +// typedef void (APIENTRYP GPGENTRANSFORMFEEDBACKS)(GLsizei n, GLuint * ids); +// typedef void (APIENTRYP GPGENVERTEXARRAYS)(GLsizei n, GLuint * arrays); +// typedef void (APIENTRYP GPGENERATEMIPMAP)(GLenum target); +// typedef void (APIENTRYP GPGENERATEMULTITEXMIPMAPEXT)(GLenum texunit, GLenum target); +// typedef void (APIENTRYP GPGENERATETEXTUREMIPMAP)(GLuint texture); +// typedef void (APIENTRYP GPGENERATETEXTUREMIPMAPEXT)(GLuint texture, GLenum target); +// typedef void (APIENTRYP GPGETACTIVEATOMICCOUNTERBUFFERIV)(GLuint program, GLuint bufferIndex, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETACTIVEATTRIB)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name); +// typedef void (APIENTRYP GPGETACTIVESUBROUTINENAME)(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei * length, GLchar * name); +// typedef void (APIENTRYP GPGETACTIVESUBROUTINEUNIFORMNAME)(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei * length, GLchar * name); +// typedef void (APIENTRYP GPGETACTIVESUBROUTINEUNIFORMIV)(GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint * values); +// typedef void (APIENTRYP GPGETACTIVEUNIFORM)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name); +// typedef void (APIENTRYP GPGETACTIVEUNIFORMBLOCKNAME)(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei * length, GLchar * uniformBlockName); +// typedef void (APIENTRYP GPGETACTIVEUNIFORMBLOCKIV)(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETACTIVEUNIFORMNAME)(GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei * length, GLchar * uniformName); +// typedef void (APIENTRYP GPGETACTIVEUNIFORMSIV)(GLuint program, GLsizei uniformCount, const GLuint * uniformIndices, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETATTACHEDSHADERS)(GLuint program, GLsizei maxCount, GLsizei * count, GLuint * shaders); +// typedef GLint (APIENTRYP GPGETATTRIBLOCATION)(GLuint program, const GLchar * name); +// typedef void (APIENTRYP GPGETBOOLEANINDEXEDVEXT)(GLenum target, GLuint index, GLboolean * data); +// typedef void (APIENTRYP GPGETBOOLEANI_V)(GLenum target, GLuint index, GLboolean * data); +// typedef void (APIENTRYP GPGETBOOLEANV)(GLenum pname, GLboolean * data); +// typedef void (APIENTRYP GPGETBUFFERPARAMETERI64V)(GLenum target, GLenum pname, GLint64 * params); +// typedef void (APIENTRYP GPGETBUFFERPARAMETERIV)(GLenum target, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETBUFFERPARAMETERUI64VNV)(GLenum target, GLenum pname, GLuint64EXT * params); +// typedef void (APIENTRYP GPGETBUFFERPOINTERV)(GLenum target, GLenum pname, void ** params); +// typedef void (APIENTRYP GPGETBUFFERSUBDATA)(GLenum target, GLintptr offset, GLsizeiptr size, void * data); +// typedef GLuint (APIENTRYP GPGETCOMMANDHEADERNV)(GLenum tokenID, GLuint size); +// typedef void (APIENTRYP GPGETCOMPRESSEDMULTITEXIMAGEEXT)(GLenum texunit, GLenum target, GLint lod, void * img); +// typedef void (APIENTRYP GPGETCOMPRESSEDTEXIMAGE)(GLenum target, GLint level, void * img); +// typedef void (APIENTRYP GPGETCOMPRESSEDTEXTUREIMAGE)(GLuint texture, GLint level, GLsizei bufSize, void * pixels); +// typedef void (APIENTRYP GPGETCOMPRESSEDTEXTUREIMAGEEXT)(GLuint texture, GLenum target, GLint lod, void * img); +// typedef void (APIENTRYP GPGETCOMPRESSEDTEXTURESUBIMAGE)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void * pixels); +// typedef void (APIENTRYP GPGETCOVERAGEMODULATIONTABLENV)(GLsizei bufsize, GLfloat * v); +// typedef GLuint (APIENTRYP GPGETDEBUGMESSAGELOG)(GLuint count, GLsizei bufSize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog); +// typedef GLuint (APIENTRYP GPGETDEBUGMESSAGELOGARB)(GLuint count, GLsizei bufSize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog); +// typedef GLuint (APIENTRYP GPGETDEBUGMESSAGELOGKHR)(GLuint count, GLsizei bufSize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog); +// typedef void (APIENTRYP GPGETDOUBLEINDEXEDVEXT)(GLenum target, GLuint index, GLdouble * data); +// typedef void (APIENTRYP GPGETDOUBLEI_V)(GLenum target, GLuint index, GLdouble * data); +// typedef void (APIENTRYP GPGETDOUBLEI_VEXT)(GLenum pname, GLuint index, GLdouble * params); +// typedef void (APIENTRYP GPGETDOUBLEV)(GLenum pname, GLdouble * data); +// typedef GLenum (APIENTRYP GPGETERROR)(); +// typedef void (APIENTRYP GPGETFIRSTPERFQUERYIDINTEL)(GLuint * queryId); +// typedef void (APIENTRYP GPGETFLOATINDEXEDVEXT)(GLenum target, GLuint index, GLfloat * data); +// typedef void (APIENTRYP GPGETFLOATI_V)(GLenum target, GLuint index, GLfloat * data); +// typedef void (APIENTRYP GPGETFLOATI_VEXT)(GLenum pname, GLuint index, GLfloat * params); +// typedef void (APIENTRYP GPGETFLOATV)(GLenum pname, GLfloat * data); +// typedef GLint (APIENTRYP GPGETFRAGDATAINDEX)(GLuint program, const GLchar * name); +// typedef GLint (APIENTRYP GPGETFRAGDATALOCATION)(GLuint program, const GLchar * name); +// typedef void (APIENTRYP GPGETFRAMEBUFFERATTACHMENTPARAMETERIV)(GLenum target, GLenum attachment, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETFRAMEBUFFERPARAMETERIV)(GLenum target, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETFRAMEBUFFERPARAMETERIVEXT)(GLuint framebuffer, GLenum pname, GLint * params); +// typedef GLenum (APIENTRYP GPGETGRAPHICSRESETSTATUS)(); +// typedef GLenum (APIENTRYP GPGETGRAPHICSRESETSTATUSARB)(); +// typedef GLenum (APIENTRYP GPGETGRAPHICSRESETSTATUSKHR)(); +// typedef GLuint64 (APIENTRYP GPGETIMAGEHANDLEARB)(GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); +// typedef GLuint64 (APIENTRYP GPGETIMAGEHANDLENV)(GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); +// typedef void (APIENTRYP GPGETINTEGER64I_V)(GLenum target, GLuint index, GLint64 * data); +// typedef void (APIENTRYP GPGETINTEGER64V)(GLenum pname, GLint64 * data); +// typedef void (APIENTRYP GPGETINTEGERINDEXEDVEXT)(GLenum target, GLuint index, GLint * data); +// typedef void (APIENTRYP GPGETINTEGERI_V)(GLenum target, GLuint index, GLint * data); +// typedef void (APIENTRYP GPGETINTEGERUI64I_VNV)(GLenum value, GLuint index, GLuint64EXT * result); +// typedef void (APIENTRYP GPGETINTEGERUI64VNV)(GLenum value, GLuint64EXT * result); +// typedef void (APIENTRYP GPGETINTEGERV)(GLenum pname, GLint * data); +// typedef void (APIENTRYP GPGETINTERNALFORMATSAMPLEIVNV)(GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei bufSize, GLint * params); +// typedef void (APIENTRYP GPGETINTERNALFORMATI64V)(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 * params); +// typedef void (APIENTRYP GPGETINTERNALFORMATIV)(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint * params); +// typedef void (APIENTRYP GPGETMULTITEXENVFVEXT)(GLenum texunit, GLenum target, GLenum pname, GLfloat * params); +// typedef void (APIENTRYP GPGETMULTITEXENVIVEXT)(GLenum texunit, GLenum target, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETMULTITEXGENDVEXT)(GLenum texunit, GLenum coord, GLenum pname, GLdouble * params); +// typedef void (APIENTRYP GPGETMULTITEXGENFVEXT)(GLenum texunit, GLenum coord, GLenum pname, GLfloat * params); +// typedef void (APIENTRYP GPGETMULTITEXGENIVEXT)(GLenum texunit, GLenum coord, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETMULTITEXIMAGEEXT)(GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void * pixels); +// typedef void (APIENTRYP GPGETMULTITEXLEVELPARAMETERFVEXT)(GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat * params); +// typedef void (APIENTRYP GPGETMULTITEXLEVELPARAMETERIVEXT)(GLenum texunit, GLenum target, GLint level, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETMULTITEXPARAMETERIIVEXT)(GLenum texunit, GLenum target, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETMULTITEXPARAMETERIUIVEXT)(GLenum texunit, GLenum target, GLenum pname, GLuint * params); +// typedef void (APIENTRYP GPGETMULTITEXPARAMETERFVEXT)(GLenum texunit, GLenum target, GLenum pname, GLfloat * params); +// typedef void (APIENTRYP GPGETMULTITEXPARAMETERIVEXT)(GLenum texunit, GLenum target, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETMULTISAMPLEFV)(GLenum pname, GLuint index, GLfloat * val); +// typedef void (APIENTRYP GPGETNAMEDBUFFERPARAMETERI64V)(GLuint buffer, GLenum pname, GLint64 * params); +// typedef void (APIENTRYP GPGETNAMEDBUFFERPARAMETERIV)(GLuint buffer, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETNAMEDBUFFERPARAMETERIVEXT)(GLuint buffer, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETNAMEDBUFFERPARAMETERUI64VNV)(GLuint buffer, GLenum pname, GLuint64EXT * params); +// typedef void (APIENTRYP GPGETNAMEDBUFFERPOINTERV)(GLuint buffer, GLenum pname, void ** params); +// typedef void (APIENTRYP GPGETNAMEDBUFFERPOINTERVEXT)(GLuint buffer, GLenum pname, void ** params); +// typedef void (APIENTRYP GPGETNAMEDBUFFERSUBDATA)(GLuint buffer, GLintptr offset, GLsizeiptr size, void * data); +// typedef void (APIENTRYP GPGETNAMEDBUFFERSUBDATAEXT)(GLuint buffer, GLintptr offset, GLsizeiptr size, void * data); +// typedef void (APIENTRYP GPGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIV)(GLuint framebuffer, GLenum attachment, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXT)(GLuint framebuffer, GLenum attachment, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETNAMEDFRAMEBUFFERPARAMETERIV)(GLuint framebuffer, GLenum pname, GLint * param); +// typedef void (APIENTRYP GPGETNAMEDFRAMEBUFFERPARAMETERIVEXT)(GLuint framebuffer, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETNAMEDPROGRAMLOCALPARAMETERIIVEXT)(GLuint program, GLenum target, GLuint index, GLint * params); +// typedef void (APIENTRYP GPGETNAMEDPROGRAMLOCALPARAMETERIUIVEXT)(GLuint program, GLenum target, GLuint index, GLuint * params); +// typedef void (APIENTRYP GPGETNAMEDPROGRAMLOCALPARAMETERDVEXT)(GLuint program, GLenum target, GLuint index, GLdouble * params); +// typedef void (APIENTRYP GPGETNAMEDPROGRAMLOCALPARAMETERFVEXT)(GLuint program, GLenum target, GLuint index, GLfloat * params); +// typedef void (APIENTRYP GPGETNAMEDPROGRAMSTRINGEXT)(GLuint program, GLenum target, GLenum pname, void * string); +// typedef void (APIENTRYP GPGETNAMEDPROGRAMIVEXT)(GLuint program, GLenum target, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETNAMEDRENDERBUFFERPARAMETERIV)(GLuint renderbuffer, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETNAMEDRENDERBUFFERPARAMETERIVEXT)(GLuint renderbuffer, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETNAMEDSTRINGARB)(GLint namelen, const GLchar * name, GLsizei bufSize, GLint * stringlen, GLchar * string); +// typedef void (APIENTRYP GPGETNAMEDSTRINGIVARB)(GLint namelen, const GLchar * name, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETNEXTPERFQUERYIDINTEL)(GLuint queryId, GLuint * nextQueryId); +// typedef void (APIENTRYP GPGETOBJECTLABEL)(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei * length, GLchar * label); +// typedef void (APIENTRYP GPGETOBJECTLABELEXT)(GLenum type, GLuint object, GLsizei bufSize, GLsizei * length, GLchar * label); +// typedef void (APIENTRYP GPGETOBJECTLABELKHR)(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei * length, GLchar * label); +// typedef void (APIENTRYP GPGETOBJECTPTRLABEL)(const void * ptr, GLsizei bufSize, GLsizei * length, GLchar * label); +// typedef void (APIENTRYP GPGETOBJECTPTRLABELKHR)(const void * ptr, GLsizei bufSize, GLsizei * length, GLchar * label); +// typedef void (APIENTRYP GPGETPATHCOMMANDSNV)(GLuint path, GLubyte * commands); +// typedef void (APIENTRYP GPGETPATHCOORDSNV)(GLuint path, GLfloat * coords); +// typedef void (APIENTRYP GPGETPATHDASHARRAYNV)(GLuint path, GLfloat * dashArray); +// typedef GLfloat (APIENTRYP GPGETPATHLENGTHNV)(GLuint path, GLsizei startSegment, GLsizei numSegments); +// typedef void (APIENTRYP GPGETPATHMETRICRANGENV)(GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat * metrics); +// typedef void (APIENTRYP GPGETPATHMETRICSNV)(GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void * paths, GLuint pathBase, GLsizei stride, GLfloat * metrics); +// typedef void (APIENTRYP GPGETPATHPARAMETERFVNV)(GLuint path, GLenum pname, GLfloat * value); +// typedef void (APIENTRYP GPGETPATHPARAMETERIVNV)(GLuint path, GLenum pname, GLint * value); +// typedef void (APIENTRYP GPGETPATHSPACINGNV)(GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void * paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat * returnedSpacing); +// typedef void (APIENTRYP GPGETPERFCOUNTERINFOINTEL)(GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar * counterName, GLuint counterDescLength, GLchar * counterDesc, GLuint * counterOffset, GLuint * counterDataSize, GLuint * counterTypeEnum, GLuint * counterDataTypeEnum, GLuint64 * rawCounterMaxValue); +// typedef void (APIENTRYP GPGETPERFMONITORCOUNTERDATAAMD)(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint * data, GLint * bytesWritten); +// typedef void (APIENTRYP GPGETPERFMONITORCOUNTERINFOAMD)(GLuint group, GLuint counter, GLenum pname, void * data); +// typedef void (APIENTRYP GPGETPERFMONITORCOUNTERSTRINGAMD)(GLuint group, GLuint counter, GLsizei bufSize, GLsizei * length, GLchar * counterString); +// typedef void (APIENTRYP GPGETPERFMONITORCOUNTERSAMD)(GLuint group, GLint * numCounters, GLint * maxActiveCounters, GLsizei counterSize, GLuint * counters); +// typedef void (APIENTRYP GPGETPERFMONITORGROUPSTRINGAMD)(GLuint group, GLsizei bufSize, GLsizei * length, GLchar * groupString); +// typedef void (APIENTRYP GPGETPERFMONITORGROUPSAMD)(GLint * numGroups, GLsizei groupsSize, GLuint * groups); +// typedef void (APIENTRYP GPGETPERFQUERYDATAINTEL)(GLuint queryHandle, GLuint flags, GLsizei dataSize, void * data, GLuint * bytesWritten); +// typedef void (APIENTRYP GPGETPERFQUERYIDBYNAMEINTEL)(GLchar * queryName, GLuint * queryId); +// typedef void (APIENTRYP GPGETPERFQUERYINFOINTEL)(GLuint queryId, GLuint queryNameLength, GLchar * queryName, GLuint * dataSize, GLuint * noCounters, GLuint * noInstances, GLuint * capsMask); +// typedef void (APIENTRYP GPGETPOINTERINDEXEDVEXT)(GLenum target, GLuint index, void ** data); +// typedef void (APIENTRYP GPGETPOINTERI_VEXT)(GLenum pname, GLuint index, void ** params); +// typedef void (APIENTRYP GPGETPOINTERV)(GLenum pname, void ** params); +// typedef void (APIENTRYP GPGETPOINTERVKHR)(GLenum pname, void ** params); +// typedef void (APIENTRYP GPGETPROGRAMBINARY)(GLuint program, GLsizei bufSize, GLsizei * length, GLenum * binaryFormat, void * binary); +// typedef void (APIENTRYP GPGETPROGRAMINFOLOG)(GLuint program, GLsizei bufSize, GLsizei * length, GLchar * infoLog); +// typedef void (APIENTRYP GPGETPROGRAMINTERFACEIV)(GLuint program, GLenum programInterface, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETPROGRAMPIPELINEINFOLOG)(GLuint pipeline, GLsizei bufSize, GLsizei * length, GLchar * infoLog); +// typedef void (APIENTRYP GPGETPROGRAMPIPELINEINFOLOGEXT)(GLuint pipeline, GLsizei bufSize, GLsizei * length, GLchar * infoLog); +// typedef void (APIENTRYP GPGETPROGRAMPIPELINEIV)(GLuint pipeline, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETPROGRAMPIPELINEIVEXT)(GLuint pipeline, GLenum pname, GLint * params); +// typedef GLuint (APIENTRYP GPGETPROGRAMRESOURCEINDEX)(GLuint program, GLenum programInterface, const GLchar * name); +// typedef GLint (APIENTRYP GPGETPROGRAMRESOURCELOCATION)(GLuint program, GLenum programInterface, const GLchar * name); +// typedef GLint (APIENTRYP GPGETPROGRAMRESOURCELOCATIONINDEX)(GLuint program, GLenum programInterface, const GLchar * name); +// typedef void (APIENTRYP GPGETPROGRAMRESOURCENAME)(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei * length, GLchar * name); +// typedef void (APIENTRYP GPGETPROGRAMRESOURCEFVNV)(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum * props, GLsizei bufSize, GLsizei * length, GLfloat * params); +// typedef void (APIENTRYP GPGETPROGRAMRESOURCEIV)(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum * props, GLsizei bufSize, GLsizei * length, GLint * params); +// typedef void (APIENTRYP GPGETPROGRAMSTAGEIV)(GLuint program, GLenum shadertype, GLenum pname, GLint * values); +// typedef void (APIENTRYP GPGETPROGRAMIV)(GLuint program, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETQUERYBUFFEROBJECTI64V)(GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +// typedef void (APIENTRYP GPGETQUERYBUFFEROBJECTIV)(GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +// typedef void (APIENTRYP GPGETQUERYBUFFEROBJECTUI64V)(GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +// typedef void (APIENTRYP GPGETQUERYBUFFEROBJECTUIV)(GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +// typedef void (APIENTRYP GPGETQUERYINDEXEDIV)(GLenum target, GLuint index, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETQUERYOBJECTI64V)(GLuint id, GLenum pname, GLint64 * params); +// typedef void (APIENTRYP GPGETQUERYOBJECTIV)(GLuint id, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETQUERYOBJECTUI64V)(GLuint id, GLenum pname, GLuint64 * params); +// typedef void (APIENTRYP GPGETQUERYOBJECTUIV)(GLuint id, GLenum pname, GLuint * params); +// typedef void (APIENTRYP GPGETQUERYIV)(GLenum target, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETRENDERBUFFERPARAMETERIV)(GLenum target, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETSAMPLERPARAMETERIIV)(GLuint sampler, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETSAMPLERPARAMETERIUIV)(GLuint sampler, GLenum pname, GLuint * params); +// typedef void (APIENTRYP GPGETSAMPLERPARAMETERFV)(GLuint sampler, GLenum pname, GLfloat * params); +// typedef void (APIENTRYP GPGETSAMPLERPARAMETERIV)(GLuint sampler, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETSHADERINFOLOG)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * infoLog); +// typedef void (APIENTRYP GPGETSHADERPRECISIONFORMAT)(GLenum shadertype, GLenum precisiontype, GLint * range, GLint * precision); +// typedef void (APIENTRYP GPGETSHADERSOURCE)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * source); +// typedef void (APIENTRYP GPGETSHADERIV)(GLuint shader, GLenum pname, GLint * params); +// typedef GLushort (APIENTRYP GPGETSTAGEINDEXNV)(GLenum shadertype); +// typedef const GLubyte * (APIENTRYP GPGETSTRING)(GLenum name); +// typedef const GLubyte * (APIENTRYP GPGETSTRINGI)(GLenum name, GLuint index); +// typedef GLuint (APIENTRYP GPGETSUBROUTINEINDEX)(GLuint program, GLenum shadertype, const GLchar * name); +// typedef GLint (APIENTRYP GPGETSUBROUTINEUNIFORMLOCATION)(GLuint program, GLenum shadertype, const GLchar * name); +// typedef void (APIENTRYP GPGETSYNCIV)(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * values); +// typedef void (APIENTRYP GPGETTEXIMAGE)(GLenum target, GLint level, GLenum format, GLenum type, void * pixels); +// typedef void (APIENTRYP GPGETTEXLEVELPARAMETERFV)(GLenum target, GLint level, GLenum pname, GLfloat * params); +// typedef void (APIENTRYP GPGETTEXLEVELPARAMETERIV)(GLenum target, GLint level, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETTEXPARAMETERIIV)(GLenum target, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETTEXPARAMETERIUIV)(GLenum target, GLenum pname, GLuint * params); +// typedef void (APIENTRYP GPGETTEXPARAMETERFV)(GLenum target, GLenum pname, GLfloat * params); +// typedef void (APIENTRYP GPGETTEXPARAMETERIV)(GLenum target, GLenum pname, GLint * params); +// typedef GLuint64 (APIENTRYP GPGETTEXTUREHANDLEARB)(GLuint texture); +// typedef GLuint64 (APIENTRYP GPGETTEXTUREHANDLENV)(GLuint texture); +// typedef void (APIENTRYP GPGETTEXTUREIMAGE)(GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void * pixels); +// typedef void (APIENTRYP GPGETTEXTUREIMAGEEXT)(GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void * pixels); +// typedef void (APIENTRYP GPGETTEXTURELEVELPARAMETERFV)(GLuint texture, GLint level, GLenum pname, GLfloat * params); +// typedef void (APIENTRYP GPGETTEXTURELEVELPARAMETERFVEXT)(GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat * params); +// typedef void (APIENTRYP GPGETTEXTURELEVELPARAMETERIV)(GLuint texture, GLint level, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETTEXTURELEVELPARAMETERIVEXT)(GLuint texture, GLenum target, GLint level, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETTEXTUREPARAMETERIIV)(GLuint texture, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETTEXTUREPARAMETERIIVEXT)(GLuint texture, GLenum target, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETTEXTUREPARAMETERIUIV)(GLuint texture, GLenum pname, GLuint * params); +// typedef void (APIENTRYP GPGETTEXTUREPARAMETERIUIVEXT)(GLuint texture, GLenum target, GLenum pname, GLuint * params); +// typedef void (APIENTRYP GPGETTEXTUREPARAMETERFV)(GLuint texture, GLenum pname, GLfloat * params); +// typedef void (APIENTRYP GPGETTEXTUREPARAMETERFVEXT)(GLuint texture, GLenum target, GLenum pname, GLfloat * params); +// typedef void (APIENTRYP GPGETTEXTUREPARAMETERIV)(GLuint texture, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETTEXTUREPARAMETERIVEXT)(GLuint texture, GLenum target, GLenum pname, GLint * params); +// typedef GLuint64 (APIENTRYP GPGETTEXTURESAMPLERHANDLEARB)(GLuint texture, GLuint sampler); +// typedef GLuint64 (APIENTRYP GPGETTEXTURESAMPLERHANDLENV)(GLuint texture, GLuint sampler); +// typedef void (APIENTRYP GPGETTEXTURESUBIMAGE)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void * pixels); +// typedef void (APIENTRYP GPGETTRANSFORMFEEDBACKVARYING)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name); +// typedef void (APIENTRYP GPGETTRANSFORMFEEDBACKI64_V)(GLuint xfb, GLenum pname, GLuint index, GLint64 * param); +// typedef void (APIENTRYP GPGETTRANSFORMFEEDBACKI_V)(GLuint xfb, GLenum pname, GLuint index, GLint * param); +// typedef void (APIENTRYP GPGETTRANSFORMFEEDBACKIV)(GLuint xfb, GLenum pname, GLint * param); +// typedef GLuint (APIENTRYP GPGETUNIFORMBLOCKINDEX)(GLuint program, const GLchar * uniformBlockName); +// typedef void (APIENTRYP GPGETUNIFORMINDICES)(GLuint program, GLsizei uniformCount, const GLchar *const* uniformNames, GLuint * uniformIndices); +// typedef GLint (APIENTRYP GPGETUNIFORMLOCATION)(GLuint program, const GLchar * name); +// typedef void (APIENTRYP GPGETUNIFORMSUBROUTINEUIV)(GLenum shadertype, GLint location, GLuint * params); +// typedef void (APIENTRYP GPGETUNIFORMDV)(GLuint program, GLint location, GLdouble * params); +// typedef void (APIENTRYP GPGETUNIFORMFV)(GLuint program, GLint location, GLfloat * params); +// typedef void (APIENTRYP GPGETUNIFORMI64VARB)(GLuint program, GLint location, GLint64 * params); +// typedef void (APIENTRYP GPGETUNIFORMI64VNV)(GLuint program, GLint location, GLint64EXT * params); +// typedef void (APIENTRYP GPGETUNIFORMIV)(GLuint program, GLint location, GLint * params); +// typedef void (APIENTRYP GPGETUNIFORMUI64VARB)(GLuint program, GLint location, GLuint64 * params); +// typedef void (APIENTRYP GPGETUNIFORMUI64VNV)(GLuint program, GLint location, GLuint64EXT * params); +// typedef void (APIENTRYP GPGETUNIFORMUIV)(GLuint program, GLint location, GLuint * params); +// typedef void (APIENTRYP GPGETVERTEXARRAYINDEXED64IV)(GLuint vaobj, GLuint index, GLenum pname, GLint64 * param); +// typedef void (APIENTRYP GPGETVERTEXARRAYINDEXEDIV)(GLuint vaobj, GLuint index, GLenum pname, GLint * param); +// typedef void (APIENTRYP GPGETVERTEXARRAYINTEGERI_VEXT)(GLuint vaobj, GLuint index, GLenum pname, GLint * param); +// typedef void (APIENTRYP GPGETVERTEXARRAYINTEGERVEXT)(GLuint vaobj, GLenum pname, GLint * param); +// typedef void (APIENTRYP GPGETVERTEXARRAYPOINTERI_VEXT)(GLuint vaobj, GLuint index, GLenum pname, void ** param); +// typedef void (APIENTRYP GPGETVERTEXARRAYPOINTERVEXT)(GLuint vaobj, GLenum pname, void ** param); +// typedef void (APIENTRYP GPGETVERTEXARRAYIV)(GLuint vaobj, GLenum pname, GLint * param); +// typedef void (APIENTRYP GPGETVERTEXATTRIBIIV)(GLuint index, GLenum pname, GLint * params); +// typedef void (APIENTRYP GPGETVERTEXATTRIBIUIV)(GLuint index, GLenum pname, GLuint * params); +// typedef void (APIENTRYP GPGETVERTEXATTRIBLDV)(GLuint index, GLenum pname, GLdouble * params); +// typedef void (APIENTRYP GPGETVERTEXATTRIBLI64VNV)(GLuint index, GLenum pname, GLint64EXT * params); +// typedef void (APIENTRYP GPGETVERTEXATTRIBLUI64VARB)(GLuint index, GLenum pname, GLuint64EXT * params); +// typedef void (APIENTRYP GPGETVERTEXATTRIBLUI64VNV)(GLuint index, GLenum pname, GLuint64EXT * params); +// typedef void (APIENTRYP GPGETVERTEXATTRIBPOINTERV)(GLuint index, GLenum pname, void ** pointer); +// typedef void (APIENTRYP GPGETVERTEXATTRIBDV)(GLuint index, GLenum pname, GLdouble * params); +// typedef void (APIENTRYP GPGETVERTEXATTRIBFV)(GLuint index, GLenum pname, GLfloat * params); +// typedef void (APIENTRYP GPGETVERTEXATTRIBIV)(GLuint index, GLenum pname, GLint * params); +// typedef GLVULKANPROCNV (APIENTRYP GPGETVKPROCADDRNV)(const GLchar * name); +// typedef void (APIENTRYP GPGETNCOMPRESSEDTEXIMAGEARB)(GLenum target, GLint lod, GLsizei bufSize, void * img); +// typedef void (APIENTRYP GPGETNTEXIMAGEARB)(GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void * img); +// typedef void (APIENTRYP GPGETNUNIFORMDVARB)(GLuint program, GLint location, GLsizei bufSize, GLdouble * params); +// typedef void (APIENTRYP GPGETNUNIFORMFV)(GLuint program, GLint location, GLsizei bufSize, GLfloat * params); +// typedef void (APIENTRYP GPGETNUNIFORMFVARB)(GLuint program, GLint location, GLsizei bufSize, GLfloat * params); +// typedef void (APIENTRYP GPGETNUNIFORMFVKHR)(GLuint program, GLint location, GLsizei bufSize, GLfloat * params); +// typedef void (APIENTRYP GPGETNUNIFORMI64VARB)(GLuint program, GLint location, GLsizei bufSize, GLint64 * params); +// typedef void (APIENTRYP GPGETNUNIFORMIV)(GLuint program, GLint location, GLsizei bufSize, GLint * params); +// typedef void (APIENTRYP GPGETNUNIFORMIVARB)(GLuint program, GLint location, GLsizei bufSize, GLint * params); +// typedef void (APIENTRYP GPGETNUNIFORMIVKHR)(GLuint program, GLint location, GLsizei bufSize, GLint * params); +// typedef void (APIENTRYP GPGETNUNIFORMUI64VARB)(GLuint program, GLint location, GLsizei bufSize, GLuint64 * params); +// typedef void (APIENTRYP GPGETNUNIFORMUIV)(GLuint program, GLint location, GLsizei bufSize, GLuint * params); +// typedef void (APIENTRYP GPGETNUNIFORMUIVARB)(GLuint program, GLint location, GLsizei bufSize, GLuint * params); +// typedef void (APIENTRYP GPGETNUNIFORMUIVKHR)(GLuint program, GLint location, GLsizei bufSize, GLuint * params); +// typedef void (APIENTRYP GPHINT)(GLenum target, GLenum mode); +// typedef void (APIENTRYP GPINDEXFORMATNV)(GLenum type, GLsizei stride); +// typedef void (APIENTRYP GPINSERTEVENTMARKEREXT)(GLsizei length, const GLchar * marker); +// typedef void (APIENTRYP GPINTERPOLATEPATHSNV)(GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight); +// typedef void (APIENTRYP GPINVALIDATEBUFFERDATA)(GLuint buffer); +// typedef void (APIENTRYP GPINVALIDATEBUFFERSUBDATA)(GLuint buffer, GLintptr offset, GLsizeiptr length); +// typedef void (APIENTRYP GPINVALIDATEFRAMEBUFFER)(GLenum target, GLsizei numAttachments, const GLenum * attachments); +// typedef void (APIENTRYP GPINVALIDATENAMEDFRAMEBUFFERDATA)(GLuint framebuffer, GLsizei numAttachments, const GLenum * attachments); +// typedef void (APIENTRYP GPINVALIDATENAMEDFRAMEBUFFERSUBDATA)(GLuint framebuffer, GLsizei numAttachments, const GLenum * attachments, GLint x, GLint y, GLsizei width, GLsizei height); +// typedef void (APIENTRYP GPINVALIDATESUBFRAMEBUFFER)(GLenum target, GLsizei numAttachments, const GLenum * attachments, GLint x, GLint y, GLsizei width, GLsizei height); +// typedef void (APIENTRYP GPINVALIDATETEXIMAGE)(GLuint texture, GLint level); +// typedef void (APIENTRYP GPINVALIDATETEXSUBIMAGE)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth); +// typedef GLboolean (APIENTRYP GPISBUFFER)(GLuint buffer); +// typedef GLboolean (APIENTRYP GPISBUFFERRESIDENTNV)(GLenum target); +// typedef GLboolean (APIENTRYP GPISCOMMANDLISTNV)(GLuint list); +// typedef GLboolean (APIENTRYP GPISENABLED)(GLenum cap); +// typedef GLboolean (APIENTRYP GPISENABLEDINDEXEDEXT)(GLenum target, GLuint index); +// typedef GLboolean (APIENTRYP GPISENABLEDI)(GLenum target, GLuint index); +// typedef GLboolean (APIENTRYP GPISFRAMEBUFFER)(GLuint framebuffer); +// typedef GLboolean (APIENTRYP GPISIMAGEHANDLERESIDENTARB)(GLuint64 handle); +// typedef GLboolean (APIENTRYP GPISIMAGEHANDLERESIDENTNV)(GLuint64 handle); +// typedef GLboolean (APIENTRYP GPISNAMEDBUFFERRESIDENTNV)(GLuint buffer); +// typedef GLboolean (APIENTRYP GPISNAMEDSTRINGARB)(GLint namelen, const GLchar * name); +// typedef GLboolean (APIENTRYP GPISPATHNV)(GLuint path); +// typedef GLboolean (APIENTRYP GPISPOINTINFILLPATHNV)(GLuint path, GLuint mask, GLfloat x, GLfloat y); +// typedef GLboolean (APIENTRYP GPISPOINTINSTROKEPATHNV)(GLuint path, GLfloat x, GLfloat y); +// typedef GLboolean (APIENTRYP GPISPROGRAM)(GLuint program); +// typedef GLboolean (APIENTRYP GPISPROGRAMPIPELINE)(GLuint pipeline); +// typedef GLboolean (APIENTRYP GPISPROGRAMPIPELINEEXT)(GLuint pipeline); +// typedef GLboolean (APIENTRYP GPISQUERY)(GLuint id); +// typedef GLboolean (APIENTRYP GPISRENDERBUFFER)(GLuint renderbuffer); +// typedef GLboolean (APIENTRYP GPISSAMPLER)(GLuint sampler); +// typedef GLboolean (APIENTRYP GPISSHADER)(GLuint shader); +// typedef GLboolean (APIENTRYP GPISSTATENV)(GLuint state); +// typedef GLboolean (APIENTRYP GPISSYNC)(GLsync sync); +// typedef GLboolean (APIENTRYP GPISTEXTURE)(GLuint texture); +// typedef GLboolean (APIENTRYP GPISTEXTUREHANDLERESIDENTARB)(GLuint64 handle); +// typedef GLboolean (APIENTRYP GPISTEXTUREHANDLERESIDENTNV)(GLuint64 handle); +// typedef GLboolean (APIENTRYP GPISTRANSFORMFEEDBACK)(GLuint id); +// typedef GLboolean (APIENTRYP GPISVERTEXARRAY)(GLuint array); +// typedef void (APIENTRYP GPLABELOBJECTEXT)(GLenum type, GLuint object, GLsizei length, const GLchar * label); +// typedef void (APIENTRYP GPLINEWIDTH)(GLfloat width); +// typedef void (APIENTRYP GPLINKPROGRAM)(GLuint program); +// typedef void (APIENTRYP GPLISTDRAWCOMMANDSSTATESCLIENTNV)(GLuint list, GLuint segment, const void ** indirects, const GLsizei * sizes, const GLuint * states, const GLuint * fbos, GLuint count); +// typedef void (APIENTRYP GPLOGICOP)(GLenum opcode); +// typedef void (APIENTRYP GPMAKEBUFFERNONRESIDENTNV)(GLenum target); +// typedef void (APIENTRYP GPMAKEBUFFERRESIDENTNV)(GLenum target, GLenum access); +// typedef void (APIENTRYP GPMAKEIMAGEHANDLENONRESIDENTARB)(GLuint64 handle); +// typedef void (APIENTRYP GPMAKEIMAGEHANDLENONRESIDENTNV)(GLuint64 handle); +// typedef void (APIENTRYP GPMAKEIMAGEHANDLERESIDENTARB)(GLuint64 handle, GLenum access); +// typedef void (APIENTRYP GPMAKEIMAGEHANDLERESIDENTNV)(GLuint64 handle, GLenum access); +// typedef void (APIENTRYP GPMAKENAMEDBUFFERNONRESIDENTNV)(GLuint buffer); +// typedef void (APIENTRYP GPMAKENAMEDBUFFERRESIDENTNV)(GLuint buffer, GLenum access); +// typedef void (APIENTRYP GPMAKETEXTUREHANDLENONRESIDENTARB)(GLuint64 handle); +// typedef void (APIENTRYP GPMAKETEXTUREHANDLENONRESIDENTNV)(GLuint64 handle); +// typedef void (APIENTRYP GPMAKETEXTUREHANDLERESIDENTARB)(GLuint64 handle); +// typedef void (APIENTRYP GPMAKETEXTUREHANDLERESIDENTNV)(GLuint64 handle); +// typedef void * (APIENTRYP GPMAPBUFFER)(GLenum target, GLenum access); +// typedef void * (APIENTRYP GPMAPBUFFERRANGE)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +// typedef void * (APIENTRYP GPMAPNAMEDBUFFER)(GLuint buffer, GLenum access); +// typedef void * (APIENTRYP GPMAPNAMEDBUFFEREXT)(GLuint buffer, GLenum access); +// typedef void * (APIENTRYP GPMAPNAMEDBUFFERRANGE)(GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +// typedef void * (APIENTRYP GPMAPNAMEDBUFFERRANGEEXT)(GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +// typedef void (APIENTRYP GPMATRIXFRUSTUMEXT)(GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +// typedef void (APIENTRYP GPMATRIXLOAD3X2FNV)(GLenum matrixMode, const GLfloat * m); +// typedef void (APIENTRYP GPMATRIXLOAD3X3FNV)(GLenum matrixMode, const GLfloat * m); +// typedef void (APIENTRYP GPMATRIXLOADIDENTITYEXT)(GLenum mode); +// typedef void (APIENTRYP GPMATRIXLOADTRANSPOSE3X3FNV)(GLenum matrixMode, const GLfloat * m); +// typedef void (APIENTRYP GPMATRIXLOADTRANSPOSEDEXT)(GLenum mode, const GLdouble * m); +// typedef void (APIENTRYP GPMATRIXLOADTRANSPOSEFEXT)(GLenum mode, const GLfloat * m); +// typedef void (APIENTRYP GPMATRIXLOADDEXT)(GLenum mode, const GLdouble * m); +// typedef void (APIENTRYP GPMATRIXLOADFEXT)(GLenum mode, const GLfloat * m); +// typedef void (APIENTRYP GPMATRIXMULT3X2FNV)(GLenum matrixMode, const GLfloat * m); +// typedef void (APIENTRYP GPMATRIXMULT3X3FNV)(GLenum matrixMode, const GLfloat * m); +// typedef void (APIENTRYP GPMATRIXMULTTRANSPOSE3X3FNV)(GLenum matrixMode, const GLfloat * m); +// typedef void (APIENTRYP GPMATRIXMULTTRANSPOSEDEXT)(GLenum mode, const GLdouble * m); +// typedef void (APIENTRYP GPMATRIXMULTTRANSPOSEFEXT)(GLenum mode, const GLfloat * m); +// typedef void (APIENTRYP GPMATRIXMULTDEXT)(GLenum mode, const GLdouble * m); +// typedef void (APIENTRYP GPMATRIXMULTFEXT)(GLenum mode, const GLfloat * m); +// typedef void (APIENTRYP GPMATRIXORTHOEXT)(GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +// typedef void (APIENTRYP GPMATRIXPOPEXT)(GLenum mode); +// typedef void (APIENTRYP GPMATRIXPUSHEXT)(GLenum mode); +// typedef void (APIENTRYP GPMATRIXROTATEDEXT)(GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); +// typedef void (APIENTRYP GPMATRIXROTATEFEXT)(GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +// typedef void (APIENTRYP GPMATRIXSCALEDEXT)(GLenum mode, GLdouble x, GLdouble y, GLdouble z); +// typedef void (APIENTRYP GPMATRIXSCALEFEXT)(GLenum mode, GLfloat x, GLfloat y, GLfloat z); +// typedef void (APIENTRYP GPMATRIXTRANSLATEDEXT)(GLenum mode, GLdouble x, GLdouble y, GLdouble z); +// typedef void (APIENTRYP GPMATRIXTRANSLATEFEXT)(GLenum mode, GLfloat x, GLfloat y, GLfloat z); +// typedef void (APIENTRYP GPMAXSHADERCOMPILERTHREADSARB)(GLuint count); +// typedef void (APIENTRYP GPMAXSHADERCOMPILERTHREADSKHR)(GLuint count); +// typedef void (APIENTRYP GPMEMORYBARRIER)(GLbitfield barriers); +// typedef void (APIENTRYP GPMEMORYBARRIERBYREGION)(GLbitfield barriers); +// typedef void (APIENTRYP GPMINSAMPLESHADING)(GLfloat value); +// typedef void (APIENTRYP GPMINSAMPLESHADINGARB)(GLfloat value); +// typedef void (APIENTRYP GPMULTIDRAWARRAYS)(GLenum mode, const GLint * first, const GLsizei * count, GLsizei drawcount); +// typedef void (APIENTRYP GPMULTIDRAWARRAYSINDIRECT)(GLenum mode, const void * indirect, GLsizei drawcount, GLsizei stride); +// typedef void (APIENTRYP GPMULTIDRAWARRAYSINDIRECTBINDLESSCOUNTNV)(GLenum mode, const void * indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount); +// typedef void (APIENTRYP GPMULTIDRAWARRAYSINDIRECTBINDLESSNV)(GLenum mode, const void * indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); +// typedef void (APIENTRYP GPMULTIDRAWARRAYSINDIRECTCOUNTARB)(GLenum mode, const void * indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +// typedef void (APIENTRYP GPMULTIDRAWELEMENTS)(GLenum mode, const GLsizei * count, GLenum type, const void *const* indices, GLsizei drawcount); +// typedef void (APIENTRYP GPMULTIDRAWELEMENTSBASEVERTEX)(GLenum mode, const GLsizei * count, GLenum type, const void *const* indices, GLsizei drawcount, const GLint * basevertex); +// typedef void (APIENTRYP GPMULTIDRAWELEMENTSINDIRECT)(GLenum mode, GLenum type, const void * indirect, GLsizei drawcount, GLsizei stride); +// typedef void (APIENTRYP GPMULTIDRAWELEMENTSINDIRECTBINDLESSCOUNTNV)(GLenum mode, GLenum type, const void * indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount); +// typedef void (APIENTRYP GPMULTIDRAWELEMENTSINDIRECTBINDLESSNV)(GLenum mode, GLenum type, const void * indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); +// typedef void (APIENTRYP GPMULTIDRAWELEMENTSINDIRECTCOUNTARB)(GLenum mode, GLenum type, const void * indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +// typedef void (APIENTRYP GPMULTITEXBUFFEREXT)(GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); +// typedef void (APIENTRYP GPMULTITEXCOORDPOINTEREXT)(GLenum texunit, GLint size, GLenum type, GLsizei stride, const void * pointer); +// typedef void (APIENTRYP GPMULTITEXENVFEXT)(GLenum texunit, GLenum target, GLenum pname, GLfloat param); +// typedef void (APIENTRYP GPMULTITEXENVFVEXT)(GLenum texunit, GLenum target, GLenum pname, const GLfloat * params); +// typedef void (APIENTRYP GPMULTITEXENVIEXT)(GLenum texunit, GLenum target, GLenum pname, GLint param); +// typedef void (APIENTRYP GPMULTITEXENVIVEXT)(GLenum texunit, GLenum target, GLenum pname, const GLint * params); +// typedef void (APIENTRYP GPMULTITEXGENDEXT)(GLenum texunit, GLenum coord, GLenum pname, GLdouble param); +// typedef void (APIENTRYP GPMULTITEXGENDVEXT)(GLenum texunit, GLenum coord, GLenum pname, const GLdouble * params); +// typedef void (APIENTRYP GPMULTITEXGENFEXT)(GLenum texunit, GLenum coord, GLenum pname, GLfloat param); +// typedef void (APIENTRYP GPMULTITEXGENFVEXT)(GLenum texunit, GLenum coord, GLenum pname, const GLfloat * params); +// typedef void (APIENTRYP GPMULTITEXGENIEXT)(GLenum texunit, GLenum coord, GLenum pname, GLint param); +// typedef void (APIENTRYP GPMULTITEXGENIVEXT)(GLenum texunit, GLenum coord, GLenum pname, const GLint * params); +// typedef void (APIENTRYP GPMULTITEXIMAGE1DEXT)(GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void * pixels); +// typedef void (APIENTRYP GPMULTITEXIMAGE2DEXT)(GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void * pixels); +// typedef void (APIENTRYP GPMULTITEXIMAGE3DEXT)(GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void * pixels); +// typedef void (APIENTRYP GPMULTITEXPARAMETERIIVEXT)(GLenum texunit, GLenum target, GLenum pname, const GLint * params); +// typedef void (APIENTRYP GPMULTITEXPARAMETERIUIVEXT)(GLenum texunit, GLenum target, GLenum pname, const GLuint * params); +// typedef void (APIENTRYP GPMULTITEXPARAMETERFEXT)(GLenum texunit, GLenum target, GLenum pname, GLfloat param); +// typedef void (APIENTRYP GPMULTITEXPARAMETERFVEXT)(GLenum texunit, GLenum target, GLenum pname, const GLfloat * params); +// typedef void (APIENTRYP GPMULTITEXPARAMETERIEXT)(GLenum texunit, GLenum target, GLenum pname, GLint param); +// typedef void (APIENTRYP GPMULTITEXPARAMETERIVEXT)(GLenum texunit, GLenum target, GLenum pname, const GLint * params); +// typedef void (APIENTRYP GPMULTITEXRENDERBUFFEREXT)(GLenum texunit, GLenum target, GLuint renderbuffer); +// typedef void (APIENTRYP GPMULTITEXSUBIMAGE1DEXT)(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void * pixels); +// typedef void (APIENTRYP GPMULTITEXSUBIMAGE2DEXT)(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * pixels); +// typedef void (APIENTRYP GPMULTITEXSUBIMAGE3DEXT)(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels); +// typedef void (APIENTRYP GPNAMEDBUFFERDATA)(GLuint buffer, GLsizeiptr size, const void * data, GLenum usage); +// typedef void (APIENTRYP GPNAMEDBUFFERDATAEXT)(GLuint buffer, GLsizeiptr size, const void * data, GLenum usage); +// typedef void (APIENTRYP GPNAMEDBUFFERPAGECOMMITMENTARB)(GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit); +// typedef void (APIENTRYP GPNAMEDBUFFERPAGECOMMITMENTEXT)(GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit); +// typedef void (APIENTRYP GPNAMEDBUFFERSTORAGE)(GLuint buffer, GLsizeiptr size, const void * data, GLbitfield flags); +// typedef void (APIENTRYP GPNAMEDBUFFERSTORAGEEXT)(GLuint buffer, GLsizeiptr size, const void * data, GLbitfield flags); +// typedef void (APIENTRYP GPNAMEDBUFFERSUBDATA)(GLuint buffer, GLintptr offset, GLsizeiptr size, const void * data); +// typedef void (APIENTRYP GPNAMEDBUFFERSUBDATAEXT)(GLuint buffer, GLintptr offset, GLsizeiptr size, const void * data); +// typedef void (APIENTRYP GPNAMEDCOPYBUFFERSUBDATAEXT)(GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +// typedef void (APIENTRYP GPNAMEDFRAMEBUFFERDRAWBUFFER)(GLuint framebuffer, GLenum buf); +// typedef void (APIENTRYP GPNAMEDFRAMEBUFFERDRAWBUFFERS)(GLuint framebuffer, GLsizei n, const GLenum * bufs); +// typedef void (APIENTRYP GPNAMEDFRAMEBUFFERPARAMETERI)(GLuint framebuffer, GLenum pname, GLint param); +// typedef void (APIENTRYP GPNAMEDFRAMEBUFFERPARAMETERIEXT)(GLuint framebuffer, GLenum pname, GLint param); +// typedef void (APIENTRYP GPNAMEDFRAMEBUFFERREADBUFFER)(GLuint framebuffer, GLenum src); +// typedef void (APIENTRYP GPNAMEDFRAMEBUFFERRENDERBUFFER)(GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +// typedef void (APIENTRYP GPNAMEDFRAMEBUFFERRENDERBUFFEREXT)(GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +// typedef void (APIENTRYP GPNAMEDFRAMEBUFFERSAMPLELOCATIONSFVARB)(GLuint framebuffer, GLuint start, GLsizei count, const GLfloat * v); +// typedef void (APIENTRYP GPNAMEDFRAMEBUFFERSAMPLELOCATIONSFVNV)(GLuint framebuffer, GLuint start, GLsizei count, const GLfloat * v); +// typedef void (APIENTRYP GPNAMEDFRAMEBUFFERTEXTURE)(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +// typedef void (APIENTRYP GPNAMEDFRAMEBUFFERTEXTURE1DEXT)(GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +// typedef void (APIENTRYP GPNAMEDFRAMEBUFFERTEXTURE2DEXT)(GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +// typedef void (APIENTRYP GPNAMEDFRAMEBUFFERTEXTURE3DEXT)(GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +// typedef void (APIENTRYP GPNAMEDFRAMEBUFFERTEXTUREEXT)(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +// typedef void (APIENTRYP GPNAMEDFRAMEBUFFERTEXTUREFACEEXT)(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); +// typedef void (APIENTRYP GPNAMEDFRAMEBUFFERTEXTURELAYER)(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +// typedef void (APIENTRYP GPNAMEDFRAMEBUFFERTEXTURELAYEREXT)(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +// typedef void (APIENTRYP GPNAMEDPROGRAMLOCALPARAMETER4DEXT)(GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +// typedef void (APIENTRYP GPNAMEDPROGRAMLOCALPARAMETER4DVEXT)(GLuint program, GLenum target, GLuint index, const GLdouble * params); +// typedef void (APIENTRYP GPNAMEDPROGRAMLOCALPARAMETER4FEXT)(GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +// typedef void (APIENTRYP GPNAMEDPROGRAMLOCALPARAMETER4FVEXT)(GLuint program, GLenum target, GLuint index, const GLfloat * params); +// typedef void (APIENTRYP GPNAMEDPROGRAMLOCALPARAMETERI4IEXT)(GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +// typedef void (APIENTRYP GPNAMEDPROGRAMLOCALPARAMETERI4IVEXT)(GLuint program, GLenum target, GLuint index, const GLint * params); +// typedef void (APIENTRYP GPNAMEDPROGRAMLOCALPARAMETERI4UIEXT)(GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +// typedef void (APIENTRYP GPNAMEDPROGRAMLOCALPARAMETERI4UIVEXT)(GLuint program, GLenum target, GLuint index, const GLuint * params); +// typedef void (APIENTRYP GPNAMEDPROGRAMLOCALPARAMETERS4FVEXT)(GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat * params); +// typedef void (APIENTRYP GPNAMEDPROGRAMLOCALPARAMETERSI4IVEXT)(GLuint program, GLenum target, GLuint index, GLsizei count, const GLint * params); +// typedef void (APIENTRYP GPNAMEDPROGRAMLOCALPARAMETERSI4UIVEXT)(GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint * params); +// typedef void (APIENTRYP GPNAMEDPROGRAMSTRINGEXT)(GLuint program, GLenum target, GLenum format, GLsizei len, const void * string); +// typedef void (APIENTRYP GPNAMEDRENDERBUFFERSTORAGE)(GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +// typedef void (APIENTRYP GPNAMEDRENDERBUFFERSTORAGEEXT)(GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +// typedef void (APIENTRYP GPNAMEDRENDERBUFFERSTORAGEMULTISAMPLE)(GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +// typedef void (APIENTRYP GPNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXT)(GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +// typedef void (APIENTRYP GPNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXT)(GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +// typedef void (APIENTRYP GPNAMEDSTRINGARB)(GLenum type, GLint namelen, const GLchar * name, GLint stringlen, const GLchar * string); +// typedef void (APIENTRYP GPNORMALFORMATNV)(GLenum type, GLsizei stride); +// typedef void (APIENTRYP GPOBJECTLABEL)(GLenum identifier, GLuint name, GLsizei length, const GLchar * label); +// typedef void (APIENTRYP GPOBJECTLABELKHR)(GLenum identifier, GLuint name, GLsizei length, const GLchar * label); +// typedef void (APIENTRYP GPOBJECTPTRLABEL)(const void * ptr, GLsizei length, const GLchar * label); +// typedef void (APIENTRYP GPOBJECTPTRLABELKHR)(const void * ptr, GLsizei length, const GLchar * label); +// typedef void (APIENTRYP GPPATCHPARAMETERFV)(GLenum pname, const GLfloat * values); +// typedef void (APIENTRYP GPPATCHPARAMETERI)(GLenum pname, GLint value); +// typedef void (APIENTRYP GPPATHCOMMANDSNV)(GLuint path, GLsizei numCommands, const GLubyte * commands, GLsizei numCoords, GLenum coordType, const void * coords); +// typedef void (APIENTRYP GPPATHCOORDSNV)(GLuint path, GLsizei numCoords, GLenum coordType, const void * coords); +// typedef void (APIENTRYP GPPATHCOVERDEPTHFUNCNV)(GLenum func); +// typedef void (APIENTRYP GPPATHDASHARRAYNV)(GLuint path, GLsizei dashCount, const GLfloat * dashArray); +// typedef GLenum (APIENTRYP GPPATHGLYPHINDEXARRAYNV)(GLuint firstPathName, GLenum fontTarget, const void * fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +// typedef GLenum (APIENTRYP GPPATHGLYPHINDEXRANGENV)(GLenum fontTarget, const void * fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint * baseAndCount); +// typedef void (APIENTRYP GPPATHGLYPHRANGENV)(GLuint firstPathName, GLenum fontTarget, const void * fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +// typedef void (APIENTRYP GPPATHGLYPHSNV)(GLuint firstPathName, GLenum fontTarget, const void * fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void * charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +// typedef GLenum (APIENTRYP GPPATHMEMORYGLYPHINDEXARRAYNV)(GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void * fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +// typedef void (APIENTRYP GPPATHPARAMETERFNV)(GLuint path, GLenum pname, GLfloat value); +// typedef void (APIENTRYP GPPATHPARAMETERFVNV)(GLuint path, GLenum pname, const GLfloat * value); +// typedef void (APIENTRYP GPPATHPARAMETERINV)(GLuint path, GLenum pname, GLint value); +// typedef void (APIENTRYP GPPATHPARAMETERIVNV)(GLuint path, GLenum pname, const GLint * value); +// typedef void (APIENTRYP GPPATHSTENCILDEPTHOFFSETNV)(GLfloat factor, GLfloat units); +// typedef void (APIENTRYP GPPATHSTENCILFUNCNV)(GLenum func, GLint ref, GLuint mask); +// typedef void (APIENTRYP GPPATHSTRINGNV)(GLuint path, GLenum format, GLsizei length, const void * pathString); +// typedef void (APIENTRYP GPPATHSUBCOMMANDSNV)(GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte * commands, GLsizei numCoords, GLenum coordType, const void * coords); +// typedef void (APIENTRYP GPPATHSUBCOORDSNV)(GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void * coords); +// typedef void (APIENTRYP GPPAUSETRANSFORMFEEDBACK)(); +// typedef void (APIENTRYP GPPIXELSTOREF)(GLenum pname, GLfloat param); +// typedef void (APIENTRYP GPPIXELSTOREI)(GLenum pname, GLint param); +// typedef GLboolean (APIENTRYP GPPOINTALONGPATHNV)(GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat * x, GLfloat * y, GLfloat * tangentX, GLfloat * tangentY); +// typedef void (APIENTRYP GPPOINTPARAMETERF)(GLenum pname, GLfloat param); +// typedef void (APIENTRYP GPPOINTPARAMETERFV)(GLenum pname, const GLfloat * params); +// typedef void (APIENTRYP GPPOINTPARAMETERI)(GLenum pname, GLint param); +// typedef void (APIENTRYP GPPOINTPARAMETERIV)(GLenum pname, const GLint * params); +// typedef void (APIENTRYP GPPOINTSIZE)(GLfloat size); +// typedef void (APIENTRYP GPPOLYGONMODE)(GLenum face, GLenum mode); +// typedef void (APIENTRYP GPPOLYGONOFFSET)(GLfloat factor, GLfloat units); +// typedef void (APIENTRYP GPPOLYGONOFFSETCLAMP)(GLfloat factor, GLfloat units, GLfloat clamp); +// typedef void (APIENTRYP GPPOLYGONOFFSETCLAMPEXT)(GLfloat factor, GLfloat units, GLfloat clamp); +// typedef void (APIENTRYP GPPOPDEBUGGROUP)(); +// typedef void (APIENTRYP GPPOPDEBUGGROUPKHR)(); +// typedef void (APIENTRYP GPPOPGROUPMARKEREXT)(); +// typedef void (APIENTRYP GPPRIMITIVEBOUNDINGBOXARB)(GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); +// typedef void (APIENTRYP GPPRIMITIVERESTARTINDEX)(GLuint index); +// typedef void (APIENTRYP GPPROGRAMBINARY)(GLuint program, GLenum binaryFormat, const void * binary, GLsizei length); +// typedef void (APIENTRYP GPPROGRAMPARAMETERI)(GLuint program, GLenum pname, GLint value); +// typedef void (APIENTRYP GPPROGRAMPARAMETERIARB)(GLuint program, GLenum pname, GLint value); +// typedef void (APIENTRYP GPPROGRAMPARAMETERIEXT)(GLuint program, GLenum pname, GLint value); +// typedef void (APIENTRYP GPPROGRAMPATHFRAGMENTINPUTGENNV)(GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat * coeffs); +// typedef void (APIENTRYP GPPROGRAMUNIFORM1D)(GLuint program, GLint location, GLdouble v0); +// typedef void (APIENTRYP GPPROGRAMUNIFORM1DEXT)(GLuint program, GLint location, GLdouble x); +// typedef void (APIENTRYP GPPROGRAMUNIFORM1DV)(GLuint program, GLint location, GLsizei count, const GLdouble * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM1DVEXT)(GLuint program, GLint location, GLsizei count, const GLdouble * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM1F)(GLuint program, GLint location, GLfloat v0); +// typedef void (APIENTRYP GPPROGRAMUNIFORM1FEXT)(GLuint program, GLint location, GLfloat v0); +// typedef void (APIENTRYP GPPROGRAMUNIFORM1FV)(GLuint program, GLint location, GLsizei count, const GLfloat * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM1FVEXT)(GLuint program, GLint location, GLsizei count, const GLfloat * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM1I)(GLuint program, GLint location, GLint v0); +// typedef void (APIENTRYP GPPROGRAMUNIFORM1I64ARB)(GLuint program, GLint location, GLint64 x); +// typedef void (APIENTRYP GPPROGRAMUNIFORM1I64NV)(GLuint program, GLint location, GLint64EXT x); +// typedef void (APIENTRYP GPPROGRAMUNIFORM1I64VARB)(GLuint program, GLint location, GLsizei count, const GLint64 * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM1I64VNV)(GLuint program, GLint location, GLsizei count, const GLint64EXT * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM1IEXT)(GLuint program, GLint location, GLint v0); +// typedef void (APIENTRYP GPPROGRAMUNIFORM1IV)(GLuint program, GLint location, GLsizei count, const GLint * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM1IVEXT)(GLuint program, GLint location, GLsizei count, const GLint * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM1UI)(GLuint program, GLint location, GLuint v0); +// typedef void (APIENTRYP GPPROGRAMUNIFORM1UI64ARB)(GLuint program, GLint location, GLuint64 x); +// typedef void (APIENTRYP GPPROGRAMUNIFORM1UI64NV)(GLuint program, GLint location, GLuint64EXT x); +// typedef void (APIENTRYP GPPROGRAMUNIFORM1UI64VARB)(GLuint program, GLint location, GLsizei count, const GLuint64 * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM1UI64VNV)(GLuint program, GLint location, GLsizei count, const GLuint64EXT * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM1UIEXT)(GLuint program, GLint location, GLuint v0); +// typedef void (APIENTRYP GPPROGRAMUNIFORM1UIV)(GLuint program, GLint location, GLsizei count, const GLuint * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM1UIVEXT)(GLuint program, GLint location, GLsizei count, const GLuint * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM2D)(GLuint program, GLint location, GLdouble v0, GLdouble v1); +// typedef void (APIENTRYP GPPROGRAMUNIFORM2DEXT)(GLuint program, GLint location, GLdouble x, GLdouble y); +// typedef void (APIENTRYP GPPROGRAMUNIFORM2DV)(GLuint program, GLint location, GLsizei count, const GLdouble * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM2DVEXT)(GLuint program, GLint location, GLsizei count, const GLdouble * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM2F)(GLuint program, GLint location, GLfloat v0, GLfloat v1); +// typedef void (APIENTRYP GPPROGRAMUNIFORM2FEXT)(GLuint program, GLint location, GLfloat v0, GLfloat v1); +// typedef void (APIENTRYP GPPROGRAMUNIFORM2FV)(GLuint program, GLint location, GLsizei count, const GLfloat * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM2FVEXT)(GLuint program, GLint location, GLsizei count, const GLfloat * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM2I)(GLuint program, GLint location, GLint v0, GLint v1); +// typedef void (APIENTRYP GPPROGRAMUNIFORM2I64ARB)(GLuint program, GLint location, GLint64 x, GLint64 y); +// typedef void (APIENTRYP GPPROGRAMUNIFORM2I64NV)(GLuint program, GLint location, GLint64EXT x, GLint64EXT y); +// typedef void (APIENTRYP GPPROGRAMUNIFORM2I64VARB)(GLuint program, GLint location, GLsizei count, const GLint64 * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM2I64VNV)(GLuint program, GLint location, GLsizei count, const GLint64EXT * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM2IEXT)(GLuint program, GLint location, GLint v0, GLint v1); +// typedef void (APIENTRYP GPPROGRAMUNIFORM2IV)(GLuint program, GLint location, GLsizei count, const GLint * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM2IVEXT)(GLuint program, GLint location, GLsizei count, const GLint * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM2UI)(GLuint program, GLint location, GLuint v0, GLuint v1); +// typedef void (APIENTRYP GPPROGRAMUNIFORM2UI64ARB)(GLuint program, GLint location, GLuint64 x, GLuint64 y); +// typedef void (APIENTRYP GPPROGRAMUNIFORM2UI64NV)(GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); +// typedef void (APIENTRYP GPPROGRAMUNIFORM2UI64VARB)(GLuint program, GLint location, GLsizei count, const GLuint64 * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM2UI64VNV)(GLuint program, GLint location, GLsizei count, const GLuint64EXT * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM2UIEXT)(GLuint program, GLint location, GLuint v0, GLuint v1); +// typedef void (APIENTRYP GPPROGRAMUNIFORM2UIV)(GLuint program, GLint location, GLsizei count, const GLuint * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM2UIVEXT)(GLuint program, GLint location, GLsizei count, const GLuint * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM3D)(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); +// typedef void (APIENTRYP GPPROGRAMUNIFORM3DEXT)(GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); +// typedef void (APIENTRYP GPPROGRAMUNIFORM3DV)(GLuint program, GLint location, GLsizei count, const GLdouble * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM3DVEXT)(GLuint program, GLint location, GLsizei count, const GLdouble * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM3F)(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +// typedef void (APIENTRYP GPPROGRAMUNIFORM3FEXT)(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +// typedef void (APIENTRYP GPPROGRAMUNIFORM3FV)(GLuint program, GLint location, GLsizei count, const GLfloat * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM3FVEXT)(GLuint program, GLint location, GLsizei count, const GLfloat * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM3I)(GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +// typedef void (APIENTRYP GPPROGRAMUNIFORM3I64ARB)(GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z); +// typedef void (APIENTRYP GPPROGRAMUNIFORM3I64NV)(GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +// typedef void (APIENTRYP GPPROGRAMUNIFORM3I64VARB)(GLuint program, GLint location, GLsizei count, const GLint64 * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM3I64VNV)(GLuint program, GLint location, GLsizei count, const GLint64EXT * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM3IEXT)(GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +// typedef void (APIENTRYP GPPROGRAMUNIFORM3IV)(GLuint program, GLint location, GLsizei count, const GLint * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM3IVEXT)(GLuint program, GLint location, GLsizei count, const GLint * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM3UI)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +// typedef void (APIENTRYP GPPROGRAMUNIFORM3UI64ARB)(GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z); +// typedef void (APIENTRYP GPPROGRAMUNIFORM3UI64NV)(GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +// typedef void (APIENTRYP GPPROGRAMUNIFORM3UI64VARB)(GLuint program, GLint location, GLsizei count, const GLuint64 * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM3UI64VNV)(GLuint program, GLint location, GLsizei count, const GLuint64EXT * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM3UIEXT)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +// typedef void (APIENTRYP GPPROGRAMUNIFORM3UIV)(GLuint program, GLint location, GLsizei count, const GLuint * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM3UIVEXT)(GLuint program, GLint location, GLsizei count, const GLuint * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM4D)(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +// typedef void (APIENTRYP GPPROGRAMUNIFORM4DEXT)(GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +// typedef void (APIENTRYP GPPROGRAMUNIFORM4DV)(GLuint program, GLint location, GLsizei count, const GLdouble * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM4DVEXT)(GLuint program, GLint location, GLsizei count, const GLdouble * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM4F)(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +// typedef void (APIENTRYP GPPROGRAMUNIFORM4FEXT)(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +// typedef void (APIENTRYP GPPROGRAMUNIFORM4FV)(GLuint program, GLint location, GLsizei count, const GLfloat * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM4FVEXT)(GLuint program, GLint location, GLsizei count, const GLfloat * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM4I)(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +// typedef void (APIENTRYP GPPROGRAMUNIFORM4I64ARB)(GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w); +// typedef void (APIENTRYP GPPROGRAMUNIFORM4I64NV)(GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +// typedef void (APIENTRYP GPPROGRAMUNIFORM4I64VARB)(GLuint program, GLint location, GLsizei count, const GLint64 * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM4I64VNV)(GLuint program, GLint location, GLsizei count, const GLint64EXT * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM4IEXT)(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +// typedef void (APIENTRYP GPPROGRAMUNIFORM4IV)(GLuint program, GLint location, GLsizei count, const GLint * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM4IVEXT)(GLuint program, GLint location, GLsizei count, const GLint * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM4UI)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +// typedef void (APIENTRYP GPPROGRAMUNIFORM4UI64ARB)(GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w); +// typedef void (APIENTRYP GPPROGRAMUNIFORM4UI64NV)(GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +// typedef void (APIENTRYP GPPROGRAMUNIFORM4UI64VARB)(GLuint program, GLint location, GLsizei count, const GLuint64 * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM4UI64VNV)(GLuint program, GLint location, GLsizei count, const GLuint64EXT * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM4UIEXT)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +// typedef void (APIENTRYP GPPROGRAMUNIFORM4UIV)(GLuint program, GLint location, GLsizei count, const GLuint * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORM4UIVEXT)(GLuint program, GLint location, GLsizei count, const GLuint * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMHANDLEUI64ARB)(GLuint program, GLint location, GLuint64 value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMHANDLEUI64NV)(GLuint program, GLint location, GLuint64 value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMHANDLEUI64VARB)(GLuint program, GLint location, GLsizei count, const GLuint64 * values); +// typedef void (APIENTRYP GPPROGRAMUNIFORMHANDLEUI64VNV)(GLuint program, GLint location, GLsizei count, const GLuint64 * values); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX2DV)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX2DVEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX2FV)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX2FVEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX2X3DV)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX2X3DVEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX2X3FV)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX2X3FVEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX2X4DV)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX2X4DVEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX2X4FV)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX2X4FVEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX3DV)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX3DVEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX3FV)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX3FVEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX3X2DV)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX3X2DVEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX3X2FV)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX3X2FVEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX3X4DV)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX3X4DVEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX3X4FV)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX3X4FVEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX4DV)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX4DVEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX4FV)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX4FVEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX4X2DV)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX4X2DVEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX4X2FV)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX4X2FVEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX4X3DV)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX4X3DVEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX4X3FV)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMMATRIX4X3FVEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMUI64NV)(GLuint program, GLint location, GLuint64EXT value); +// typedef void (APIENTRYP GPPROGRAMUNIFORMUI64VNV)(GLuint program, GLint location, GLsizei count, const GLuint64EXT * value); +// typedef void (APIENTRYP GPPROVOKINGVERTEX)(GLenum mode); +// typedef void (APIENTRYP GPPUSHCLIENTATTRIBDEFAULTEXT)(GLbitfield mask); +// typedef void (APIENTRYP GPPUSHDEBUGGROUP)(GLenum source, GLuint id, GLsizei length, const GLchar * message); +// typedef void (APIENTRYP GPPUSHDEBUGGROUPKHR)(GLenum source, GLuint id, GLsizei length, const GLchar * message); +// typedef void (APIENTRYP GPPUSHGROUPMARKEREXT)(GLsizei length, const GLchar * marker); +// typedef void (APIENTRYP GPQUERYCOUNTER)(GLuint id, GLenum target); +// typedef void (APIENTRYP GPRASTERSAMPLESEXT)(GLuint samples, GLboolean fixedsamplelocations); +// typedef void (APIENTRYP GPREADBUFFER)(GLenum src); +// typedef void (APIENTRYP GPREADPIXELS)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void * pixels); +// typedef void (APIENTRYP GPREADNPIXELS)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void * data); +// typedef void (APIENTRYP GPREADNPIXELSARB)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void * data); +// typedef void (APIENTRYP GPREADNPIXELSKHR)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void * data); +// typedef void (APIENTRYP GPRELEASESHADERCOMPILER)(); +// typedef void (APIENTRYP GPRENDERBUFFERSTORAGE)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +// typedef void (APIENTRYP GPRENDERBUFFERSTORAGEMULTISAMPLE)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +// typedef void (APIENTRYP GPRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENV)(GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +// typedef void (APIENTRYP GPRESOLVEDEPTHVALUESNV)(); +// typedef void (APIENTRYP GPRESUMETRANSFORMFEEDBACK)(); +// typedef void (APIENTRYP GPSAMPLECOVERAGE)(GLfloat value, GLboolean invert); +// typedef void (APIENTRYP GPSAMPLEMASKI)(GLuint maskNumber, GLbitfield mask); +// typedef void (APIENTRYP GPSAMPLERPARAMETERIIV)(GLuint sampler, GLenum pname, const GLint * param); +// typedef void (APIENTRYP GPSAMPLERPARAMETERIUIV)(GLuint sampler, GLenum pname, const GLuint * param); +// typedef void (APIENTRYP GPSAMPLERPARAMETERF)(GLuint sampler, GLenum pname, GLfloat param); +// typedef void (APIENTRYP GPSAMPLERPARAMETERFV)(GLuint sampler, GLenum pname, const GLfloat * param); +// typedef void (APIENTRYP GPSAMPLERPARAMETERI)(GLuint sampler, GLenum pname, GLint param); +// typedef void (APIENTRYP GPSAMPLERPARAMETERIV)(GLuint sampler, GLenum pname, const GLint * param); +// typedef void (APIENTRYP GPSCISSOR)(GLint x, GLint y, GLsizei width, GLsizei height); +// typedef void (APIENTRYP GPSCISSORARRAYV)(GLuint first, GLsizei count, const GLint * v); +// typedef void (APIENTRYP GPSCISSORINDEXED)(GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +// typedef void (APIENTRYP GPSCISSORINDEXEDV)(GLuint index, const GLint * v); +// typedef void (APIENTRYP GPSECONDARYCOLORFORMATNV)(GLint size, GLenum type, GLsizei stride); +// typedef void (APIENTRYP GPSELECTPERFMONITORCOUNTERSAMD)(GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint * counterList); +// typedef void (APIENTRYP GPSHADERBINARY)(GLsizei count, const GLuint * shaders, GLenum binaryformat, const void * binary, GLsizei length); +// typedef void (APIENTRYP GPSHADERSOURCE)(GLuint shader, GLsizei count, const GLchar *const* string, const GLint * length); +// typedef void (APIENTRYP GPSHADERSTORAGEBLOCKBINDING)(GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding); +// typedef void (APIENTRYP GPSIGNALVKFENCENV)(GLuint64 vkFence); +// typedef void (APIENTRYP GPSIGNALVKSEMAPHORENV)(GLuint64 vkSemaphore); +// typedef void (APIENTRYP GPSPECIALIZESHADERARB)(GLuint shader, const GLchar * pEntryPoint, GLuint numSpecializationConstants, const GLuint * pConstantIndex, const GLuint * pConstantValue); +// typedef void (APIENTRYP GPSTATECAPTURENV)(GLuint state, GLenum mode); +// typedef void (APIENTRYP GPSTENCILFILLPATHINSTANCEDNV)(GLsizei numPaths, GLenum pathNameType, const void * paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat * transformValues); +// typedef void (APIENTRYP GPSTENCILFILLPATHNV)(GLuint path, GLenum fillMode, GLuint mask); +// typedef void (APIENTRYP GPSTENCILFUNC)(GLenum func, GLint ref, GLuint mask); +// typedef void (APIENTRYP GPSTENCILFUNCSEPARATE)(GLenum face, GLenum func, GLint ref, GLuint mask); +// typedef void (APIENTRYP GPSTENCILMASK)(GLuint mask); +// typedef void (APIENTRYP GPSTENCILMASKSEPARATE)(GLenum face, GLuint mask); +// typedef void (APIENTRYP GPSTENCILOP)(GLenum fail, GLenum zfail, GLenum zpass); +// typedef void (APIENTRYP GPSTENCILOPSEPARATE)(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +// typedef void (APIENTRYP GPSTENCILSTROKEPATHINSTANCEDNV)(GLsizei numPaths, GLenum pathNameType, const void * paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat * transformValues); +// typedef void (APIENTRYP GPSTENCILSTROKEPATHNV)(GLuint path, GLint reference, GLuint mask); +// typedef void (APIENTRYP GPSTENCILTHENCOVERFILLPATHINSTANCEDNV)(GLsizei numPaths, GLenum pathNameType, const void * paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat * transformValues); +// typedef void (APIENTRYP GPSTENCILTHENCOVERFILLPATHNV)(GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode); +// typedef void (APIENTRYP GPSTENCILTHENCOVERSTROKEPATHINSTANCEDNV)(GLsizei numPaths, GLenum pathNameType, const void * paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat * transformValues); +// typedef void (APIENTRYP GPSTENCILTHENCOVERSTROKEPATHNV)(GLuint path, GLint reference, GLuint mask, GLenum coverMode); +// typedef void (APIENTRYP GPSUBPIXELPRECISIONBIASNV)(GLuint xbits, GLuint ybits); +// typedef void (APIENTRYP GPTEXBUFFER)(GLenum target, GLenum internalformat, GLuint buffer); +// typedef void (APIENTRYP GPTEXBUFFERARB)(GLenum target, GLenum internalformat, GLuint buffer); +// typedef void (APIENTRYP GPTEXBUFFERRANGE)(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +// typedef void (APIENTRYP GPTEXCOORDFORMATNV)(GLint size, GLenum type, GLsizei stride); +// typedef void (APIENTRYP GPTEXIMAGE1D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void * pixels); +// typedef void (APIENTRYP GPTEXIMAGE2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void * pixels); +// typedef void (APIENTRYP GPTEXIMAGE2DMULTISAMPLE)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +// typedef void (APIENTRYP GPTEXIMAGE3D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void * pixels); +// typedef void (APIENTRYP GPTEXIMAGE3DMULTISAMPLE)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +// typedef void (APIENTRYP GPTEXPAGECOMMITMENTARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); +// typedef void (APIENTRYP GPTEXPARAMETERIIV)(GLenum target, GLenum pname, const GLint * params); +// typedef void (APIENTRYP GPTEXPARAMETERIUIV)(GLenum target, GLenum pname, const GLuint * params); +// typedef void (APIENTRYP GPTEXPARAMETERF)(GLenum target, GLenum pname, GLfloat param); +// typedef void (APIENTRYP GPTEXPARAMETERFV)(GLenum target, GLenum pname, const GLfloat * params); +// typedef void (APIENTRYP GPTEXPARAMETERI)(GLenum target, GLenum pname, GLint param); +// typedef void (APIENTRYP GPTEXPARAMETERIV)(GLenum target, GLenum pname, const GLint * params); +// typedef void (APIENTRYP GPTEXSTORAGE1D)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +// typedef void (APIENTRYP GPTEXSTORAGE2D)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +// typedef void (APIENTRYP GPTEXSTORAGE2DMULTISAMPLE)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +// typedef void (APIENTRYP GPTEXSTORAGE3D)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +// typedef void (APIENTRYP GPTEXSTORAGE3DMULTISAMPLE)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +// typedef void (APIENTRYP GPTEXSUBIMAGE1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void * pixels); +// typedef void (APIENTRYP GPTEXSUBIMAGE2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * pixels); +// typedef void (APIENTRYP GPTEXSUBIMAGE3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels); +// typedef void (APIENTRYP GPTEXTUREBARRIER)(); +// typedef void (APIENTRYP GPTEXTUREBARRIERNV)(); +// typedef void (APIENTRYP GPTEXTUREBUFFER)(GLuint texture, GLenum internalformat, GLuint buffer); +// typedef void (APIENTRYP GPTEXTUREBUFFEREXT)(GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); +// typedef void (APIENTRYP GPTEXTUREBUFFERRANGE)(GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +// typedef void (APIENTRYP GPTEXTUREBUFFERRANGEEXT)(GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +// typedef void (APIENTRYP GPTEXTUREIMAGE1DEXT)(GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void * pixels); +// typedef void (APIENTRYP GPTEXTUREIMAGE2DEXT)(GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void * pixels); +// typedef void (APIENTRYP GPTEXTUREIMAGE3DEXT)(GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void * pixels); +// typedef void (APIENTRYP GPTEXTUREPAGECOMMITMENTEXT)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); +// typedef void (APIENTRYP GPTEXTUREPARAMETERIIV)(GLuint texture, GLenum pname, const GLint * params); +// typedef void (APIENTRYP GPTEXTUREPARAMETERIIVEXT)(GLuint texture, GLenum target, GLenum pname, const GLint * params); +// typedef void (APIENTRYP GPTEXTUREPARAMETERIUIV)(GLuint texture, GLenum pname, const GLuint * params); +// typedef void (APIENTRYP GPTEXTUREPARAMETERIUIVEXT)(GLuint texture, GLenum target, GLenum pname, const GLuint * params); +// typedef void (APIENTRYP GPTEXTUREPARAMETERF)(GLuint texture, GLenum pname, GLfloat param); +// typedef void (APIENTRYP GPTEXTUREPARAMETERFEXT)(GLuint texture, GLenum target, GLenum pname, GLfloat param); +// typedef void (APIENTRYP GPTEXTUREPARAMETERFV)(GLuint texture, GLenum pname, const GLfloat * param); +// typedef void (APIENTRYP GPTEXTUREPARAMETERFVEXT)(GLuint texture, GLenum target, GLenum pname, const GLfloat * params); +// typedef void (APIENTRYP GPTEXTUREPARAMETERI)(GLuint texture, GLenum pname, GLint param); +// typedef void (APIENTRYP GPTEXTUREPARAMETERIEXT)(GLuint texture, GLenum target, GLenum pname, GLint param); +// typedef void (APIENTRYP GPTEXTUREPARAMETERIV)(GLuint texture, GLenum pname, const GLint * param); +// typedef void (APIENTRYP GPTEXTUREPARAMETERIVEXT)(GLuint texture, GLenum target, GLenum pname, const GLint * params); +// typedef void (APIENTRYP GPTEXTURERENDERBUFFEREXT)(GLuint texture, GLenum target, GLuint renderbuffer); +// typedef void (APIENTRYP GPTEXTURESTORAGE1D)(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width); +// typedef void (APIENTRYP GPTEXTURESTORAGE1DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +// typedef void (APIENTRYP GPTEXTURESTORAGE2D)(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +// typedef void (APIENTRYP GPTEXTURESTORAGE2DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +// typedef void (APIENTRYP GPTEXTURESTORAGE2DMULTISAMPLE)(GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +// typedef void (APIENTRYP GPTEXTURESTORAGE2DMULTISAMPLEEXT)(GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +// typedef void (APIENTRYP GPTEXTURESTORAGE3D)(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +// typedef void (APIENTRYP GPTEXTURESTORAGE3DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +// typedef void (APIENTRYP GPTEXTURESTORAGE3DMULTISAMPLE)(GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +// typedef void (APIENTRYP GPTEXTURESTORAGE3DMULTISAMPLEEXT)(GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +// typedef void (APIENTRYP GPTEXTURESUBIMAGE1D)(GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void * pixels); +// typedef void (APIENTRYP GPTEXTURESUBIMAGE1DEXT)(GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void * pixels); +// typedef void (APIENTRYP GPTEXTURESUBIMAGE2D)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * pixels); +// typedef void (APIENTRYP GPTEXTURESUBIMAGE2DEXT)(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * pixels); +// typedef void (APIENTRYP GPTEXTURESUBIMAGE3D)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels); +// typedef void (APIENTRYP GPTEXTURESUBIMAGE3DEXT)(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels); +// typedef void (APIENTRYP GPTEXTUREVIEW)(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); +// typedef void (APIENTRYP GPTRANSFORMFEEDBACKBUFFERBASE)(GLuint xfb, GLuint index, GLuint buffer); +// typedef void (APIENTRYP GPTRANSFORMFEEDBACKBUFFERRANGE)(GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +// typedef void (APIENTRYP GPTRANSFORMFEEDBACKVARYINGS)(GLuint program, GLsizei count, const GLchar *const* varyings, GLenum bufferMode); +// typedef void (APIENTRYP GPTRANSFORMPATHNV)(GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat * transformValues); +// typedef void (APIENTRYP GPUNIFORM1D)(GLint location, GLdouble x); +// typedef void (APIENTRYP GPUNIFORM1DV)(GLint location, GLsizei count, const GLdouble * value); +// typedef void (APIENTRYP GPUNIFORM1F)(GLint location, GLfloat v0); +// typedef void (APIENTRYP GPUNIFORM1FV)(GLint location, GLsizei count, const GLfloat * value); +// typedef void (APIENTRYP GPUNIFORM1I)(GLint location, GLint v0); +// typedef void (APIENTRYP GPUNIFORM1I64ARB)(GLint location, GLint64 x); +// typedef void (APIENTRYP GPUNIFORM1I64NV)(GLint location, GLint64EXT x); +// typedef void (APIENTRYP GPUNIFORM1I64VARB)(GLint location, GLsizei count, const GLint64 * value); +// typedef void (APIENTRYP GPUNIFORM1I64VNV)(GLint location, GLsizei count, const GLint64EXT * value); +// typedef void (APIENTRYP GPUNIFORM1IV)(GLint location, GLsizei count, const GLint * value); +// typedef void (APIENTRYP GPUNIFORM1UI)(GLint location, GLuint v0); +// typedef void (APIENTRYP GPUNIFORM1UI64ARB)(GLint location, GLuint64 x); +// typedef void (APIENTRYP GPUNIFORM1UI64NV)(GLint location, GLuint64EXT x); +// typedef void (APIENTRYP GPUNIFORM1UI64VARB)(GLint location, GLsizei count, const GLuint64 * value); +// typedef void (APIENTRYP GPUNIFORM1UI64VNV)(GLint location, GLsizei count, const GLuint64EXT * value); +// typedef void (APIENTRYP GPUNIFORM1UIV)(GLint location, GLsizei count, const GLuint * value); +// typedef void (APIENTRYP GPUNIFORM2D)(GLint location, GLdouble x, GLdouble y); +// typedef void (APIENTRYP GPUNIFORM2DV)(GLint location, GLsizei count, const GLdouble * value); +// typedef void (APIENTRYP GPUNIFORM2F)(GLint location, GLfloat v0, GLfloat v1); +// typedef void (APIENTRYP GPUNIFORM2FV)(GLint location, GLsizei count, const GLfloat * value); +// typedef void (APIENTRYP GPUNIFORM2I)(GLint location, GLint v0, GLint v1); +// typedef void (APIENTRYP GPUNIFORM2I64ARB)(GLint location, GLint64 x, GLint64 y); +// typedef void (APIENTRYP GPUNIFORM2I64NV)(GLint location, GLint64EXT x, GLint64EXT y); +// typedef void (APIENTRYP GPUNIFORM2I64VARB)(GLint location, GLsizei count, const GLint64 * value); +// typedef void (APIENTRYP GPUNIFORM2I64VNV)(GLint location, GLsizei count, const GLint64EXT * value); +// typedef void (APIENTRYP GPUNIFORM2IV)(GLint location, GLsizei count, const GLint * value); +// typedef void (APIENTRYP GPUNIFORM2UI)(GLint location, GLuint v0, GLuint v1); +// typedef void (APIENTRYP GPUNIFORM2UI64ARB)(GLint location, GLuint64 x, GLuint64 y); +// typedef void (APIENTRYP GPUNIFORM2UI64NV)(GLint location, GLuint64EXT x, GLuint64EXT y); +// typedef void (APIENTRYP GPUNIFORM2UI64VARB)(GLint location, GLsizei count, const GLuint64 * value); +// typedef void (APIENTRYP GPUNIFORM2UI64VNV)(GLint location, GLsizei count, const GLuint64EXT * value); +// typedef void (APIENTRYP GPUNIFORM2UIV)(GLint location, GLsizei count, const GLuint * value); +// typedef void (APIENTRYP GPUNIFORM3D)(GLint location, GLdouble x, GLdouble y, GLdouble z); +// typedef void (APIENTRYP GPUNIFORM3DV)(GLint location, GLsizei count, const GLdouble * value); +// typedef void (APIENTRYP GPUNIFORM3F)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +// typedef void (APIENTRYP GPUNIFORM3FV)(GLint location, GLsizei count, const GLfloat * value); +// typedef void (APIENTRYP GPUNIFORM3I)(GLint location, GLint v0, GLint v1, GLint v2); +// typedef void (APIENTRYP GPUNIFORM3I64ARB)(GLint location, GLint64 x, GLint64 y, GLint64 z); +// typedef void (APIENTRYP GPUNIFORM3I64NV)(GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +// typedef void (APIENTRYP GPUNIFORM3I64VARB)(GLint location, GLsizei count, const GLint64 * value); +// typedef void (APIENTRYP GPUNIFORM3I64VNV)(GLint location, GLsizei count, const GLint64EXT * value); +// typedef void (APIENTRYP GPUNIFORM3IV)(GLint location, GLsizei count, const GLint * value); +// typedef void (APIENTRYP GPUNIFORM3UI)(GLint location, GLuint v0, GLuint v1, GLuint v2); +// typedef void (APIENTRYP GPUNIFORM3UI64ARB)(GLint location, GLuint64 x, GLuint64 y, GLuint64 z); +// typedef void (APIENTRYP GPUNIFORM3UI64NV)(GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +// typedef void (APIENTRYP GPUNIFORM3UI64VARB)(GLint location, GLsizei count, const GLuint64 * value); +// typedef void (APIENTRYP GPUNIFORM3UI64VNV)(GLint location, GLsizei count, const GLuint64EXT * value); +// typedef void (APIENTRYP GPUNIFORM3UIV)(GLint location, GLsizei count, const GLuint * value); +// typedef void (APIENTRYP GPUNIFORM4D)(GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +// typedef void (APIENTRYP GPUNIFORM4DV)(GLint location, GLsizei count, const GLdouble * value); +// typedef void (APIENTRYP GPUNIFORM4F)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +// typedef void (APIENTRYP GPUNIFORM4FV)(GLint location, GLsizei count, const GLfloat * value); +// typedef void (APIENTRYP GPUNIFORM4I)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +// typedef void (APIENTRYP GPUNIFORM4I64ARB)(GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w); +// typedef void (APIENTRYP GPUNIFORM4I64NV)(GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +// typedef void (APIENTRYP GPUNIFORM4I64VARB)(GLint location, GLsizei count, const GLint64 * value); +// typedef void (APIENTRYP GPUNIFORM4I64VNV)(GLint location, GLsizei count, const GLint64EXT * value); +// typedef void (APIENTRYP GPUNIFORM4IV)(GLint location, GLsizei count, const GLint * value); +// typedef void (APIENTRYP GPUNIFORM4UI)(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +// typedef void (APIENTRYP GPUNIFORM4UI64ARB)(GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w); +// typedef void (APIENTRYP GPUNIFORM4UI64NV)(GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +// typedef void (APIENTRYP GPUNIFORM4UI64VARB)(GLint location, GLsizei count, const GLuint64 * value); +// typedef void (APIENTRYP GPUNIFORM4UI64VNV)(GLint location, GLsizei count, const GLuint64EXT * value); +// typedef void (APIENTRYP GPUNIFORM4UIV)(GLint location, GLsizei count, const GLuint * value); +// typedef void (APIENTRYP GPUNIFORMBLOCKBINDING)(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +// typedef void (APIENTRYP GPUNIFORMHANDLEUI64ARB)(GLint location, GLuint64 value); +// typedef void (APIENTRYP GPUNIFORMHANDLEUI64NV)(GLint location, GLuint64 value); +// typedef void (APIENTRYP GPUNIFORMHANDLEUI64VARB)(GLint location, GLsizei count, const GLuint64 * value); +// typedef void (APIENTRYP GPUNIFORMHANDLEUI64VNV)(GLint location, GLsizei count, const GLuint64 * value); +// typedef void (APIENTRYP GPUNIFORMMATRIX2DV)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPUNIFORMMATRIX2FV)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPUNIFORMMATRIX2X3DV)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPUNIFORMMATRIX2X3FV)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPUNIFORMMATRIX2X4DV)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPUNIFORMMATRIX2X4FV)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPUNIFORMMATRIX3DV)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPUNIFORMMATRIX3FV)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPUNIFORMMATRIX3X2DV)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPUNIFORMMATRIX3X2FV)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPUNIFORMMATRIX3X4DV)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPUNIFORMMATRIX3X4FV)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPUNIFORMMATRIX4DV)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPUNIFORMMATRIX4FV)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPUNIFORMMATRIX4X2DV)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPUNIFORMMATRIX4X2FV)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPUNIFORMMATRIX4X3DV)(GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +// typedef void (APIENTRYP GPUNIFORMMATRIX4X3FV)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +// typedef void (APIENTRYP GPUNIFORMSUBROUTINESUIV)(GLenum shadertype, GLsizei count, const GLuint * indices); +// typedef void (APIENTRYP GPUNIFORMUI64NV)(GLint location, GLuint64EXT value); +// typedef void (APIENTRYP GPUNIFORMUI64VNV)(GLint location, GLsizei count, const GLuint64EXT * value); +// typedef GLboolean (APIENTRYP GPUNMAPBUFFER)(GLenum target); +// typedef GLboolean (APIENTRYP GPUNMAPNAMEDBUFFER)(GLuint buffer); +// typedef GLboolean (APIENTRYP GPUNMAPNAMEDBUFFEREXT)(GLuint buffer); +// typedef void (APIENTRYP GPUSEPROGRAM)(GLuint program); +// typedef void (APIENTRYP GPUSEPROGRAMSTAGES)(GLuint pipeline, GLbitfield stages, GLuint program); +// typedef void (APIENTRYP GPUSEPROGRAMSTAGESEXT)(GLuint pipeline, GLbitfield stages, GLuint program); +// typedef void (APIENTRYP GPUSESHADERPROGRAMEXT)(GLenum type, GLuint program); +// typedef void (APIENTRYP GPVALIDATEPROGRAM)(GLuint program); +// typedef void (APIENTRYP GPVALIDATEPROGRAMPIPELINE)(GLuint pipeline); +// typedef void (APIENTRYP GPVALIDATEPROGRAMPIPELINEEXT)(GLuint pipeline); +// typedef void (APIENTRYP GPVERTEXARRAYATTRIBBINDING)(GLuint vaobj, GLuint attribindex, GLuint bindingindex); +// typedef void (APIENTRYP GPVERTEXARRAYATTRIBFORMAT)(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +// typedef void (APIENTRYP GPVERTEXARRAYATTRIBIFORMAT)(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +// typedef void (APIENTRYP GPVERTEXARRAYATTRIBLFORMAT)(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +// typedef void (APIENTRYP GPVERTEXARRAYBINDVERTEXBUFFEREXT)(GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +// typedef void (APIENTRYP GPVERTEXARRAYBINDINGDIVISOR)(GLuint vaobj, GLuint bindingindex, GLuint divisor); +// typedef void (APIENTRYP GPVERTEXARRAYCOLOROFFSETEXT)(GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +// typedef void (APIENTRYP GPVERTEXARRAYEDGEFLAGOFFSETEXT)(GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset); +// typedef void (APIENTRYP GPVERTEXARRAYELEMENTBUFFER)(GLuint vaobj, GLuint buffer); +// typedef void (APIENTRYP GPVERTEXARRAYFOGCOORDOFFSETEXT)(GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); +// typedef void (APIENTRYP GPVERTEXARRAYINDEXOFFSETEXT)(GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); +// typedef void (APIENTRYP GPVERTEXARRAYMULTITEXCOORDOFFSETEXT)(GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset); +// typedef void (APIENTRYP GPVERTEXARRAYNORMALOFFSETEXT)(GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); +// typedef void (APIENTRYP GPVERTEXARRAYSECONDARYCOLOROFFSETEXT)(GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +// typedef void (APIENTRYP GPVERTEXARRAYTEXCOORDOFFSETEXT)(GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +// typedef void (APIENTRYP GPVERTEXARRAYVERTEXATTRIBBINDINGEXT)(GLuint vaobj, GLuint attribindex, GLuint bindingindex); +// typedef void (APIENTRYP GPVERTEXARRAYVERTEXATTRIBDIVISOREXT)(GLuint vaobj, GLuint index, GLuint divisor); +// typedef void (APIENTRYP GPVERTEXARRAYVERTEXATTRIBFORMATEXT)(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +// typedef void (APIENTRYP GPVERTEXARRAYVERTEXATTRIBIFORMATEXT)(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +// typedef void (APIENTRYP GPVERTEXARRAYVERTEXATTRIBIOFFSETEXT)(GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); +// typedef void (APIENTRYP GPVERTEXARRAYVERTEXATTRIBLFORMATEXT)(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +// typedef void (APIENTRYP GPVERTEXARRAYVERTEXATTRIBLOFFSETEXT)(GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); +// typedef void (APIENTRYP GPVERTEXARRAYVERTEXATTRIBOFFSETEXT)(GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset); +// typedef void (APIENTRYP GPVERTEXARRAYVERTEXBINDINGDIVISOREXT)(GLuint vaobj, GLuint bindingindex, GLuint divisor); +// typedef void (APIENTRYP GPVERTEXARRAYVERTEXBUFFER)(GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +// typedef void (APIENTRYP GPVERTEXARRAYVERTEXBUFFERS)(GLuint vaobj, GLuint first, GLsizei count, const GLuint * buffers, const GLintptr * offsets, const GLsizei * strides); +// typedef void (APIENTRYP GPVERTEXARRAYVERTEXOFFSETEXT)(GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +// typedef void (APIENTRYP GPVERTEXATTRIB1D)(GLuint index, GLdouble x); +// typedef void (APIENTRYP GPVERTEXATTRIB1DV)(GLuint index, const GLdouble * v); +// typedef void (APIENTRYP GPVERTEXATTRIB1F)(GLuint index, GLfloat x); +// typedef void (APIENTRYP GPVERTEXATTRIB1FV)(GLuint index, const GLfloat * v); +// typedef void (APIENTRYP GPVERTEXATTRIB1S)(GLuint index, GLshort x); +// typedef void (APIENTRYP GPVERTEXATTRIB1SV)(GLuint index, const GLshort * v); +// typedef void (APIENTRYP GPVERTEXATTRIB2D)(GLuint index, GLdouble x, GLdouble y); +// typedef void (APIENTRYP GPVERTEXATTRIB2DV)(GLuint index, const GLdouble * v); +// typedef void (APIENTRYP GPVERTEXATTRIB2F)(GLuint index, GLfloat x, GLfloat y); +// typedef void (APIENTRYP GPVERTEXATTRIB2FV)(GLuint index, const GLfloat * v); +// typedef void (APIENTRYP GPVERTEXATTRIB2S)(GLuint index, GLshort x, GLshort y); +// typedef void (APIENTRYP GPVERTEXATTRIB2SV)(GLuint index, const GLshort * v); +// typedef void (APIENTRYP GPVERTEXATTRIB3D)(GLuint index, GLdouble x, GLdouble y, GLdouble z); +// typedef void (APIENTRYP GPVERTEXATTRIB3DV)(GLuint index, const GLdouble * v); +// typedef void (APIENTRYP GPVERTEXATTRIB3F)(GLuint index, GLfloat x, GLfloat y, GLfloat z); +// typedef void (APIENTRYP GPVERTEXATTRIB3FV)(GLuint index, const GLfloat * v); +// typedef void (APIENTRYP GPVERTEXATTRIB3S)(GLuint index, GLshort x, GLshort y, GLshort z); +// typedef void (APIENTRYP GPVERTEXATTRIB3SV)(GLuint index, const GLshort * v); +// typedef void (APIENTRYP GPVERTEXATTRIB4NBV)(GLuint index, const GLbyte * v); +// typedef void (APIENTRYP GPVERTEXATTRIB4NIV)(GLuint index, const GLint * v); +// typedef void (APIENTRYP GPVERTEXATTRIB4NSV)(GLuint index, const GLshort * v); +// typedef void (APIENTRYP GPVERTEXATTRIB4NUB)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +// typedef void (APIENTRYP GPVERTEXATTRIB4NUBV)(GLuint index, const GLubyte * v); +// typedef void (APIENTRYP GPVERTEXATTRIB4NUIV)(GLuint index, const GLuint * v); +// typedef void (APIENTRYP GPVERTEXATTRIB4NUSV)(GLuint index, const GLushort * v); +// typedef void (APIENTRYP GPVERTEXATTRIB4BV)(GLuint index, const GLbyte * v); +// typedef void (APIENTRYP GPVERTEXATTRIB4D)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +// typedef void (APIENTRYP GPVERTEXATTRIB4DV)(GLuint index, const GLdouble * v); +// typedef void (APIENTRYP GPVERTEXATTRIB4F)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +// typedef void (APIENTRYP GPVERTEXATTRIB4FV)(GLuint index, const GLfloat * v); +// typedef void (APIENTRYP GPVERTEXATTRIB4IV)(GLuint index, const GLint * v); +// typedef void (APIENTRYP GPVERTEXATTRIB4S)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +// typedef void (APIENTRYP GPVERTEXATTRIB4SV)(GLuint index, const GLshort * v); +// typedef void (APIENTRYP GPVERTEXATTRIB4UBV)(GLuint index, const GLubyte * v); +// typedef void (APIENTRYP GPVERTEXATTRIB4UIV)(GLuint index, const GLuint * v); +// typedef void (APIENTRYP GPVERTEXATTRIB4USV)(GLuint index, const GLushort * v); +// typedef void (APIENTRYP GPVERTEXATTRIBBINDING)(GLuint attribindex, GLuint bindingindex); +// typedef void (APIENTRYP GPVERTEXATTRIBDIVISOR)(GLuint index, GLuint divisor); +// typedef void (APIENTRYP GPVERTEXATTRIBDIVISORARB)(GLuint index, GLuint divisor); +// typedef void (APIENTRYP GPVERTEXATTRIBFORMAT)(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +// typedef void (APIENTRYP GPVERTEXATTRIBFORMATNV)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); +// typedef void (APIENTRYP GPVERTEXATTRIBI1I)(GLuint index, GLint x); +// typedef void (APIENTRYP GPVERTEXATTRIBI1IV)(GLuint index, const GLint * v); +// typedef void (APIENTRYP GPVERTEXATTRIBI1UI)(GLuint index, GLuint x); +// typedef void (APIENTRYP GPVERTEXATTRIBI1UIV)(GLuint index, const GLuint * v); +// typedef void (APIENTRYP GPVERTEXATTRIBI2I)(GLuint index, GLint x, GLint y); +// typedef void (APIENTRYP GPVERTEXATTRIBI2IV)(GLuint index, const GLint * v); +// typedef void (APIENTRYP GPVERTEXATTRIBI2UI)(GLuint index, GLuint x, GLuint y); +// typedef void (APIENTRYP GPVERTEXATTRIBI2UIV)(GLuint index, const GLuint * v); +// typedef void (APIENTRYP GPVERTEXATTRIBI3I)(GLuint index, GLint x, GLint y, GLint z); +// typedef void (APIENTRYP GPVERTEXATTRIBI3IV)(GLuint index, const GLint * v); +// typedef void (APIENTRYP GPVERTEXATTRIBI3UI)(GLuint index, GLuint x, GLuint y, GLuint z); +// typedef void (APIENTRYP GPVERTEXATTRIBI3UIV)(GLuint index, const GLuint * v); +// typedef void (APIENTRYP GPVERTEXATTRIBI4BV)(GLuint index, const GLbyte * v); +// typedef void (APIENTRYP GPVERTEXATTRIBI4I)(GLuint index, GLint x, GLint y, GLint z, GLint w); +// typedef void (APIENTRYP GPVERTEXATTRIBI4IV)(GLuint index, const GLint * v); +// typedef void (APIENTRYP GPVERTEXATTRIBI4SV)(GLuint index, const GLshort * v); +// typedef void (APIENTRYP GPVERTEXATTRIBI4UBV)(GLuint index, const GLubyte * v); +// typedef void (APIENTRYP GPVERTEXATTRIBI4UI)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +// typedef void (APIENTRYP GPVERTEXATTRIBI4UIV)(GLuint index, const GLuint * v); +// typedef void (APIENTRYP GPVERTEXATTRIBI4USV)(GLuint index, const GLushort * v); +// typedef void (APIENTRYP GPVERTEXATTRIBIFORMAT)(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +// typedef void (APIENTRYP GPVERTEXATTRIBIFORMATNV)(GLuint index, GLint size, GLenum type, GLsizei stride); +// typedef void (APIENTRYP GPVERTEXATTRIBIPOINTER)(GLuint index, GLint size, GLenum type, GLsizei stride, const void * pointer); +// typedef void (APIENTRYP GPVERTEXATTRIBL1D)(GLuint index, GLdouble x); +// typedef void (APIENTRYP GPVERTEXATTRIBL1DV)(GLuint index, const GLdouble * v); +// typedef void (APIENTRYP GPVERTEXATTRIBL1I64NV)(GLuint index, GLint64EXT x); +// typedef void (APIENTRYP GPVERTEXATTRIBL1I64VNV)(GLuint index, const GLint64EXT * v); +// typedef void (APIENTRYP GPVERTEXATTRIBL1UI64ARB)(GLuint index, GLuint64EXT x); +// typedef void (APIENTRYP GPVERTEXATTRIBL1UI64NV)(GLuint index, GLuint64EXT x); +// typedef void (APIENTRYP GPVERTEXATTRIBL1UI64VARB)(GLuint index, const GLuint64EXT * v); +// typedef void (APIENTRYP GPVERTEXATTRIBL1UI64VNV)(GLuint index, const GLuint64EXT * v); +// typedef void (APIENTRYP GPVERTEXATTRIBL2D)(GLuint index, GLdouble x, GLdouble y); +// typedef void (APIENTRYP GPVERTEXATTRIBL2DV)(GLuint index, const GLdouble * v); +// typedef void (APIENTRYP GPVERTEXATTRIBL2I64NV)(GLuint index, GLint64EXT x, GLint64EXT y); +// typedef void (APIENTRYP GPVERTEXATTRIBL2I64VNV)(GLuint index, const GLint64EXT * v); +// typedef void (APIENTRYP GPVERTEXATTRIBL2UI64NV)(GLuint index, GLuint64EXT x, GLuint64EXT y); +// typedef void (APIENTRYP GPVERTEXATTRIBL2UI64VNV)(GLuint index, const GLuint64EXT * v); +// typedef void (APIENTRYP GPVERTEXATTRIBL3D)(GLuint index, GLdouble x, GLdouble y, GLdouble z); +// typedef void (APIENTRYP GPVERTEXATTRIBL3DV)(GLuint index, const GLdouble * v); +// typedef void (APIENTRYP GPVERTEXATTRIBL3I64NV)(GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); +// typedef void (APIENTRYP GPVERTEXATTRIBL3I64VNV)(GLuint index, const GLint64EXT * v); +// typedef void (APIENTRYP GPVERTEXATTRIBL3UI64NV)(GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +// typedef void (APIENTRYP GPVERTEXATTRIBL3UI64VNV)(GLuint index, const GLuint64EXT * v); +// typedef void (APIENTRYP GPVERTEXATTRIBL4D)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +// typedef void (APIENTRYP GPVERTEXATTRIBL4DV)(GLuint index, const GLdouble * v); +// typedef void (APIENTRYP GPVERTEXATTRIBL4I64NV)(GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +// typedef void (APIENTRYP GPVERTEXATTRIBL4I64VNV)(GLuint index, const GLint64EXT * v); +// typedef void (APIENTRYP GPVERTEXATTRIBL4UI64NV)(GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +// typedef void (APIENTRYP GPVERTEXATTRIBL4UI64VNV)(GLuint index, const GLuint64EXT * v); +// typedef void (APIENTRYP GPVERTEXATTRIBLFORMAT)(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +// typedef void (APIENTRYP GPVERTEXATTRIBLFORMATNV)(GLuint index, GLint size, GLenum type, GLsizei stride); +// typedef void (APIENTRYP GPVERTEXATTRIBLPOINTER)(GLuint index, GLint size, GLenum type, GLsizei stride, const void * pointer); +// typedef void (APIENTRYP GPVERTEXATTRIBP1UI)(GLuint index, GLenum type, GLboolean normalized, GLuint value); +// typedef void (APIENTRYP GPVERTEXATTRIBP1UIV)(GLuint index, GLenum type, GLboolean normalized, const GLuint * value); +// typedef void (APIENTRYP GPVERTEXATTRIBP2UI)(GLuint index, GLenum type, GLboolean normalized, GLuint value); +// typedef void (APIENTRYP GPVERTEXATTRIBP2UIV)(GLuint index, GLenum type, GLboolean normalized, const GLuint * value); +// typedef void (APIENTRYP GPVERTEXATTRIBP3UI)(GLuint index, GLenum type, GLboolean normalized, GLuint value); +// typedef void (APIENTRYP GPVERTEXATTRIBP3UIV)(GLuint index, GLenum type, GLboolean normalized, const GLuint * value); +// typedef void (APIENTRYP GPVERTEXATTRIBP4UI)(GLuint index, GLenum type, GLboolean normalized, GLuint value); +// typedef void (APIENTRYP GPVERTEXATTRIBP4UIV)(GLuint index, GLenum type, GLboolean normalized, const GLuint * value); +// typedef void (APIENTRYP GPVERTEXATTRIBPOINTER)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void * pointer); +// typedef void (APIENTRYP GPVERTEXBINDINGDIVISOR)(GLuint bindingindex, GLuint divisor); +// typedef void (APIENTRYP GPVERTEXFORMATNV)(GLint size, GLenum type, GLsizei stride); +// typedef void (APIENTRYP GPVIEWPORT)(GLint x, GLint y, GLsizei width, GLsizei height); +// typedef void (APIENTRYP GPVIEWPORTARRAYV)(GLuint first, GLsizei count, const GLfloat * v); +// typedef void (APIENTRYP GPVIEWPORTINDEXEDF)(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +// typedef void (APIENTRYP GPVIEWPORTINDEXEDFV)(GLuint index, const GLfloat * v); +// typedef void (APIENTRYP GPVIEWPORTPOSITIONWSCALENV)(GLuint index, GLfloat xcoeff, GLfloat ycoeff); +// typedef void (APIENTRYP GPVIEWPORTSWIZZLENV)(GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, GLenum swizzlew); +// typedef void (APIENTRYP GPWAITSYNC)(GLsync sync, GLbitfield flags, GLuint64 timeout); +// typedef void (APIENTRYP GPWAITVKSEMAPHORENV)(GLuint64 vkSemaphore); +// typedef void (APIENTRYP GPWEIGHTPATHSNV)(GLuint resultPath, GLsizei numPaths, const GLuint * paths, const GLfloat * weights); +// typedef void (APIENTRYP GPWINDOWRECTANGLESEXT)(GLenum mode, GLsizei count, const GLint * box); +// static void glowActiveProgramEXT(GPACTIVEPROGRAMEXT fnptr, GLuint program) { +// (*fnptr)(program); +// } +// static void glowActiveShaderProgram(GPACTIVESHADERPROGRAM fnptr, GLuint pipeline, GLuint program) { +// (*fnptr)(pipeline, program); +// } +// static void glowActiveShaderProgramEXT(GPACTIVESHADERPROGRAMEXT fnptr, GLuint pipeline, GLuint program) { +// (*fnptr)(pipeline, program); +// } +// static void glowActiveTexture(GPACTIVETEXTURE fnptr, GLenum texture) { +// (*fnptr)(texture); +// } +// static void glowApplyFramebufferAttachmentCMAAINTEL(GPAPPLYFRAMEBUFFERATTACHMENTCMAAINTEL fnptr) { +// (*fnptr)(); +// } +// static void glowAttachShader(GPATTACHSHADER fnptr, GLuint program, GLuint shader) { +// (*fnptr)(program, shader); +// } +// static void glowBeginConditionalRender(GPBEGINCONDITIONALRENDER fnptr, GLuint id, GLenum mode) { +// (*fnptr)(id, mode); +// } +// static void glowBeginConditionalRenderNV(GPBEGINCONDITIONALRENDERNV fnptr, GLuint id, GLenum mode) { +// (*fnptr)(id, mode); +// } +// static void glowBeginPerfMonitorAMD(GPBEGINPERFMONITORAMD fnptr, GLuint monitor) { +// (*fnptr)(monitor); +// } +// static void glowBeginPerfQueryINTEL(GPBEGINPERFQUERYINTEL fnptr, GLuint queryHandle) { +// (*fnptr)(queryHandle); +// } +// static void glowBeginQuery(GPBEGINQUERY fnptr, GLenum target, GLuint id) { +// (*fnptr)(target, id); +// } +// static void glowBeginQueryIndexed(GPBEGINQUERYINDEXED fnptr, GLenum target, GLuint index, GLuint id) { +// (*fnptr)(target, index, id); +// } +// static void glowBeginTransformFeedback(GPBEGINTRANSFORMFEEDBACK fnptr, GLenum primitiveMode) { +// (*fnptr)(primitiveMode); +// } +// static void glowBindAttribLocation(GPBINDATTRIBLOCATION fnptr, GLuint program, GLuint index, const GLchar * name) { +// (*fnptr)(program, index, name); +// } +// static void glowBindBuffer(GPBINDBUFFER fnptr, GLenum target, GLuint buffer) { +// (*fnptr)(target, buffer); +// } +// static void glowBindBufferBase(GPBINDBUFFERBASE fnptr, GLenum target, GLuint index, GLuint buffer) { +// (*fnptr)(target, index, buffer); +// } +// static void glowBindBufferRange(GPBINDBUFFERRANGE fnptr, GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) { +// (*fnptr)(target, index, buffer, offset, size); +// } +// static void glowBindBuffersBase(GPBINDBUFFERSBASE fnptr, GLenum target, GLuint first, GLsizei count, const GLuint * buffers) { +// (*fnptr)(target, first, count, buffers); +// } +// static void glowBindBuffersRange(GPBINDBUFFERSRANGE fnptr, GLenum target, GLuint first, GLsizei count, const GLuint * buffers, const GLintptr * offsets, const GLsizeiptr * sizes) { +// (*fnptr)(target, first, count, buffers, offsets, sizes); +// } +// static void glowBindFragDataLocation(GPBINDFRAGDATALOCATION fnptr, GLuint program, GLuint color, const GLchar * name) { +// (*fnptr)(program, color, name); +// } +// static void glowBindFragDataLocationIndexed(GPBINDFRAGDATALOCATIONINDEXED fnptr, GLuint program, GLuint colorNumber, GLuint index, const GLchar * name) { +// (*fnptr)(program, colorNumber, index, name); +// } +// static void glowBindFramebuffer(GPBINDFRAMEBUFFER fnptr, GLenum target, GLuint framebuffer) { +// (*fnptr)(target, framebuffer); +// } +// static void glowBindImageTexture(GPBINDIMAGETEXTURE fnptr, GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format) { +// (*fnptr)(unit, texture, level, layered, layer, access, format); +// } +// static void glowBindImageTextures(GPBINDIMAGETEXTURES fnptr, GLuint first, GLsizei count, const GLuint * textures) { +// (*fnptr)(first, count, textures); +// } +// static void glowBindMultiTextureEXT(GPBINDMULTITEXTUREEXT fnptr, GLenum texunit, GLenum target, GLuint texture) { +// (*fnptr)(texunit, target, texture); +// } +// static void glowBindProgramPipeline(GPBINDPROGRAMPIPELINE fnptr, GLuint pipeline) { +// (*fnptr)(pipeline); +// } +// static void glowBindProgramPipelineEXT(GPBINDPROGRAMPIPELINEEXT fnptr, GLuint pipeline) { +// (*fnptr)(pipeline); +// } +// static void glowBindRenderbuffer(GPBINDRENDERBUFFER fnptr, GLenum target, GLuint renderbuffer) { +// (*fnptr)(target, renderbuffer); +// } +// static void glowBindSampler(GPBINDSAMPLER fnptr, GLuint unit, GLuint sampler) { +// (*fnptr)(unit, sampler); +// } +// static void glowBindSamplers(GPBINDSAMPLERS fnptr, GLuint first, GLsizei count, const GLuint * samplers) { +// (*fnptr)(first, count, samplers); +// } +// static void glowBindTexture(GPBINDTEXTURE fnptr, GLenum target, GLuint texture) { +// (*fnptr)(target, texture); +// } +// static void glowBindTextureUnit(GPBINDTEXTUREUNIT fnptr, GLuint unit, GLuint texture) { +// (*fnptr)(unit, texture); +// } +// static void glowBindTextures(GPBINDTEXTURES fnptr, GLuint first, GLsizei count, const GLuint * textures) { +// (*fnptr)(first, count, textures); +// } +// static void glowBindTransformFeedback(GPBINDTRANSFORMFEEDBACK fnptr, GLenum target, GLuint id) { +// (*fnptr)(target, id); +// } +// static void glowBindVertexArray(GPBINDVERTEXARRAY fnptr, GLuint array) { +// (*fnptr)(array); +// } +// static void glowBindVertexBuffer(GPBINDVERTEXBUFFER fnptr, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) { +// (*fnptr)(bindingindex, buffer, offset, stride); +// } +// static void glowBindVertexBuffers(GPBINDVERTEXBUFFERS fnptr, GLuint first, GLsizei count, const GLuint * buffers, const GLintptr * offsets, const GLsizei * strides) { +// (*fnptr)(first, count, buffers, offsets, strides); +// } +// static void glowBlendBarrierKHR(GPBLENDBARRIERKHR fnptr) { +// (*fnptr)(); +// } +// static void glowBlendBarrierNV(GPBLENDBARRIERNV fnptr) { +// (*fnptr)(); +// } +// static void glowBlendColor(GPBLENDCOLOR fnptr, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { +// (*fnptr)(red, green, blue, alpha); +// } +// static void glowBlendEquation(GPBLENDEQUATION fnptr, GLenum mode) { +// (*fnptr)(mode); +// } +// static void glowBlendEquationSeparate(GPBLENDEQUATIONSEPARATE fnptr, GLenum modeRGB, GLenum modeAlpha) { +// (*fnptr)(modeRGB, modeAlpha); +// } +// static void glowBlendEquationSeparatei(GPBLENDEQUATIONSEPARATEI fnptr, GLuint buf, GLenum modeRGB, GLenum modeAlpha) { +// (*fnptr)(buf, modeRGB, modeAlpha); +// } +// static void glowBlendEquationSeparateiARB(GPBLENDEQUATIONSEPARATEIARB fnptr, GLuint buf, GLenum modeRGB, GLenum modeAlpha) { +// (*fnptr)(buf, modeRGB, modeAlpha); +// } +// static void glowBlendEquationi(GPBLENDEQUATIONI fnptr, GLuint buf, GLenum mode) { +// (*fnptr)(buf, mode); +// } +// static void glowBlendEquationiARB(GPBLENDEQUATIONIARB fnptr, GLuint buf, GLenum mode) { +// (*fnptr)(buf, mode); +// } +// static void glowBlendFunc(GPBLENDFUNC fnptr, GLenum sfactor, GLenum dfactor) { +// (*fnptr)(sfactor, dfactor); +// } +// static void glowBlendFuncSeparate(GPBLENDFUNCSEPARATE fnptr, GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) { +// (*fnptr)(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); +// } +// static void glowBlendFuncSeparatei(GPBLENDFUNCSEPARATEI fnptr, GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { +// (*fnptr)(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); +// } +// static void glowBlendFuncSeparateiARB(GPBLENDFUNCSEPARATEIARB fnptr, GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { +// (*fnptr)(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); +// } +// static void glowBlendFunci(GPBLENDFUNCI fnptr, GLuint buf, GLenum src, GLenum dst) { +// (*fnptr)(buf, src, dst); +// } +// static void glowBlendFunciARB(GPBLENDFUNCIARB fnptr, GLuint buf, GLenum src, GLenum dst) { +// (*fnptr)(buf, src, dst); +// } +// static void glowBlendParameteriNV(GPBLENDPARAMETERINV fnptr, GLenum pname, GLint value) { +// (*fnptr)(pname, value); +// } +// static void glowBlitFramebuffer(GPBLITFRAMEBUFFER fnptr, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) { +// (*fnptr)(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); +// } +// static void glowBlitNamedFramebuffer(GPBLITNAMEDFRAMEBUFFER fnptr, GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) { +// (*fnptr)(readFramebuffer, drawFramebuffer, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); +// } +// static void glowBufferAddressRangeNV(GPBUFFERADDRESSRANGENV fnptr, GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length) { +// (*fnptr)(pname, index, address, length); +// } +// static void glowBufferData(GPBUFFERDATA fnptr, GLenum target, GLsizeiptr size, const void * data, GLenum usage) { +// (*fnptr)(target, size, data, usage); +// } +// static void glowBufferPageCommitmentARB(GPBUFFERPAGECOMMITMENTARB fnptr, GLenum target, GLintptr offset, GLsizeiptr size, GLboolean commit) { +// (*fnptr)(target, offset, size, commit); +// } +// static void glowBufferStorage(GPBUFFERSTORAGE fnptr, GLenum target, GLsizeiptr size, const void * data, GLbitfield flags) { +// (*fnptr)(target, size, data, flags); +// } +// static void glowBufferSubData(GPBUFFERSUBDATA fnptr, GLenum target, GLintptr offset, GLsizeiptr size, const void * data) { +// (*fnptr)(target, offset, size, data); +// } +// static void glowCallCommandListNV(GPCALLCOMMANDLISTNV fnptr, GLuint list) { +// (*fnptr)(list); +// } +// static GLenum glowCheckFramebufferStatus(GPCHECKFRAMEBUFFERSTATUS fnptr, GLenum target) { +// return (*fnptr)(target); +// } +// static GLenum glowCheckNamedFramebufferStatus(GPCHECKNAMEDFRAMEBUFFERSTATUS fnptr, GLuint framebuffer, GLenum target) { +// return (*fnptr)(framebuffer, target); +// } +// static GLenum glowCheckNamedFramebufferStatusEXT(GPCHECKNAMEDFRAMEBUFFERSTATUSEXT fnptr, GLuint framebuffer, GLenum target) { +// return (*fnptr)(framebuffer, target); +// } +// static void glowClampColor(GPCLAMPCOLOR fnptr, GLenum target, GLenum clamp) { +// (*fnptr)(target, clamp); +// } +// static void glowClear(GPCLEAR fnptr, GLbitfield mask) { +// (*fnptr)(mask); +// } +// static void glowClearBufferData(GPCLEARBUFFERDATA fnptr, GLenum target, GLenum internalformat, GLenum format, GLenum type, const void * data) { +// (*fnptr)(target, internalformat, format, type, data); +// } +// static void glowClearBufferSubData(GPCLEARBUFFERSUBDATA fnptr, GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void * data) { +// (*fnptr)(target, internalformat, offset, size, format, type, data); +// } +// static void glowClearBufferfi(GPCLEARBUFFERFI fnptr, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) { +// (*fnptr)(buffer, drawbuffer, depth, stencil); +// } +// static void glowClearBufferfv(GPCLEARBUFFERFV fnptr, GLenum buffer, GLint drawbuffer, const GLfloat * value) { +// (*fnptr)(buffer, drawbuffer, value); +// } +// static void glowClearBufferiv(GPCLEARBUFFERIV fnptr, GLenum buffer, GLint drawbuffer, const GLint * value) { +// (*fnptr)(buffer, drawbuffer, value); +// } +// static void glowClearBufferuiv(GPCLEARBUFFERUIV fnptr, GLenum buffer, GLint drawbuffer, const GLuint * value) { +// (*fnptr)(buffer, drawbuffer, value); +// } +// static void glowClearColor(GPCLEARCOLOR fnptr, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { +// (*fnptr)(red, green, blue, alpha); +// } +// static void glowClearDepth(GPCLEARDEPTH fnptr, GLdouble depth) { +// (*fnptr)(depth); +// } +// static void glowClearDepthf(GPCLEARDEPTHF fnptr, GLfloat d) { +// (*fnptr)(d); +// } +// static void glowClearNamedBufferData(GPCLEARNAMEDBUFFERDATA fnptr, GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void * data) { +// (*fnptr)(buffer, internalformat, format, type, data); +// } +// static void glowClearNamedBufferDataEXT(GPCLEARNAMEDBUFFERDATAEXT fnptr, GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void * data) { +// (*fnptr)(buffer, internalformat, format, type, data); +// } +// static void glowClearNamedBufferSubData(GPCLEARNAMEDBUFFERSUBDATA fnptr, GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void * data) { +// (*fnptr)(buffer, internalformat, offset, size, format, type, data); +// } +// static void glowClearNamedBufferSubDataEXT(GPCLEARNAMEDBUFFERSUBDATAEXT fnptr, GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void * data) { +// (*fnptr)(buffer, internalformat, offset, size, format, type, data); +// } +// static void glowClearNamedFramebufferfi(GPCLEARNAMEDFRAMEBUFFERFI fnptr, GLuint framebuffer, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) { +// (*fnptr)(framebuffer, buffer, drawbuffer, depth, stencil); +// } +// static void glowClearNamedFramebufferfv(GPCLEARNAMEDFRAMEBUFFERFV fnptr, GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat * value) { +// (*fnptr)(framebuffer, buffer, drawbuffer, value); +// } +// static void glowClearNamedFramebufferiv(GPCLEARNAMEDFRAMEBUFFERIV fnptr, GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint * value) { +// (*fnptr)(framebuffer, buffer, drawbuffer, value); +// } +// static void glowClearNamedFramebufferuiv(GPCLEARNAMEDFRAMEBUFFERUIV fnptr, GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint * value) { +// (*fnptr)(framebuffer, buffer, drawbuffer, value); +// } +// static void glowClearStencil(GPCLEARSTENCIL fnptr, GLint s) { +// (*fnptr)(s); +// } +// static void glowClearTexImage(GPCLEARTEXIMAGE fnptr, GLuint texture, GLint level, GLenum format, GLenum type, const void * data) { +// (*fnptr)(texture, level, format, type, data); +// } +// static void glowClearTexSubImage(GPCLEARTEXSUBIMAGE fnptr, GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data) { +// (*fnptr)(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); +// } +// static void glowClientAttribDefaultEXT(GPCLIENTATTRIBDEFAULTEXT fnptr, GLbitfield mask) { +// (*fnptr)(mask); +// } +// static GLenum glowClientWaitSync(GPCLIENTWAITSYNC fnptr, GLsync sync, GLbitfield flags, GLuint64 timeout) { +// return (*fnptr)(sync, flags, timeout); +// } +// static void glowClipControl(GPCLIPCONTROL fnptr, GLenum origin, GLenum depth) { +// (*fnptr)(origin, depth); +// } +// static void glowColorFormatNV(GPCOLORFORMATNV fnptr, GLint size, GLenum type, GLsizei stride) { +// (*fnptr)(size, type, stride); +// } +// static void glowColorMask(GPCOLORMASK fnptr, GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) { +// (*fnptr)(red, green, blue, alpha); +// } +// static void glowColorMaski(GPCOLORMASKI fnptr, GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a) { +// (*fnptr)(index, r, g, b, a); +// } +// static void glowCommandListSegmentsNV(GPCOMMANDLISTSEGMENTSNV fnptr, GLuint list, GLuint segments) { +// (*fnptr)(list, segments); +// } +// static void glowCompileCommandListNV(GPCOMPILECOMMANDLISTNV fnptr, GLuint list) { +// (*fnptr)(list); +// } +// static void glowCompileShader(GPCOMPILESHADER fnptr, GLuint shader) { +// (*fnptr)(shader); +// } +// static void glowCompileShaderIncludeARB(GPCOMPILESHADERINCLUDEARB fnptr, GLuint shader, GLsizei count, const GLchar *const* path, const GLint * length) { +// (*fnptr)(shader, count, path, length); +// } +// static void glowCompressedMultiTexImage1DEXT(GPCOMPRESSEDMULTITEXIMAGE1DEXT fnptr, GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void * bits) { +// (*fnptr)(texunit, target, level, internalformat, width, border, imageSize, bits); +// } +// static void glowCompressedMultiTexImage2DEXT(GPCOMPRESSEDMULTITEXIMAGE2DEXT fnptr, GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void * bits) { +// (*fnptr)(texunit, target, level, internalformat, width, height, border, imageSize, bits); +// } +// static void glowCompressedMultiTexImage3DEXT(GPCOMPRESSEDMULTITEXIMAGE3DEXT fnptr, GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void * bits) { +// (*fnptr)(texunit, target, level, internalformat, width, height, depth, border, imageSize, bits); +// } +// static void glowCompressedMultiTexSubImage1DEXT(GPCOMPRESSEDMULTITEXSUBIMAGE1DEXT fnptr, GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void * bits) { +// (*fnptr)(texunit, target, level, xoffset, width, format, imageSize, bits); +// } +// static void glowCompressedMultiTexSubImage2DEXT(GPCOMPRESSEDMULTITEXSUBIMAGE2DEXT fnptr, GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void * bits) { +// (*fnptr)(texunit, target, level, xoffset, yoffset, width, height, format, imageSize, bits); +// } +// static void glowCompressedMultiTexSubImage3DEXT(GPCOMPRESSEDMULTITEXSUBIMAGE3DEXT fnptr, GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * bits) { +// (*fnptr)(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, bits); +// } +// static void glowCompressedTexImage1D(GPCOMPRESSEDTEXIMAGE1D fnptr, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void * data) { +// (*fnptr)(target, level, internalformat, width, border, imageSize, data); +// } +// static void glowCompressedTexImage2D(GPCOMPRESSEDTEXIMAGE2D fnptr, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void * data) { +// (*fnptr)(target, level, internalformat, width, height, border, imageSize, data); +// } +// static void glowCompressedTexImage3D(GPCOMPRESSEDTEXIMAGE3D fnptr, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void * data) { +// (*fnptr)(target, level, internalformat, width, height, depth, border, imageSize, data); +// } +// static void glowCompressedTexSubImage1D(GPCOMPRESSEDTEXSUBIMAGE1D fnptr, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void * data) { +// (*fnptr)(target, level, xoffset, width, format, imageSize, data); +// } +// static void glowCompressedTexSubImage2D(GPCOMPRESSEDTEXSUBIMAGE2D fnptr, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void * data) { +// (*fnptr)(target, level, xoffset, yoffset, width, height, format, imageSize, data); +// } +// static void glowCompressedTexSubImage3D(GPCOMPRESSEDTEXSUBIMAGE3D fnptr, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * data) { +// (*fnptr)(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); +// } +// static void glowCompressedTextureImage1DEXT(GPCOMPRESSEDTEXTUREIMAGE1DEXT fnptr, GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void * bits) { +// (*fnptr)(texture, target, level, internalformat, width, border, imageSize, bits); +// } +// static void glowCompressedTextureImage2DEXT(GPCOMPRESSEDTEXTUREIMAGE2DEXT fnptr, GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void * bits) { +// (*fnptr)(texture, target, level, internalformat, width, height, border, imageSize, bits); +// } +// static void glowCompressedTextureImage3DEXT(GPCOMPRESSEDTEXTUREIMAGE3DEXT fnptr, GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void * bits) { +// (*fnptr)(texture, target, level, internalformat, width, height, depth, border, imageSize, bits); +// } +// static void glowCompressedTextureSubImage1D(GPCOMPRESSEDTEXTURESUBIMAGE1D fnptr, GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void * data) { +// (*fnptr)(texture, level, xoffset, width, format, imageSize, data); +// } +// static void glowCompressedTextureSubImage1DEXT(GPCOMPRESSEDTEXTURESUBIMAGE1DEXT fnptr, GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void * bits) { +// (*fnptr)(texture, target, level, xoffset, width, format, imageSize, bits); +// } +// static void glowCompressedTextureSubImage2D(GPCOMPRESSEDTEXTURESUBIMAGE2D fnptr, GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void * data) { +// (*fnptr)(texture, level, xoffset, yoffset, width, height, format, imageSize, data); +// } +// static void glowCompressedTextureSubImage2DEXT(GPCOMPRESSEDTEXTURESUBIMAGE2DEXT fnptr, GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void * bits) { +// (*fnptr)(texture, target, level, xoffset, yoffset, width, height, format, imageSize, bits); +// } +// static void glowCompressedTextureSubImage3D(GPCOMPRESSEDTEXTURESUBIMAGE3D fnptr, GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * data) { +// (*fnptr)(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); +// } +// static void glowCompressedTextureSubImage3DEXT(GPCOMPRESSEDTEXTURESUBIMAGE3DEXT fnptr, GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * bits) { +// (*fnptr)(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, bits); +// } +// static void glowConservativeRasterParameterfNV(GPCONSERVATIVERASTERPARAMETERFNV fnptr, GLenum pname, GLfloat value) { +// (*fnptr)(pname, value); +// } +// static void glowConservativeRasterParameteriNV(GPCONSERVATIVERASTERPARAMETERINV fnptr, GLenum pname, GLint param) { +// (*fnptr)(pname, param); +// } +// static void glowCopyBufferSubData(GPCOPYBUFFERSUBDATA fnptr, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) { +// (*fnptr)(readTarget, writeTarget, readOffset, writeOffset, size); +// } +// static void glowCopyImageSubData(GPCOPYIMAGESUBDATA fnptr, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth) { +// (*fnptr)(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth); +// } +// static void glowCopyMultiTexImage1DEXT(GPCOPYMULTITEXIMAGE1DEXT fnptr, GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) { +// (*fnptr)(texunit, target, level, internalformat, x, y, width, border); +// } +// static void glowCopyMultiTexImage2DEXT(GPCOPYMULTITEXIMAGE2DEXT fnptr, GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { +// (*fnptr)(texunit, target, level, internalformat, x, y, width, height, border); +// } +// static void glowCopyMultiTexSubImage1DEXT(GPCOPYMULTITEXSUBIMAGE1DEXT fnptr, GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) { +// (*fnptr)(texunit, target, level, xoffset, x, y, width); +// } +// static void glowCopyMultiTexSubImage2DEXT(GPCOPYMULTITEXSUBIMAGE2DEXT fnptr, GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { +// (*fnptr)(texunit, target, level, xoffset, yoffset, x, y, width, height); +// } +// static void glowCopyMultiTexSubImage3DEXT(GPCOPYMULTITEXSUBIMAGE3DEXT fnptr, GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) { +// (*fnptr)(texunit, target, level, xoffset, yoffset, zoffset, x, y, width, height); +// } +// static void glowCopyNamedBufferSubData(GPCOPYNAMEDBUFFERSUBDATA fnptr, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) { +// (*fnptr)(readBuffer, writeBuffer, readOffset, writeOffset, size); +// } +// static void glowCopyPathNV(GPCOPYPATHNV fnptr, GLuint resultPath, GLuint srcPath) { +// (*fnptr)(resultPath, srcPath); +// } +// static void glowCopyTexImage1D(GPCOPYTEXIMAGE1D fnptr, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) { +// (*fnptr)(target, level, internalformat, x, y, width, border); +// } +// static void glowCopyTexImage2D(GPCOPYTEXIMAGE2D fnptr, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { +// (*fnptr)(target, level, internalformat, x, y, width, height, border); +// } +// static void glowCopyTexSubImage1D(GPCOPYTEXSUBIMAGE1D fnptr, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) { +// (*fnptr)(target, level, xoffset, x, y, width); +// } +// static void glowCopyTexSubImage2D(GPCOPYTEXSUBIMAGE2D fnptr, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { +// (*fnptr)(target, level, xoffset, yoffset, x, y, width, height); +// } +// static void glowCopyTexSubImage3D(GPCOPYTEXSUBIMAGE3D fnptr, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) { +// (*fnptr)(target, level, xoffset, yoffset, zoffset, x, y, width, height); +// } +// static void glowCopyTextureImage1DEXT(GPCOPYTEXTUREIMAGE1DEXT fnptr, GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) { +// (*fnptr)(texture, target, level, internalformat, x, y, width, border); +// } +// static void glowCopyTextureImage2DEXT(GPCOPYTEXTUREIMAGE2DEXT fnptr, GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { +// (*fnptr)(texture, target, level, internalformat, x, y, width, height, border); +// } +// static void glowCopyTextureSubImage1D(GPCOPYTEXTURESUBIMAGE1D fnptr, GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) { +// (*fnptr)(texture, level, xoffset, x, y, width); +// } +// static void glowCopyTextureSubImage1DEXT(GPCOPYTEXTURESUBIMAGE1DEXT fnptr, GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) { +// (*fnptr)(texture, target, level, xoffset, x, y, width); +// } +// static void glowCopyTextureSubImage2D(GPCOPYTEXTURESUBIMAGE2D fnptr, GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { +// (*fnptr)(texture, level, xoffset, yoffset, x, y, width, height); +// } +// static void glowCopyTextureSubImage2DEXT(GPCOPYTEXTURESUBIMAGE2DEXT fnptr, GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { +// (*fnptr)(texture, target, level, xoffset, yoffset, x, y, width, height); +// } +// static void glowCopyTextureSubImage3D(GPCOPYTEXTURESUBIMAGE3D fnptr, GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) { +// (*fnptr)(texture, level, xoffset, yoffset, zoffset, x, y, width, height); +// } +// static void glowCopyTextureSubImage3DEXT(GPCOPYTEXTURESUBIMAGE3DEXT fnptr, GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) { +// (*fnptr)(texture, target, level, xoffset, yoffset, zoffset, x, y, width, height); +// } +// static void glowCoverFillPathInstancedNV(GPCOVERFILLPATHINSTANCEDNV fnptr, GLsizei numPaths, GLenum pathNameType, const void * paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat * transformValues) { +// (*fnptr)(numPaths, pathNameType, paths, pathBase, coverMode, transformType, transformValues); +// } +// static void glowCoverFillPathNV(GPCOVERFILLPATHNV fnptr, GLuint path, GLenum coverMode) { +// (*fnptr)(path, coverMode); +// } +// static void glowCoverStrokePathInstancedNV(GPCOVERSTROKEPATHINSTANCEDNV fnptr, GLsizei numPaths, GLenum pathNameType, const void * paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat * transformValues) { +// (*fnptr)(numPaths, pathNameType, paths, pathBase, coverMode, transformType, transformValues); +// } +// static void glowCoverStrokePathNV(GPCOVERSTROKEPATHNV fnptr, GLuint path, GLenum coverMode) { +// (*fnptr)(path, coverMode); +// } +// static void glowCoverageModulationNV(GPCOVERAGEMODULATIONNV fnptr, GLenum components) { +// (*fnptr)(components); +// } +// static void glowCoverageModulationTableNV(GPCOVERAGEMODULATIONTABLENV fnptr, GLsizei n, const GLfloat * v) { +// (*fnptr)(n, v); +// } +// static void glowCreateBuffers(GPCREATEBUFFERS fnptr, GLsizei n, GLuint * buffers) { +// (*fnptr)(n, buffers); +// } +// static void glowCreateCommandListsNV(GPCREATECOMMANDLISTSNV fnptr, GLsizei n, GLuint * lists) { +// (*fnptr)(n, lists); +// } +// static void glowCreateFramebuffers(GPCREATEFRAMEBUFFERS fnptr, GLsizei n, GLuint * framebuffers) { +// (*fnptr)(n, framebuffers); +// } +// static void glowCreatePerfQueryINTEL(GPCREATEPERFQUERYINTEL fnptr, GLuint queryId, GLuint * queryHandle) { +// (*fnptr)(queryId, queryHandle); +// } +// static GLuint glowCreateProgram(GPCREATEPROGRAM fnptr) { +// return (*fnptr)(); +// } +// static void glowCreateProgramPipelines(GPCREATEPROGRAMPIPELINES fnptr, GLsizei n, GLuint * pipelines) { +// (*fnptr)(n, pipelines); +// } +// static void glowCreateQueries(GPCREATEQUERIES fnptr, GLenum target, GLsizei n, GLuint * ids) { +// (*fnptr)(target, n, ids); +// } +// static void glowCreateRenderbuffers(GPCREATERENDERBUFFERS fnptr, GLsizei n, GLuint * renderbuffers) { +// (*fnptr)(n, renderbuffers); +// } +// static void glowCreateSamplers(GPCREATESAMPLERS fnptr, GLsizei n, GLuint * samplers) { +// (*fnptr)(n, samplers); +// } +// static GLuint glowCreateShader(GPCREATESHADER fnptr, GLenum type) { +// return (*fnptr)(type); +// } +// static GLuint glowCreateShaderProgramEXT(GPCREATESHADERPROGRAMEXT fnptr, GLenum type, const GLchar * string) { +// return (*fnptr)(type, string); +// } +// static GLuint glowCreateShaderProgramv(GPCREATESHADERPROGRAMV fnptr, GLenum type, GLsizei count, const GLchar *const* strings) { +// return (*fnptr)(type, count, strings); +// } +// static GLuint glowCreateShaderProgramvEXT(GPCREATESHADERPROGRAMVEXT fnptr, GLenum type, GLsizei count, const GLchar ** strings) { +// return (*fnptr)(type, count, strings); +// } +// static void glowCreateStatesNV(GPCREATESTATESNV fnptr, GLsizei n, GLuint * states) { +// (*fnptr)(n, states); +// } +// static GLsync glowCreateSyncFromCLeventARB(GPCREATESYNCFROMCLEVENTARB fnptr, struct _cl_context * context, struct _cl_event * event, GLbitfield flags) { +// return (*fnptr)(context, event, flags); +// } +// static void glowCreateTextures(GPCREATETEXTURES fnptr, GLenum target, GLsizei n, GLuint * textures) { +// (*fnptr)(target, n, textures); +// } +// static void glowCreateTransformFeedbacks(GPCREATETRANSFORMFEEDBACKS fnptr, GLsizei n, GLuint * ids) { +// (*fnptr)(n, ids); +// } +// static void glowCreateVertexArrays(GPCREATEVERTEXARRAYS fnptr, GLsizei n, GLuint * arrays) { +// (*fnptr)(n, arrays); +// } +// static void glowCullFace(GPCULLFACE fnptr, GLenum mode) { +// (*fnptr)(mode); +// } +// static void glowDebugMessageCallback(GPDEBUGMESSAGECALLBACK fnptr, GLDEBUGPROC callback, const void * userParam) { +// (*fnptr)(glowCDebugCallback, userParam); +// } +// static void glowDebugMessageCallbackARB(GPDEBUGMESSAGECALLBACKARB fnptr, GLDEBUGPROCARB callback, const void * userParam) { +// (*fnptr)(glowCDebugCallback, userParam); +// } +// static void glowDebugMessageCallbackKHR(GPDEBUGMESSAGECALLBACKKHR fnptr, GLDEBUGPROCKHR callback, const void * userParam) { +// (*fnptr)(glowCDebugCallback, userParam); +// } +// static void glowDebugMessageControl(GPDEBUGMESSAGECONTROL fnptr, GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled) { +// (*fnptr)(source, type, severity, count, ids, enabled); +// } +// static void glowDebugMessageControlARB(GPDEBUGMESSAGECONTROLARB fnptr, GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled) { +// (*fnptr)(source, type, severity, count, ids, enabled); +// } +// static void glowDebugMessageControlKHR(GPDEBUGMESSAGECONTROLKHR fnptr, GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled) { +// (*fnptr)(source, type, severity, count, ids, enabled); +// } +// static void glowDebugMessageInsert(GPDEBUGMESSAGEINSERT fnptr, GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf) { +// (*fnptr)(source, type, id, severity, length, buf); +// } +// static void glowDebugMessageInsertARB(GPDEBUGMESSAGEINSERTARB fnptr, GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf) { +// (*fnptr)(source, type, id, severity, length, buf); +// } +// static void glowDebugMessageInsertKHR(GPDEBUGMESSAGEINSERTKHR fnptr, GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf) { +// (*fnptr)(source, type, id, severity, length, buf); +// } +// static void glowDeleteBuffers(GPDELETEBUFFERS fnptr, GLsizei n, const GLuint * buffers) { +// (*fnptr)(n, buffers); +// } +// static void glowDeleteCommandListsNV(GPDELETECOMMANDLISTSNV fnptr, GLsizei n, const GLuint * lists) { +// (*fnptr)(n, lists); +// } +// static void glowDeleteFramebuffers(GPDELETEFRAMEBUFFERS fnptr, GLsizei n, const GLuint * framebuffers) { +// (*fnptr)(n, framebuffers); +// } +// static void glowDeleteNamedStringARB(GPDELETENAMEDSTRINGARB fnptr, GLint namelen, const GLchar * name) { +// (*fnptr)(namelen, name); +// } +// static void glowDeletePathsNV(GPDELETEPATHSNV fnptr, GLuint path, GLsizei range) { +// (*fnptr)(path, range); +// } +// static void glowDeletePerfMonitorsAMD(GPDELETEPERFMONITORSAMD fnptr, GLsizei n, GLuint * monitors) { +// (*fnptr)(n, monitors); +// } +// static void glowDeletePerfQueryINTEL(GPDELETEPERFQUERYINTEL fnptr, GLuint queryHandle) { +// (*fnptr)(queryHandle); +// } +// static void glowDeleteProgram(GPDELETEPROGRAM fnptr, GLuint program) { +// (*fnptr)(program); +// } +// static void glowDeleteProgramPipelines(GPDELETEPROGRAMPIPELINES fnptr, GLsizei n, const GLuint * pipelines) { +// (*fnptr)(n, pipelines); +// } +// static void glowDeleteProgramPipelinesEXT(GPDELETEPROGRAMPIPELINESEXT fnptr, GLsizei n, const GLuint * pipelines) { +// (*fnptr)(n, pipelines); +// } +// static void glowDeleteQueries(GPDELETEQUERIES fnptr, GLsizei n, const GLuint * ids) { +// (*fnptr)(n, ids); +// } +// static void glowDeleteRenderbuffers(GPDELETERENDERBUFFERS fnptr, GLsizei n, const GLuint * renderbuffers) { +// (*fnptr)(n, renderbuffers); +// } +// static void glowDeleteSamplers(GPDELETESAMPLERS fnptr, GLsizei count, const GLuint * samplers) { +// (*fnptr)(count, samplers); +// } +// static void glowDeleteShader(GPDELETESHADER fnptr, GLuint shader) { +// (*fnptr)(shader); +// } +// static void glowDeleteStatesNV(GPDELETESTATESNV fnptr, GLsizei n, const GLuint * states) { +// (*fnptr)(n, states); +// } +// static void glowDeleteSync(GPDELETESYNC fnptr, GLsync sync) { +// (*fnptr)(sync); +// } +// static void glowDeleteTextures(GPDELETETEXTURES fnptr, GLsizei n, const GLuint * textures) { +// (*fnptr)(n, textures); +// } +// static void glowDeleteTransformFeedbacks(GPDELETETRANSFORMFEEDBACKS fnptr, GLsizei n, const GLuint * ids) { +// (*fnptr)(n, ids); +// } +// static void glowDeleteVertexArrays(GPDELETEVERTEXARRAYS fnptr, GLsizei n, const GLuint * arrays) { +// (*fnptr)(n, arrays); +// } +// static void glowDepthFunc(GPDEPTHFUNC fnptr, GLenum func) { +// (*fnptr)(func); +// } +// static void glowDepthMask(GPDEPTHMASK fnptr, GLboolean flag) { +// (*fnptr)(flag); +// } +// static void glowDepthRange(GPDEPTHRANGE fnptr, GLdouble n, GLdouble f) { +// (*fnptr)(n, f); +// } +// static void glowDepthRangeArrayv(GPDEPTHRANGEARRAYV fnptr, GLuint first, GLsizei count, const GLdouble * v) { +// (*fnptr)(first, count, v); +// } +// static void glowDepthRangeIndexed(GPDEPTHRANGEINDEXED fnptr, GLuint index, GLdouble n, GLdouble f) { +// (*fnptr)(index, n, f); +// } +// static void glowDepthRangef(GPDEPTHRANGEF fnptr, GLfloat n, GLfloat f) { +// (*fnptr)(n, f); +// } +// static void glowDetachShader(GPDETACHSHADER fnptr, GLuint program, GLuint shader) { +// (*fnptr)(program, shader); +// } +// static void glowDisable(GPDISABLE fnptr, GLenum cap) { +// (*fnptr)(cap); +// } +// static void glowDisableClientStateIndexedEXT(GPDISABLECLIENTSTATEINDEXEDEXT fnptr, GLenum array, GLuint index) { +// (*fnptr)(array, index); +// } +// static void glowDisableClientStateiEXT(GPDISABLECLIENTSTATEIEXT fnptr, GLenum array, GLuint index) { +// (*fnptr)(array, index); +// } +// static void glowDisableIndexedEXT(GPDISABLEINDEXEDEXT fnptr, GLenum target, GLuint index) { +// (*fnptr)(target, index); +// } +// static void glowDisableVertexArrayAttrib(GPDISABLEVERTEXARRAYATTRIB fnptr, GLuint vaobj, GLuint index) { +// (*fnptr)(vaobj, index); +// } +// static void glowDisableVertexArrayAttribEXT(GPDISABLEVERTEXARRAYATTRIBEXT fnptr, GLuint vaobj, GLuint index) { +// (*fnptr)(vaobj, index); +// } +// static void glowDisableVertexArrayEXT(GPDISABLEVERTEXARRAYEXT fnptr, GLuint vaobj, GLenum array) { +// (*fnptr)(vaobj, array); +// } +// static void glowDisableVertexAttribArray(GPDISABLEVERTEXATTRIBARRAY fnptr, GLuint index) { +// (*fnptr)(index); +// } +// static void glowDisablei(GPDISABLEI fnptr, GLenum target, GLuint index) { +// (*fnptr)(target, index); +// } +// static void glowDispatchCompute(GPDISPATCHCOMPUTE fnptr, GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z) { +// (*fnptr)(num_groups_x, num_groups_y, num_groups_z); +// } +// static void glowDispatchComputeGroupSizeARB(GPDISPATCHCOMPUTEGROUPSIZEARB fnptr, GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z) { +// (*fnptr)(num_groups_x, num_groups_y, num_groups_z, group_size_x, group_size_y, group_size_z); +// } +// static void glowDispatchComputeIndirect(GPDISPATCHCOMPUTEINDIRECT fnptr, GLintptr indirect) { +// (*fnptr)(indirect); +// } +// static void glowDrawArrays(GPDRAWARRAYS fnptr, GLenum mode, GLint first, GLsizei count) { +// (*fnptr)(mode, first, count); +// } +// static void glowDrawArraysIndirect(GPDRAWARRAYSINDIRECT fnptr, GLenum mode, const void * indirect) { +// (*fnptr)(mode, indirect); +// } +// static void glowDrawArraysInstanced(GPDRAWARRAYSINSTANCED fnptr, GLenum mode, GLint first, GLsizei count, GLsizei instancecount) { +// (*fnptr)(mode, first, count, instancecount); +// } +// static void glowDrawArraysInstancedARB(GPDRAWARRAYSINSTANCEDARB fnptr, GLenum mode, GLint first, GLsizei count, GLsizei primcount) { +// (*fnptr)(mode, first, count, primcount); +// } +// static void glowDrawArraysInstancedBaseInstance(GPDRAWARRAYSINSTANCEDBASEINSTANCE fnptr, GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance) { +// (*fnptr)(mode, first, count, instancecount, baseinstance); +// } +// static void glowDrawArraysInstancedEXT(GPDRAWARRAYSINSTANCEDEXT fnptr, GLenum mode, GLint start, GLsizei count, GLsizei primcount) { +// (*fnptr)(mode, start, count, primcount); +// } +// static void glowDrawBuffer(GPDRAWBUFFER fnptr, GLenum buf) { +// (*fnptr)(buf); +// } +// static void glowDrawBuffers(GPDRAWBUFFERS fnptr, GLsizei n, const GLenum * bufs) { +// (*fnptr)(n, bufs); +// } +// static void glowDrawCommandsAddressNV(GPDRAWCOMMANDSADDRESSNV fnptr, GLenum primitiveMode, const GLuint64 * indirects, const GLsizei * sizes, GLuint count) { +// (*fnptr)(primitiveMode, indirects, sizes, count); +// } +// static void glowDrawCommandsNV(GPDRAWCOMMANDSNV fnptr, GLenum primitiveMode, GLuint buffer, const GLintptr * indirects, const GLsizei * sizes, GLuint count) { +// (*fnptr)(primitiveMode, buffer, indirects, sizes, count); +// } +// static void glowDrawCommandsStatesAddressNV(GPDRAWCOMMANDSSTATESADDRESSNV fnptr, const GLuint64 * indirects, const GLsizei * sizes, const GLuint * states, const GLuint * fbos, GLuint count) { +// (*fnptr)(indirects, sizes, states, fbos, count); +// } +// static void glowDrawCommandsStatesNV(GPDRAWCOMMANDSSTATESNV fnptr, GLuint buffer, const GLintptr * indirects, const GLsizei * sizes, const GLuint * states, const GLuint * fbos, GLuint count) { +// (*fnptr)(buffer, indirects, sizes, states, fbos, count); +// } +// static void glowDrawElements(GPDRAWELEMENTS fnptr, GLenum mode, GLsizei count, GLenum type, const void * indices) { +// (*fnptr)(mode, count, type, indices); +// } +// static void glowDrawElementsBaseVertex(GPDRAWELEMENTSBASEVERTEX fnptr, GLenum mode, GLsizei count, GLenum type, const void * indices, GLint basevertex) { +// (*fnptr)(mode, count, type, indices, basevertex); +// } +// static void glowDrawElementsIndirect(GPDRAWELEMENTSINDIRECT fnptr, GLenum mode, GLenum type, const void * indirect) { +// (*fnptr)(mode, type, indirect); +// } +// static void glowDrawElementsInstanced(GPDRAWELEMENTSINSTANCED fnptr, GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount) { +// (*fnptr)(mode, count, type, indices, instancecount); +// } +// static void glowDrawElementsInstancedARB(GPDRAWELEMENTSINSTANCEDARB fnptr, GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei primcount) { +// (*fnptr)(mode, count, type, indices, primcount); +// } +// static void glowDrawElementsInstancedBaseInstance(GPDRAWELEMENTSINSTANCEDBASEINSTANCE fnptr, GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount, GLuint baseinstance) { +// (*fnptr)(mode, count, type, indices, instancecount, baseinstance); +// } +// static void glowDrawElementsInstancedBaseVertex(GPDRAWELEMENTSINSTANCEDBASEVERTEX fnptr, GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount, GLint basevertex) { +// (*fnptr)(mode, count, type, indices, instancecount, basevertex); +// } +// static void glowDrawElementsInstancedBaseVertexBaseInstance(GPDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCE fnptr, GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance) { +// (*fnptr)(mode, count, type, indices, instancecount, basevertex, baseinstance); +// } +// static void glowDrawElementsInstancedEXT(GPDRAWELEMENTSINSTANCEDEXT fnptr, GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei primcount) { +// (*fnptr)(mode, count, type, indices, primcount); +// } +// static void glowDrawRangeElements(GPDRAWRANGEELEMENTS fnptr, GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void * indices) { +// (*fnptr)(mode, start, end, count, type, indices); +// } +// static void glowDrawRangeElementsBaseVertex(GPDRAWRANGEELEMENTSBASEVERTEX fnptr, GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void * indices, GLint basevertex) { +// (*fnptr)(mode, start, end, count, type, indices, basevertex); +// } +// static void glowDrawTransformFeedback(GPDRAWTRANSFORMFEEDBACK fnptr, GLenum mode, GLuint id) { +// (*fnptr)(mode, id); +// } +// static void glowDrawTransformFeedbackInstanced(GPDRAWTRANSFORMFEEDBACKINSTANCED fnptr, GLenum mode, GLuint id, GLsizei instancecount) { +// (*fnptr)(mode, id, instancecount); +// } +// static void glowDrawTransformFeedbackStream(GPDRAWTRANSFORMFEEDBACKSTREAM fnptr, GLenum mode, GLuint id, GLuint stream) { +// (*fnptr)(mode, id, stream); +// } +// static void glowDrawTransformFeedbackStreamInstanced(GPDRAWTRANSFORMFEEDBACKSTREAMINSTANCED fnptr, GLenum mode, GLuint id, GLuint stream, GLsizei instancecount) { +// (*fnptr)(mode, id, stream, instancecount); +// } +// static void glowDrawVkImageNV(GPDRAWVKIMAGENV fnptr, GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1) { +// (*fnptr)(vkImage, sampler, x0, y0, x1, y1, z, s0, t0, s1, t1); +// } +// static void glowEGLImageTargetTexStorageEXT(GPEGLIMAGETARGETTEXSTORAGEEXT fnptr, GLenum target, GLeglImageOES image, const GLint* attrib_list) { +// (*fnptr)(target, image, attrib_list); +// } +// static void glowEGLImageTargetTextureStorageEXT(GPEGLIMAGETARGETTEXTURESTORAGEEXT fnptr, GLuint texture, GLeglImageOES image, const GLint* attrib_list) { +// (*fnptr)(texture, image, attrib_list); +// } +// static void glowEdgeFlagFormatNV(GPEDGEFLAGFORMATNV fnptr, GLsizei stride) { +// (*fnptr)(stride); +// } +// static void glowEnable(GPENABLE fnptr, GLenum cap) { +// (*fnptr)(cap); +// } +// static void glowEnableClientStateIndexedEXT(GPENABLECLIENTSTATEINDEXEDEXT fnptr, GLenum array, GLuint index) { +// (*fnptr)(array, index); +// } +// static void glowEnableClientStateiEXT(GPENABLECLIENTSTATEIEXT fnptr, GLenum array, GLuint index) { +// (*fnptr)(array, index); +// } +// static void glowEnableIndexedEXT(GPENABLEINDEXEDEXT fnptr, GLenum target, GLuint index) { +// (*fnptr)(target, index); +// } +// static void glowEnableVertexArrayAttrib(GPENABLEVERTEXARRAYATTRIB fnptr, GLuint vaobj, GLuint index) { +// (*fnptr)(vaobj, index); +// } +// static void glowEnableVertexArrayAttribEXT(GPENABLEVERTEXARRAYATTRIBEXT fnptr, GLuint vaobj, GLuint index) { +// (*fnptr)(vaobj, index); +// } +// static void glowEnableVertexArrayEXT(GPENABLEVERTEXARRAYEXT fnptr, GLuint vaobj, GLenum array) { +// (*fnptr)(vaobj, array); +// } +// static void glowEnableVertexAttribArray(GPENABLEVERTEXATTRIBARRAY fnptr, GLuint index) { +// (*fnptr)(index); +// } +// static void glowEnablei(GPENABLEI fnptr, GLenum target, GLuint index) { +// (*fnptr)(target, index); +// } +// static void glowEndConditionalRender(GPENDCONDITIONALRENDER fnptr) { +// (*fnptr)(); +// } +// static void glowEndConditionalRenderNV(GPENDCONDITIONALRENDERNV fnptr) { +// (*fnptr)(); +// } +// static void glowEndPerfMonitorAMD(GPENDPERFMONITORAMD fnptr, GLuint monitor) { +// (*fnptr)(monitor); +// } +// static void glowEndPerfQueryINTEL(GPENDPERFQUERYINTEL fnptr, GLuint queryHandle) { +// (*fnptr)(queryHandle); +// } +// static void glowEndQuery(GPENDQUERY fnptr, GLenum target) { +// (*fnptr)(target); +// } +// static void glowEndQueryIndexed(GPENDQUERYINDEXED fnptr, GLenum target, GLuint index) { +// (*fnptr)(target, index); +// } +// static void glowEndTransformFeedback(GPENDTRANSFORMFEEDBACK fnptr) { +// (*fnptr)(); +// } +// static void glowEvaluateDepthValuesARB(GPEVALUATEDEPTHVALUESARB fnptr) { +// (*fnptr)(); +// } +// static GLsync glowFenceSync(GPFENCESYNC fnptr, GLenum condition, GLbitfield flags) { +// return (*fnptr)(condition, flags); +// } +// static void glowFinish(GPFINISH fnptr) { +// (*fnptr)(); +// } +// static void glowFlush(GPFLUSH fnptr) { +// (*fnptr)(); +// } +// static void glowFlushMappedBufferRange(GPFLUSHMAPPEDBUFFERRANGE fnptr, GLenum target, GLintptr offset, GLsizeiptr length) { +// (*fnptr)(target, offset, length); +// } +// static void glowFlushMappedNamedBufferRange(GPFLUSHMAPPEDNAMEDBUFFERRANGE fnptr, GLuint buffer, GLintptr offset, GLsizeiptr length) { +// (*fnptr)(buffer, offset, length); +// } +// static void glowFlushMappedNamedBufferRangeEXT(GPFLUSHMAPPEDNAMEDBUFFERRANGEEXT fnptr, GLuint buffer, GLintptr offset, GLsizeiptr length) { +// (*fnptr)(buffer, offset, length); +// } +// static void glowFogCoordFormatNV(GPFOGCOORDFORMATNV fnptr, GLenum type, GLsizei stride) { +// (*fnptr)(type, stride); +// } +// static void glowFragmentCoverageColorNV(GPFRAGMENTCOVERAGECOLORNV fnptr, GLuint color) { +// (*fnptr)(color); +// } +// static void glowFramebufferDrawBufferEXT(GPFRAMEBUFFERDRAWBUFFEREXT fnptr, GLuint framebuffer, GLenum mode) { +// (*fnptr)(framebuffer, mode); +// } +// static void glowFramebufferDrawBuffersEXT(GPFRAMEBUFFERDRAWBUFFERSEXT fnptr, GLuint framebuffer, GLsizei n, const GLenum * bufs) { +// (*fnptr)(framebuffer, n, bufs); +// } +// static void glowFramebufferFetchBarrierEXT(GPFRAMEBUFFERFETCHBARRIEREXT fnptr) { +// (*fnptr)(); +// } +// static void glowFramebufferParameteri(GPFRAMEBUFFERPARAMETERI fnptr, GLenum target, GLenum pname, GLint param) { +// (*fnptr)(target, pname, param); +// } +// static void glowFramebufferReadBufferEXT(GPFRAMEBUFFERREADBUFFEREXT fnptr, GLuint framebuffer, GLenum mode) { +// (*fnptr)(framebuffer, mode); +// } +// static void glowFramebufferRenderbuffer(GPFRAMEBUFFERRENDERBUFFER fnptr, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) { +// (*fnptr)(target, attachment, renderbuffertarget, renderbuffer); +// } +// static void glowFramebufferSampleLocationsfvARB(GPFRAMEBUFFERSAMPLELOCATIONSFVARB fnptr, GLenum target, GLuint start, GLsizei count, const GLfloat * v) { +// (*fnptr)(target, start, count, v); +// } +// static void glowFramebufferSampleLocationsfvNV(GPFRAMEBUFFERSAMPLELOCATIONSFVNV fnptr, GLenum target, GLuint start, GLsizei count, const GLfloat * v) { +// (*fnptr)(target, start, count, v); +// } +// static void glowFramebufferTexture(GPFRAMEBUFFERTEXTURE fnptr, GLenum target, GLenum attachment, GLuint texture, GLint level) { +// (*fnptr)(target, attachment, texture, level); +// } +// static void glowFramebufferTexture1D(GPFRAMEBUFFERTEXTURE1D fnptr, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) { +// (*fnptr)(target, attachment, textarget, texture, level); +// } +// static void glowFramebufferTexture2D(GPFRAMEBUFFERTEXTURE2D fnptr, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) { +// (*fnptr)(target, attachment, textarget, texture, level); +// } +// static void glowFramebufferTexture3D(GPFRAMEBUFFERTEXTURE3D fnptr, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) { +// (*fnptr)(target, attachment, textarget, texture, level, zoffset); +// } +// static void glowFramebufferTextureARB(GPFRAMEBUFFERTEXTUREARB fnptr, GLenum target, GLenum attachment, GLuint texture, GLint level) { +// (*fnptr)(target, attachment, texture, level); +// } +// static void glowFramebufferTextureFaceARB(GPFRAMEBUFFERTEXTUREFACEARB fnptr, GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face) { +// (*fnptr)(target, attachment, texture, level, face); +// } +// static void glowFramebufferTextureLayer(GPFRAMEBUFFERTEXTURELAYER fnptr, GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) { +// (*fnptr)(target, attachment, texture, level, layer); +// } +// static void glowFramebufferTextureLayerARB(GPFRAMEBUFFERTEXTURELAYERARB fnptr, GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) { +// (*fnptr)(target, attachment, texture, level, layer); +// } +// static void glowFramebufferTextureMultiviewOVR(GPFRAMEBUFFERTEXTUREMULTIVIEWOVR fnptr, GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews) { +// (*fnptr)(target, attachment, texture, level, baseViewIndex, numViews); +// } +// static void glowFrontFace(GPFRONTFACE fnptr, GLenum mode) { +// (*fnptr)(mode); +// } +// static void glowGenBuffers(GPGENBUFFERS fnptr, GLsizei n, GLuint * buffers) { +// (*fnptr)(n, buffers); +// } +// static void glowGenFramebuffers(GPGENFRAMEBUFFERS fnptr, GLsizei n, GLuint * framebuffers) { +// (*fnptr)(n, framebuffers); +// } +// static GLuint glowGenPathsNV(GPGENPATHSNV fnptr, GLsizei range) { +// return (*fnptr)(range); +// } +// static void glowGenPerfMonitorsAMD(GPGENPERFMONITORSAMD fnptr, GLsizei n, GLuint * monitors) { +// (*fnptr)(n, monitors); +// } +// static void glowGenProgramPipelines(GPGENPROGRAMPIPELINES fnptr, GLsizei n, GLuint * pipelines) { +// (*fnptr)(n, pipelines); +// } +// static void glowGenProgramPipelinesEXT(GPGENPROGRAMPIPELINESEXT fnptr, GLsizei n, GLuint * pipelines) { +// (*fnptr)(n, pipelines); +// } +// static void glowGenQueries(GPGENQUERIES fnptr, GLsizei n, GLuint * ids) { +// (*fnptr)(n, ids); +// } +// static void glowGenRenderbuffers(GPGENRENDERBUFFERS fnptr, GLsizei n, GLuint * renderbuffers) { +// (*fnptr)(n, renderbuffers); +// } +// static void glowGenSamplers(GPGENSAMPLERS fnptr, GLsizei count, GLuint * samplers) { +// (*fnptr)(count, samplers); +// } +// static void glowGenTextures(GPGENTEXTURES fnptr, GLsizei n, GLuint * textures) { +// (*fnptr)(n, textures); +// } +// static void glowGenTransformFeedbacks(GPGENTRANSFORMFEEDBACKS fnptr, GLsizei n, GLuint * ids) { +// (*fnptr)(n, ids); +// } +// static void glowGenVertexArrays(GPGENVERTEXARRAYS fnptr, GLsizei n, GLuint * arrays) { +// (*fnptr)(n, arrays); +// } +// static void glowGenerateMipmap(GPGENERATEMIPMAP fnptr, GLenum target) { +// (*fnptr)(target); +// } +// static void glowGenerateMultiTexMipmapEXT(GPGENERATEMULTITEXMIPMAPEXT fnptr, GLenum texunit, GLenum target) { +// (*fnptr)(texunit, target); +// } +// static void glowGenerateTextureMipmap(GPGENERATETEXTUREMIPMAP fnptr, GLuint texture) { +// (*fnptr)(texture); +// } +// static void glowGenerateTextureMipmapEXT(GPGENERATETEXTUREMIPMAPEXT fnptr, GLuint texture, GLenum target) { +// (*fnptr)(texture, target); +// } +// static void glowGetActiveAtomicCounterBufferiv(GPGETACTIVEATOMICCOUNTERBUFFERIV fnptr, GLuint program, GLuint bufferIndex, GLenum pname, GLint * params) { +// (*fnptr)(program, bufferIndex, pname, params); +// } +// static void glowGetActiveAttrib(GPGETACTIVEATTRIB fnptr, GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name) { +// (*fnptr)(program, index, bufSize, length, size, type, name); +// } +// static void glowGetActiveSubroutineName(GPGETACTIVESUBROUTINENAME fnptr, GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei * length, GLchar * name) { +// (*fnptr)(program, shadertype, index, bufsize, length, name); +// } +// static void glowGetActiveSubroutineUniformName(GPGETACTIVESUBROUTINEUNIFORMNAME fnptr, GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei * length, GLchar * name) { +// (*fnptr)(program, shadertype, index, bufsize, length, name); +// } +// static void glowGetActiveSubroutineUniformiv(GPGETACTIVESUBROUTINEUNIFORMIV fnptr, GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint * values) { +// (*fnptr)(program, shadertype, index, pname, values); +// } +// static void glowGetActiveUniform(GPGETACTIVEUNIFORM fnptr, GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name) { +// (*fnptr)(program, index, bufSize, length, size, type, name); +// } +// static void glowGetActiveUniformBlockName(GPGETACTIVEUNIFORMBLOCKNAME fnptr, GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei * length, GLchar * uniformBlockName) { +// (*fnptr)(program, uniformBlockIndex, bufSize, length, uniformBlockName); +// } +// static void glowGetActiveUniformBlockiv(GPGETACTIVEUNIFORMBLOCKIV fnptr, GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint * params) { +// (*fnptr)(program, uniformBlockIndex, pname, params); +// } +// static void glowGetActiveUniformName(GPGETACTIVEUNIFORMNAME fnptr, GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei * length, GLchar * uniformName) { +// (*fnptr)(program, uniformIndex, bufSize, length, uniformName); +// } +// static void glowGetActiveUniformsiv(GPGETACTIVEUNIFORMSIV fnptr, GLuint program, GLsizei uniformCount, const GLuint * uniformIndices, GLenum pname, GLint * params) { +// (*fnptr)(program, uniformCount, uniformIndices, pname, params); +// } +// static void glowGetAttachedShaders(GPGETATTACHEDSHADERS fnptr, GLuint program, GLsizei maxCount, GLsizei * count, GLuint * shaders) { +// (*fnptr)(program, maxCount, count, shaders); +// } +// static GLint glowGetAttribLocation(GPGETATTRIBLOCATION fnptr, GLuint program, const GLchar * name) { +// return (*fnptr)(program, name); +// } +// static void glowGetBooleanIndexedvEXT(GPGETBOOLEANINDEXEDVEXT fnptr, GLenum target, GLuint index, GLboolean * data) { +// (*fnptr)(target, index, data); +// } +// static void glowGetBooleani_v(GPGETBOOLEANI_V fnptr, GLenum target, GLuint index, GLboolean * data) { +// (*fnptr)(target, index, data); +// } +// static void glowGetBooleanv(GPGETBOOLEANV fnptr, GLenum pname, GLboolean * data) { +// (*fnptr)(pname, data); +// } +// static void glowGetBufferParameteri64v(GPGETBUFFERPARAMETERI64V fnptr, GLenum target, GLenum pname, GLint64 * params) { +// (*fnptr)(target, pname, params); +// } +// static void glowGetBufferParameteriv(GPGETBUFFERPARAMETERIV fnptr, GLenum target, GLenum pname, GLint * params) { +// (*fnptr)(target, pname, params); +// } +// static void glowGetBufferParameterui64vNV(GPGETBUFFERPARAMETERUI64VNV fnptr, GLenum target, GLenum pname, GLuint64EXT * params) { +// (*fnptr)(target, pname, params); +// } +// static void glowGetBufferPointerv(GPGETBUFFERPOINTERV fnptr, GLenum target, GLenum pname, void ** params) { +// (*fnptr)(target, pname, params); +// } +// static void glowGetBufferSubData(GPGETBUFFERSUBDATA fnptr, GLenum target, GLintptr offset, GLsizeiptr size, void * data) { +// (*fnptr)(target, offset, size, data); +// } +// static GLuint glowGetCommandHeaderNV(GPGETCOMMANDHEADERNV fnptr, GLenum tokenID, GLuint size) { +// return (*fnptr)(tokenID, size); +// } +// static void glowGetCompressedMultiTexImageEXT(GPGETCOMPRESSEDMULTITEXIMAGEEXT fnptr, GLenum texunit, GLenum target, GLint lod, void * img) { +// (*fnptr)(texunit, target, lod, img); +// } +// static void glowGetCompressedTexImage(GPGETCOMPRESSEDTEXIMAGE fnptr, GLenum target, GLint level, void * img) { +// (*fnptr)(target, level, img); +// } +// static void glowGetCompressedTextureImage(GPGETCOMPRESSEDTEXTUREIMAGE fnptr, GLuint texture, GLint level, GLsizei bufSize, void * pixels) { +// (*fnptr)(texture, level, bufSize, pixels); +// } +// static void glowGetCompressedTextureImageEXT(GPGETCOMPRESSEDTEXTUREIMAGEEXT fnptr, GLuint texture, GLenum target, GLint lod, void * img) { +// (*fnptr)(texture, target, lod, img); +// } +// static void glowGetCompressedTextureSubImage(GPGETCOMPRESSEDTEXTURESUBIMAGE fnptr, GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void * pixels) { +// (*fnptr)(texture, level, xoffset, yoffset, zoffset, width, height, depth, bufSize, pixels); +// } +// static void glowGetCoverageModulationTableNV(GPGETCOVERAGEMODULATIONTABLENV fnptr, GLsizei bufsize, GLfloat * v) { +// (*fnptr)(bufsize, v); +// } +// static GLuint glowGetDebugMessageLog(GPGETDEBUGMESSAGELOG fnptr, GLuint count, GLsizei bufSize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog) { +// return (*fnptr)(count, bufSize, sources, types, ids, severities, lengths, messageLog); +// } +// static GLuint glowGetDebugMessageLogARB(GPGETDEBUGMESSAGELOGARB fnptr, GLuint count, GLsizei bufSize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog) { +// return (*fnptr)(count, bufSize, sources, types, ids, severities, lengths, messageLog); +// } +// static GLuint glowGetDebugMessageLogKHR(GPGETDEBUGMESSAGELOGKHR fnptr, GLuint count, GLsizei bufSize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog) { +// return (*fnptr)(count, bufSize, sources, types, ids, severities, lengths, messageLog); +// } +// static void glowGetDoubleIndexedvEXT(GPGETDOUBLEINDEXEDVEXT fnptr, GLenum target, GLuint index, GLdouble * data) { +// (*fnptr)(target, index, data); +// } +// static void glowGetDoublei_v(GPGETDOUBLEI_V fnptr, GLenum target, GLuint index, GLdouble * data) { +// (*fnptr)(target, index, data); +// } +// static void glowGetDoublei_vEXT(GPGETDOUBLEI_VEXT fnptr, GLenum pname, GLuint index, GLdouble * params) { +// (*fnptr)(pname, index, params); +// } +// static void glowGetDoublev(GPGETDOUBLEV fnptr, GLenum pname, GLdouble * data) { +// (*fnptr)(pname, data); +// } +// static GLenum glowGetError(GPGETERROR fnptr) { +// return (*fnptr)(); +// } +// static void glowGetFirstPerfQueryIdINTEL(GPGETFIRSTPERFQUERYIDINTEL fnptr, GLuint * queryId) { +// (*fnptr)(queryId); +// } +// static void glowGetFloatIndexedvEXT(GPGETFLOATINDEXEDVEXT fnptr, GLenum target, GLuint index, GLfloat * data) { +// (*fnptr)(target, index, data); +// } +// static void glowGetFloati_v(GPGETFLOATI_V fnptr, GLenum target, GLuint index, GLfloat * data) { +// (*fnptr)(target, index, data); +// } +// static void glowGetFloati_vEXT(GPGETFLOATI_VEXT fnptr, GLenum pname, GLuint index, GLfloat * params) { +// (*fnptr)(pname, index, params); +// } +// static void glowGetFloatv(GPGETFLOATV fnptr, GLenum pname, GLfloat * data) { +// (*fnptr)(pname, data); +// } +// static GLint glowGetFragDataIndex(GPGETFRAGDATAINDEX fnptr, GLuint program, const GLchar * name) { +// return (*fnptr)(program, name); +// } +// static GLint glowGetFragDataLocation(GPGETFRAGDATALOCATION fnptr, GLuint program, const GLchar * name) { +// return (*fnptr)(program, name); +// } +// static void glowGetFramebufferAttachmentParameteriv(GPGETFRAMEBUFFERATTACHMENTPARAMETERIV fnptr, GLenum target, GLenum attachment, GLenum pname, GLint * params) { +// (*fnptr)(target, attachment, pname, params); +// } +// static void glowGetFramebufferParameteriv(GPGETFRAMEBUFFERPARAMETERIV fnptr, GLenum target, GLenum pname, GLint * params) { +// (*fnptr)(target, pname, params); +// } +// static void glowGetFramebufferParameterivEXT(GPGETFRAMEBUFFERPARAMETERIVEXT fnptr, GLuint framebuffer, GLenum pname, GLint * params) { +// (*fnptr)(framebuffer, pname, params); +// } +// static GLenum glowGetGraphicsResetStatus(GPGETGRAPHICSRESETSTATUS fnptr) { +// return (*fnptr)(); +// } +// static GLenum glowGetGraphicsResetStatusARB(GPGETGRAPHICSRESETSTATUSARB fnptr) { +// return (*fnptr)(); +// } +// static GLenum glowGetGraphicsResetStatusKHR(GPGETGRAPHICSRESETSTATUSKHR fnptr) { +// return (*fnptr)(); +// } +// static GLuint64 glowGetImageHandleARB(GPGETIMAGEHANDLEARB fnptr, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format) { +// return (*fnptr)(texture, level, layered, layer, format); +// } +// static GLuint64 glowGetImageHandleNV(GPGETIMAGEHANDLENV fnptr, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format) { +// return (*fnptr)(texture, level, layered, layer, format); +// } +// static void glowGetInteger64i_v(GPGETINTEGER64I_V fnptr, GLenum target, GLuint index, GLint64 * data) { +// (*fnptr)(target, index, data); +// } +// static void glowGetInteger64v(GPGETINTEGER64V fnptr, GLenum pname, GLint64 * data) { +// (*fnptr)(pname, data); +// } +// static void glowGetIntegerIndexedvEXT(GPGETINTEGERINDEXEDVEXT fnptr, GLenum target, GLuint index, GLint * data) { +// (*fnptr)(target, index, data); +// } +// static void glowGetIntegeri_v(GPGETINTEGERI_V fnptr, GLenum target, GLuint index, GLint * data) { +// (*fnptr)(target, index, data); +// } +// static void glowGetIntegerui64i_vNV(GPGETINTEGERUI64I_VNV fnptr, GLenum value, GLuint index, GLuint64EXT * result) { +// (*fnptr)(value, index, result); +// } +// static void glowGetIntegerui64vNV(GPGETINTEGERUI64VNV fnptr, GLenum value, GLuint64EXT * result) { +// (*fnptr)(value, result); +// } +// static void glowGetIntegerv(GPGETINTEGERV fnptr, GLenum pname, GLint * data) { +// (*fnptr)(pname, data); +// } +// static void glowGetInternalformatSampleivNV(GPGETINTERNALFORMATSAMPLEIVNV fnptr, GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei bufSize, GLint * params) { +// (*fnptr)(target, internalformat, samples, pname, bufSize, params); +// } +// static void glowGetInternalformati64v(GPGETINTERNALFORMATI64V fnptr, GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 * params) { +// (*fnptr)(target, internalformat, pname, bufSize, params); +// } +// static void glowGetInternalformativ(GPGETINTERNALFORMATIV fnptr, GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint * params) { +// (*fnptr)(target, internalformat, pname, bufSize, params); +// } +// static void glowGetMultiTexEnvfvEXT(GPGETMULTITEXENVFVEXT fnptr, GLenum texunit, GLenum target, GLenum pname, GLfloat * params) { +// (*fnptr)(texunit, target, pname, params); +// } +// static void glowGetMultiTexEnvivEXT(GPGETMULTITEXENVIVEXT fnptr, GLenum texunit, GLenum target, GLenum pname, GLint * params) { +// (*fnptr)(texunit, target, pname, params); +// } +// static void glowGetMultiTexGendvEXT(GPGETMULTITEXGENDVEXT fnptr, GLenum texunit, GLenum coord, GLenum pname, GLdouble * params) { +// (*fnptr)(texunit, coord, pname, params); +// } +// static void glowGetMultiTexGenfvEXT(GPGETMULTITEXGENFVEXT fnptr, GLenum texunit, GLenum coord, GLenum pname, GLfloat * params) { +// (*fnptr)(texunit, coord, pname, params); +// } +// static void glowGetMultiTexGenivEXT(GPGETMULTITEXGENIVEXT fnptr, GLenum texunit, GLenum coord, GLenum pname, GLint * params) { +// (*fnptr)(texunit, coord, pname, params); +// } +// static void glowGetMultiTexImageEXT(GPGETMULTITEXIMAGEEXT fnptr, GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void * pixels) { +// (*fnptr)(texunit, target, level, format, type, pixels); +// } +// static void glowGetMultiTexLevelParameterfvEXT(GPGETMULTITEXLEVELPARAMETERFVEXT fnptr, GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat * params) { +// (*fnptr)(texunit, target, level, pname, params); +// } +// static void glowGetMultiTexLevelParameterivEXT(GPGETMULTITEXLEVELPARAMETERIVEXT fnptr, GLenum texunit, GLenum target, GLint level, GLenum pname, GLint * params) { +// (*fnptr)(texunit, target, level, pname, params); +// } +// static void glowGetMultiTexParameterIivEXT(GPGETMULTITEXPARAMETERIIVEXT fnptr, GLenum texunit, GLenum target, GLenum pname, GLint * params) { +// (*fnptr)(texunit, target, pname, params); +// } +// static void glowGetMultiTexParameterIuivEXT(GPGETMULTITEXPARAMETERIUIVEXT fnptr, GLenum texunit, GLenum target, GLenum pname, GLuint * params) { +// (*fnptr)(texunit, target, pname, params); +// } +// static void glowGetMultiTexParameterfvEXT(GPGETMULTITEXPARAMETERFVEXT fnptr, GLenum texunit, GLenum target, GLenum pname, GLfloat * params) { +// (*fnptr)(texunit, target, pname, params); +// } +// static void glowGetMultiTexParameterivEXT(GPGETMULTITEXPARAMETERIVEXT fnptr, GLenum texunit, GLenum target, GLenum pname, GLint * params) { +// (*fnptr)(texunit, target, pname, params); +// } +// static void glowGetMultisamplefv(GPGETMULTISAMPLEFV fnptr, GLenum pname, GLuint index, GLfloat * val) { +// (*fnptr)(pname, index, val); +// } +// static void glowGetNamedBufferParameteri64v(GPGETNAMEDBUFFERPARAMETERI64V fnptr, GLuint buffer, GLenum pname, GLint64 * params) { +// (*fnptr)(buffer, pname, params); +// } +// static void glowGetNamedBufferParameteriv(GPGETNAMEDBUFFERPARAMETERIV fnptr, GLuint buffer, GLenum pname, GLint * params) { +// (*fnptr)(buffer, pname, params); +// } +// static void glowGetNamedBufferParameterivEXT(GPGETNAMEDBUFFERPARAMETERIVEXT fnptr, GLuint buffer, GLenum pname, GLint * params) { +// (*fnptr)(buffer, pname, params); +// } +// static void glowGetNamedBufferParameterui64vNV(GPGETNAMEDBUFFERPARAMETERUI64VNV fnptr, GLuint buffer, GLenum pname, GLuint64EXT * params) { +// (*fnptr)(buffer, pname, params); +// } +// static void glowGetNamedBufferPointerv(GPGETNAMEDBUFFERPOINTERV fnptr, GLuint buffer, GLenum pname, void ** params) { +// (*fnptr)(buffer, pname, params); +// } +// static void glowGetNamedBufferPointervEXT(GPGETNAMEDBUFFERPOINTERVEXT fnptr, GLuint buffer, GLenum pname, void ** params) { +// (*fnptr)(buffer, pname, params); +// } +// static void glowGetNamedBufferSubData(GPGETNAMEDBUFFERSUBDATA fnptr, GLuint buffer, GLintptr offset, GLsizeiptr size, void * data) { +// (*fnptr)(buffer, offset, size, data); +// } +// static void glowGetNamedBufferSubDataEXT(GPGETNAMEDBUFFERSUBDATAEXT fnptr, GLuint buffer, GLintptr offset, GLsizeiptr size, void * data) { +// (*fnptr)(buffer, offset, size, data); +// } +// static void glowGetNamedFramebufferAttachmentParameteriv(GPGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIV fnptr, GLuint framebuffer, GLenum attachment, GLenum pname, GLint * params) { +// (*fnptr)(framebuffer, attachment, pname, params); +// } +// static void glowGetNamedFramebufferAttachmentParameterivEXT(GPGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXT fnptr, GLuint framebuffer, GLenum attachment, GLenum pname, GLint * params) { +// (*fnptr)(framebuffer, attachment, pname, params); +// } +// static void glowGetNamedFramebufferParameteriv(GPGETNAMEDFRAMEBUFFERPARAMETERIV fnptr, GLuint framebuffer, GLenum pname, GLint * param) { +// (*fnptr)(framebuffer, pname, param); +// } +// static void glowGetNamedFramebufferParameterivEXT(GPGETNAMEDFRAMEBUFFERPARAMETERIVEXT fnptr, GLuint framebuffer, GLenum pname, GLint * params) { +// (*fnptr)(framebuffer, pname, params); +// } +// static void glowGetNamedProgramLocalParameterIivEXT(GPGETNAMEDPROGRAMLOCALPARAMETERIIVEXT fnptr, GLuint program, GLenum target, GLuint index, GLint * params) { +// (*fnptr)(program, target, index, params); +// } +// static void glowGetNamedProgramLocalParameterIuivEXT(GPGETNAMEDPROGRAMLOCALPARAMETERIUIVEXT fnptr, GLuint program, GLenum target, GLuint index, GLuint * params) { +// (*fnptr)(program, target, index, params); +// } +// static void glowGetNamedProgramLocalParameterdvEXT(GPGETNAMEDPROGRAMLOCALPARAMETERDVEXT fnptr, GLuint program, GLenum target, GLuint index, GLdouble * params) { +// (*fnptr)(program, target, index, params); +// } +// static void glowGetNamedProgramLocalParameterfvEXT(GPGETNAMEDPROGRAMLOCALPARAMETERFVEXT fnptr, GLuint program, GLenum target, GLuint index, GLfloat * params) { +// (*fnptr)(program, target, index, params); +// } +// static void glowGetNamedProgramStringEXT(GPGETNAMEDPROGRAMSTRINGEXT fnptr, GLuint program, GLenum target, GLenum pname, void * string) { +// (*fnptr)(program, target, pname, string); +// } +// static void glowGetNamedProgramivEXT(GPGETNAMEDPROGRAMIVEXT fnptr, GLuint program, GLenum target, GLenum pname, GLint * params) { +// (*fnptr)(program, target, pname, params); +// } +// static void glowGetNamedRenderbufferParameteriv(GPGETNAMEDRENDERBUFFERPARAMETERIV fnptr, GLuint renderbuffer, GLenum pname, GLint * params) { +// (*fnptr)(renderbuffer, pname, params); +// } +// static void glowGetNamedRenderbufferParameterivEXT(GPGETNAMEDRENDERBUFFERPARAMETERIVEXT fnptr, GLuint renderbuffer, GLenum pname, GLint * params) { +// (*fnptr)(renderbuffer, pname, params); +// } +// static void glowGetNamedStringARB(GPGETNAMEDSTRINGARB fnptr, GLint namelen, const GLchar * name, GLsizei bufSize, GLint * stringlen, GLchar * string) { +// (*fnptr)(namelen, name, bufSize, stringlen, string); +// } +// static void glowGetNamedStringivARB(GPGETNAMEDSTRINGIVARB fnptr, GLint namelen, const GLchar * name, GLenum pname, GLint * params) { +// (*fnptr)(namelen, name, pname, params); +// } +// static void glowGetNextPerfQueryIdINTEL(GPGETNEXTPERFQUERYIDINTEL fnptr, GLuint queryId, GLuint * nextQueryId) { +// (*fnptr)(queryId, nextQueryId); +// } +// static void glowGetObjectLabel(GPGETOBJECTLABEL fnptr, GLenum identifier, GLuint name, GLsizei bufSize, GLsizei * length, GLchar * label) { +// (*fnptr)(identifier, name, bufSize, length, label); +// } +// static void glowGetObjectLabelEXT(GPGETOBJECTLABELEXT fnptr, GLenum type, GLuint object, GLsizei bufSize, GLsizei * length, GLchar * label) { +// (*fnptr)(type, object, bufSize, length, label); +// } +// static void glowGetObjectLabelKHR(GPGETOBJECTLABELKHR fnptr, GLenum identifier, GLuint name, GLsizei bufSize, GLsizei * length, GLchar * label) { +// (*fnptr)(identifier, name, bufSize, length, label); +// } +// static void glowGetObjectPtrLabel(GPGETOBJECTPTRLABEL fnptr, const void * ptr, GLsizei bufSize, GLsizei * length, GLchar * label) { +// (*fnptr)(ptr, bufSize, length, label); +// } +// static void glowGetObjectPtrLabelKHR(GPGETOBJECTPTRLABELKHR fnptr, const void * ptr, GLsizei bufSize, GLsizei * length, GLchar * label) { +// (*fnptr)(ptr, bufSize, length, label); +// } +// static void glowGetPathCommandsNV(GPGETPATHCOMMANDSNV fnptr, GLuint path, GLubyte * commands) { +// (*fnptr)(path, commands); +// } +// static void glowGetPathCoordsNV(GPGETPATHCOORDSNV fnptr, GLuint path, GLfloat * coords) { +// (*fnptr)(path, coords); +// } +// static void glowGetPathDashArrayNV(GPGETPATHDASHARRAYNV fnptr, GLuint path, GLfloat * dashArray) { +// (*fnptr)(path, dashArray); +// } +// static GLfloat glowGetPathLengthNV(GPGETPATHLENGTHNV fnptr, GLuint path, GLsizei startSegment, GLsizei numSegments) { +// return (*fnptr)(path, startSegment, numSegments); +// } +// static void glowGetPathMetricRangeNV(GPGETPATHMETRICRANGENV fnptr, GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat * metrics) { +// (*fnptr)(metricQueryMask, firstPathName, numPaths, stride, metrics); +// } +// static void glowGetPathMetricsNV(GPGETPATHMETRICSNV fnptr, GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void * paths, GLuint pathBase, GLsizei stride, GLfloat * metrics) { +// (*fnptr)(metricQueryMask, numPaths, pathNameType, paths, pathBase, stride, metrics); +// } +// static void glowGetPathParameterfvNV(GPGETPATHPARAMETERFVNV fnptr, GLuint path, GLenum pname, GLfloat * value) { +// (*fnptr)(path, pname, value); +// } +// static void glowGetPathParameterivNV(GPGETPATHPARAMETERIVNV fnptr, GLuint path, GLenum pname, GLint * value) { +// (*fnptr)(path, pname, value); +// } +// static void glowGetPathSpacingNV(GPGETPATHSPACINGNV fnptr, GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void * paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat * returnedSpacing) { +// (*fnptr)(pathListMode, numPaths, pathNameType, paths, pathBase, advanceScale, kerningScale, transformType, returnedSpacing); +// } +// static void glowGetPerfCounterInfoINTEL(GPGETPERFCOUNTERINFOINTEL fnptr, GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar * counterName, GLuint counterDescLength, GLchar * counterDesc, GLuint * counterOffset, GLuint * counterDataSize, GLuint * counterTypeEnum, GLuint * counterDataTypeEnum, GLuint64 * rawCounterMaxValue) { +// (*fnptr)(queryId, counterId, counterNameLength, counterName, counterDescLength, counterDesc, counterOffset, counterDataSize, counterTypeEnum, counterDataTypeEnum, rawCounterMaxValue); +// } +// static void glowGetPerfMonitorCounterDataAMD(GPGETPERFMONITORCOUNTERDATAAMD fnptr, GLuint monitor, GLenum pname, GLsizei dataSize, GLuint * data, GLint * bytesWritten) { +// (*fnptr)(monitor, pname, dataSize, data, bytesWritten); +// } +// static void glowGetPerfMonitorCounterInfoAMD(GPGETPERFMONITORCOUNTERINFOAMD fnptr, GLuint group, GLuint counter, GLenum pname, void * data) { +// (*fnptr)(group, counter, pname, data); +// } +// static void glowGetPerfMonitorCounterStringAMD(GPGETPERFMONITORCOUNTERSTRINGAMD fnptr, GLuint group, GLuint counter, GLsizei bufSize, GLsizei * length, GLchar * counterString) { +// (*fnptr)(group, counter, bufSize, length, counterString); +// } +// static void glowGetPerfMonitorCountersAMD(GPGETPERFMONITORCOUNTERSAMD fnptr, GLuint group, GLint * numCounters, GLint * maxActiveCounters, GLsizei counterSize, GLuint * counters) { +// (*fnptr)(group, numCounters, maxActiveCounters, counterSize, counters); +// } +// static void glowGetPerfMonitorGroupStringAMD(GPGETPERFMONITORGROUPSTRINGAMD fnptr, GLuint group, GLsizei bufSize, GLsizei * length, GLchar * groupString) { +// (*fnptr)(group, bufSize, length, groupString); +// } +// static void glowGetPerfMonitorGroupsAMD(GPGETPERFMONITORGROUPSAMD fnptr, GLint * numGroups, GLsizei groupsSize, GLuint * groups) { +// (*fnptr)(numGroups, groupsSize, groups); +// } +// static void glowGetPerfQueryDataINTEL(GPGETPERFQUERYDATAINTEL fnptr, GLuint queryHandle, GLuint flags, GLsizei dataSize, void * data, GLuint * bytesWritten) { +// (*fnptr)(queryHandle, flags, dataSize, data, bytesWritten); +// } +// static void glowGetPerfQueryIdByNameINTEL(GPGETPERFQUERYIDBYNAMEINTEL fnptr, GLchar * queryName, GLuint * queryId) { +// (*fnptr)(queryName, queryId); +// } +// static void glowGetPerfQueryInfoINTEL(GPGETPERFQUERYINFOINTEL fnptr, GLuint queryId, GLuint queryNameLength, GLchar * queryName, GLuint * dataSize, GLuint * noCounters, GLuint * noInstances, GLuint * capsMask) { +// (*fnptr)(queryId, queryNameLength, queryName, dataSize, noCounters, noInstances, capsMask); +// } +// static void glowGetPointerIndexedvEXT(GPGETPOINTERINDEXEDVEXT fnptr, GLenum target, GLuint index, void ** data) { +// (*fnptr)(target, index, data); +// } +// static void glowGetPointeri_vEXT(GPGETPOINTERI_VEXT fnptr, GLenum pname, GLuint index, void ** params) { +// (*fnptr)(pname, index, params); +// } +// static void glowGetPointerv(GPGETPOINTERV fnptr, GLenum pname, void ** params) { +// (*fnptr)(pname, params); +// } +// static void glowGetPointervKHR(GPGETPOINTERVKHR fnptr, GLenum pname, void ** params) { +// (*fnptr)(pname, params); +// } +// static void glowGetProgramBinary(GPGETPROGRAMBINARY fnptr, GLuint program, GLsizei bufSize, GLsizei * length, GLenum * binaryFormat, void * binary) { +// (*fnptr)(program, bufSize, length, binaryFormat, binary); +// } +// static void glowGetProgramInfoLog(GPGETPROGRAMINFOLOG fnptr, GLuint program, GLsizei bufSize, GLsizei * length, GLchar * infoLog) { +// (*fnptr)(program, bufSize, length, infoLog); +// } +// static void glowGetProgramInterfaceiv(GPGETPROGRAMINTERFACEIV fnptr, GLuint program, GLenum programInterface, GLenum pname, GLint * params) { +// (*fnptr)(program, programInterface, pname, params); +// } +// static void glowGetProgramPipelineInfoLog(GPGETPROGRAMPIPELINEINFOLOG fnptr, GLuint pipeline, GLsizei bufSize, GLsizei * length, GLchar * infoLog) { +// (*fnptr)(pipeline, bufSize, length, infoLog); +// } +// static void glowGetProgramPipelineInfoLogEXT(GPGETPROGRAMPIPELINEINFOLOGEXT fnptr, GLuint pipeline, GLsizei bufSize, GLsizei * length, GLchar * infoLog) { +// (*fnptr)(pipeline, bufSize, length, infoLog); +// } +// static void glowGetProgramPipelineiv(GPGETPROGRAMPIPELINEIV fnptr, GLuint pipeline, GLenum pname, GLint * params) { +// (*fnptr)(pipeline, pname, params); +// } +// static void glowGetProgramPipelineivEXT(GPGETPROGRAMPIPELINEIVEXT fnptr, GLuint pipeline, GLenum pname, GLint * params) { +// (*fnptr)(pipeline, pname, params); +// } +// static GLuint glowGetProgramResourceIndex(GPGETPROGRAMRESOURCEINDEX fnptr, GLuint program, GLenum programInterface, const GLchar * name) { +// return (*fnptr)(program, programInterface, name); +// } +// static GLint glowGetProgramResourceLocation(GPGETPROGRAMRESOURCELOCATION fnptr, GLuint program, GLenum programInterface, const GLchar * name) { +// return (*fnptr)(program, programInterface, name); +// } +// static GLint glowGetProgramResourceLocationIndex(GPGETPROGRAMRESOURCELOCATIONINDEX fnptr, GLuint program, GLenum programInterface, const GLchar * name) { +// return (*fnptr)(program, programInterface, name); +// } +// static void glowGetProgramResourceName(GPGETPROGRAMRESOURCENAME fnptr, GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei * length, GLchar * name) { +// (*fnptr)(program, programInterface, index, bufSize, length, name); +// } +// static void glowGetProgramResourcefvNV(GPGETPROGRAMRESOURCEFVNV fnptr, GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum * props, GLsizei bufSize, GLsizei * length, GLfloat * params) { +// (*fnptr)(program, programInterface, index, propCount, props, bufSize, length, params); +// } +// static void glowGetProgramResourceiv(GPGETPROGRAMRESOURCEIV fnptr, GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum * props, GLsizei bufSize, GLsizei * length, GLint * params) { +// (*fnptr)(program, programInterface, index, propCount, props, bufSize, length, params); +// } +// static void glowGetProgramStageiv(GPGETPROGRAMSTAGEIV fnptr, GLuint program, GLenum shadertype, GLenum pname, GLint * values) { +// (*fnptr)(program, shadertype, pname, values); +// } +// static void glowGetProgramiv(GPGETPROGRAMIV fnptr, GLuint program, GLenum pname, GLint * params) { +// (*fnptr)(program, pname, params); +// } +// static void glowGetQueryBufferObjecti64v(GPGETQUERYBUFFEROBJECTI64V fnptr, GLuint id, GLuint buffer, GLenum pname, GLintptr offset) { +// (*fnptr)(id, buffer, pname, offset); +// } +// static void glowGetQueryBufferObjectiv(GPGETQUERYBUFFEROBJECTIV fnptr, GLuint id, GLuint buffer, GLenum pname, GLintptr offset) { +// (*fnptr)(id, buffer, pname, offset); +// } +// static void glowGetQueryBufferObjectui64v(GPGETQUERYBUFFEROBJECTUI64V fnptr, GLuint id, GLuint buffer, GLenum pname, GLintptr offset) { +// (*fnptr)(id, buffer, pname, offset); +// } +// static void glowGetQueryBufferObjectuiv(GPGETQUERYBUFFEROBJECTUIV fnptr, GLuint id, GLuint buffer, GLenum pname, GLintptr offset) { +// (*fnptr)(id, buffer, pname, offset); +// } +// static void glowGetQueryIndexediv(GPGETQUERYINDEXEDIV fnptr, GLenum target, GLuint index, GLenum pname, GLint * params) { +// (*fnptr)(target, index, pname, params); +// } +// static void glowGetQueryObjecti64v(GPGETQUERYOBJECTI64V fnptr, GLuint id, GLenum pname, GLint64 * params) { +// (*fnptr)(id, pname, params); +// } +// static void glowGetQueryObjectiv(GPGETQUERYOBJECTIV fnptr, GLuint id, GLenum pname, GLint * params) { +// (*fnptr)(id, pname, params); +// } +// static void glowGetQueryObjectui64v(GPGETQUERYOBJECTUI64V fnptr, GLuint id, GLenum pname, GLuint64 * params) { +// (*fnptr)(id, pname, params); +// } +// static void glowGetQueryObjectuiv(GPGETQUERYOBJECTUIV fnptr, GLuint id, GLenum pname, GLuint * params) { +// (*fnptr)(id, pname, params); +// } +// static void glowGetQueryiv(GPGETQUERYIV fnptr, GLenum target, GLenum pname, GLint * params) { +// (*fnptr)(target, pname, params); +// } +// static void glowGetRenderbufferParameteriv(GPGETRENDERBUFFERPARAMETERIV fnptr, GLenum target, GLenum pname, GLint * params) { +// (*fnptr)(target, pname, params); +// } +// static void glowGetSamplerParameterIiv(GPGETSAMPLERPARAMETERIIV fnptr, GLuint sampler, GLenum pname, GLint * params) { +// (*fnptr)(sampler, pname, params); +// } +// static void glowGetSamplerParameterIuiv(GPGETSAMPLERPARAMETERIUIV fnptr, GLuint sampler, GLenum pname, GLuint * params) { +// (*fnptr)(sampler, pname, params); +// } +// static void glowGetSamplerParameterfv(GPGETSAMPLERPARAMETERFV fnptr, GLuint sampler, GLenum pname, GLfloat * params) { +// (*fnptr)(sampler, pname, params); +// } +// static void glowGetSamplerParameteriv(GPGETSAMPLERPARAMETERIV fnptr, GLuint sampler, GLenum pname, GLint * params) { +// (*fnptr)(sampler, pname, params); +// } +// static void glowGetShaderInfoLog(GPGETSHADERINFOLOG fnptr, GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * infoLog) { +// (*fnptr)(shader, bufSize, length, infoLog); +// } +// static void glowGetShaderPrecisionFormat(GPGETSHADERPRECISIONFORMAT fnptr, GLenum shadertype, GLenum precisiontype, GLint * range, GLint * precision) { +// (*fnptr)(shadertype, precisiontype, range, precision); +// } +// static void glowGetShaderSource(GPGETSHADERSOURCE fnptr, GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * source) { +// (*fnptr)(shader, bufSize, length, source); +// } +// static void glowGetShaderiv(GPGETSHADERIV fnptr, GLuint shader, GLenum pname, GLint * params) { +// (*fnptr)(shader, pname, params); +// } +// static GLushort glowGetStageIndexNV(GPGETSTAGEINDEXNV fnptr, GLenum shadertype) { +// return (*fnptr)(shadertype); +// } +// static const GLubyte * glowGetString(GPGETSTRING fnptr, GLenum name) { +// return (*fnptr)(name); +// } +// static const GLubyte * glowGetStringi(GPGETSTRINGI fnptr, GLenum name, GLuint index) { +// return (*fnptr)(name, index); +// } +// static GLuint glowGetSubroutineIndex(GPGETSUBROUTINEINDEX fnptr, GLuint program, GLenum shadertype, const GLchar * name) { +// return (*fnptr)(program, shadertype, name); +// } +// static GLint glowGetSubroutineUniformLocation(GPGETSUBROUTINEUNIFORMLOCATION fnptr, GLuint program, GLenum shadertype, const GLchar * name) { +// return (*fnptr)(program, shadertype, name); +// } +// static void glowGetSynciv(GPGETSYNCIV fnptr, GLsync sync, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * values) { +// (*fnptr)(sync, pname, bufSize, length, values); +// } +// static void glowGetTexImage(GPGETTEXIMAGE fnptr, GLenum target, GLint level, GLenum format, GLenum type, void * pixels) { +// (*fnptr)(target, level, format, type, pixels); +// } +// static void glowGetTexLevelParameterfv(GPGETTEXLEVELPARAMETERFV fnptr, GLenum target, GLint level, GLenum pname, GLfloat * params) { +// (*fnptr)(target, level, pname, params); +// } +// static void glowGetTexLevelParameteriv(GPGETTEXLEVELPARAMETERIV fnptr, GLenum target, GLint level, GLenum pname, GLint * params) { +// (*fnptr)(target, level, pname, params); +// } +// static void glowGetTexParameterIiv(GPGETTEXPARAMETERIIV fnptr, GLenum target, GLenum pname, GLint * params) { +// (*fnptr)(target, pname, params); +// } +// static void glowGetTexParameterIuiv(GPGETTEXPARAMETERIUIV fnptr, GLenum target, GLenum pname, GLuint * params) { +// (*fnptr)(target, pname, params); +// } +// static void glowGetTexParameterfv(GPGETTEXPARAMETERFV fnptr, GLenum target, GLenum pname, GLfloat * params) { +// (*fnptr)(target, pname, params); +// } +// static void glowGetTexParameteriv(GPGETTEXPARAMETERIV fnptr, GLenum target, GLenum pname, GLint * params) { +// (*fnptr)(target, pname, params); +// } +// static GLuint64 glowGetTextureHandleARB(GPGETTEXTUREHANDLEARB fnptr, GLuint texture) { +// return (*fnptr)(texture); +// } +// static GLuint64 glowGetTextureHandleNV(GPGETTEXTUREHANDLENV fnptr, GLuint texture) { +// return (*fnptr)(texture); +// } +// static void glowGetTextureImage(GPGETTEXTUREIMAGE fnptr, GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void * pixels) { +// (*fnptr)(texture, level, format, type, bufSize, pixels); +// } +// static void glowGetTextureImageEXT(GPGETTEXTUREIMAGEEXT fnptr, GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void * pixels) { +// (*fnptr)(texture, target, level, format, type, pixels); +// } +// static void glowGetTextureLevelParameterfv(GPGETTEXTURELEVELPARAMETERFV fnptr, GLuint texture, GLint level, GLenum pname, GLfloat * params) { +// (*fnptr)(texture, level, pname, params); +// } +// static void glowGetTextureLevelParameterfvEXT(GPGETTEXTURELEVELPARAMETERFVEXT fnptr, GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat * params) { +// (*fnptr)(texture, target, level, pname, params); +// } +// static void glowGetTextureLevelParameteriv(GPGETTEXTURELEVELPARAMETERIV fnptr, GLuint texture, GLint level, GLenum pname, GLint * params) { +// (*fnptr)(texture, level, pname, params); +// } +// static void glowGetTextureLevelParameterivEXT(GPGETTEXTURELEVELPARAMETERIVEXT fnptr, GLuint texture, GLenum target, GLint level, GLenum pname, GLint * params) { +// (*fnptr)(texture, target, level, pname, params); +// } +// static void glowGetTextureParameterIiv(GPGETTEXTUREPARAMETERIIV fnptr, GLuint texture, GLenum pname, GLint * params) { +// (*fnptr)(texture, pname, params); +// } +// static void glowGetTextureParameterIivEXT(GPGETTEXTUREPARAMETERIIVEXT fnptr, GLuint texture, GLenum target, GLenum pname, GLint * params) { +// (*fnptr)(texture, target, pname, params); +// } +// static void glowGetTextureParameterIuiv(GPGETTEXTUREPARAMETERIUIV fnptr, GLuint texture, GLenum pname, GLuint * params) { +// (*fnptr)(texture, pname, params); +// } +// static void glowGetTextureParameterIuivEXT(GPGETTEXTUREPARAMETERIUIVEXT fnptr, GLuint texture, GLenum target, GLenum pname, GLuint * params) { +// (*fnptr)(texture, target, pname, params); +// } +// static void glowGetTextureParameterfv(GPGETTEXTUREPARAMETERFV fnptr, GLuint texture, GLenum pname, GLfloat * params) { +// (*fnptr)(texture, pname, params); +// } +// static void glowGetTextureParameterfvEXT(GPGETTEXTUREPARAMETERFVEXT fnptr, GLuint texture, GLenum target, GLenum pname, GLfloat * params) { +// (*fnptr)(texture, target, pname, params); +// } +// static void glowGetTextureParameteriv(GPGETTEXTUREPARAMETERIV fnptr, GLuint texture, GLenum pname, GLint * params) { +// (*fnptr)(texture, pname, params); +// } +// static void glowGetTextureParameterivEXT(GPGETTEXTUREPARAMETERIVEXT fnptr, GLuint texture, GLenum target, GLenum pname, GLint * params) { +// (*fnptr)(texture, target, pname, params); +// } +// static GLuint64 glowGetTextureSamplerHandleARB(GPGETTEXTURESAMPLERHANDLEARB fnptr, GLuint texture, GLuint sampler) { +// return (*fnptr)(texture, sampler); +// } +// static GLuint64 glowGetTextureSamplerHandleNV(GPGETTEXTURESAMPLERHANDLENV fnptr, GLuint texture, GLuint sampler) { +// return (*fnptr)(texture, sampler); +// } +// static void glowGetTextureSubImage(GPGETTEXTURESUBIMAGE fnptr, GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void * pixels) { +// (*fnptr)(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, bufSize, pixels); +// } +// static void glowGetTransformFeedbackVarying(GPGETTRANSFORMFEEDBACKVARYING fnptr, GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name) { +// (*fnptr)(program, index, bufSize, length, size, type, name); +// } +// static void glowGetTransformFeedbacki64_v(GPGETTRANSFORMFEEDBACKI64_V fnptr, GLuint xfb, GLenum pname, GLuint index, GLint64 * param) { +// (*fnptr)(xfb, pname, index, param); +// } +// static void glowGetTransformFeedbacki_v(GPGETTRANSFORMFEEDBACKI_V fnptr, GLuint xfb, GLenum pname, GLuint index, GLint * param) { +// (*fnptr)(xfb, pname, index, param); +// } +// static void glowGetTransformFeedbackiv(GPGETTRANSFORMFEEDBACKIV fnptr, GLuint xfb, GLenum pname, GLint * param) { +// (*fnptr)(xfb, pname, param); +// } +// static GLuint glowGetUniformBlockIndex(GPGETUNIFORMBLOCKINDEX fnptr, GLuint program, const GLchar * uniformBlockName) { +// return (*fnptr)(program, uniformBlockName); +// } +// static void glowGetUniformIndices(GPGETUNIFORMINDICES fnptr, GLuint program, GLsizei uniformCount, const GLchar *const* uniformNames, GLuint * uniformIndices) { +// (*fnptr)(program, uniformCount, uniformNames, uniformIndices); +// } +// static GLint glowGetUniformLocation(GPGETUNIFORMLOCATION fnptr, GLuint program, const GLchar * name) { +// return (*fnptr)(program, name); +// } +// static void glowGetUniformSubroutineuiv(GPGETUNIFORMSUBROUTINEUIV fnptr, GLenum shadertype, GLint location, GLuint * params) { +// (*fnptr)(shadertype, location, params); +// } +// static void glowGetUniformdv(GPGETUNIFORMDV fnptr, GLuint program, GLint location, GLdouble * params) { +// (*fnptr)(program, location, params); +// } +// static void glowGetUniformfv(GPGETUNIFORMFV fnptr, GLuint program, GLint location, GLfloat * params) { +// (*fnptr)(program, location, params); +// } +// static void glowGetUniformi64vARB(GPGETUNIFORMI64VARB fnptr, GLuint program, GLint location, GLint64 * params) { +// (*fnptr)(program, location, params); +// } +// static void glowGetUniformi64vNV(GPGETUNIFORMI64VNV fnptr, GLuint program, GLint location, GLint64EXT * params) { +// (*fnptr)(program, location, params); +// } +// static void glowGetUniformiv(GPGETUNIFORMIV fnptr, GLuint program, GLint location, GLint * params) { +// (*fnptr)(program, location, params); +// } +// static void glowGetUniformui64vARB(GPGETUNIFORMUI64VARB fnptr, GLuint program, GLint location, GLuint64 * params) { +// (*fnptr)(program, location, params); +// } +// static void glowGetUniformui64vNV(GPGETUNIFORMUI64VNV fnptr, GLuint program, GLint location, GLuint64EXT * params) { +// (*fnptr)(program, location, params); +// } +// static void glowGetUniformuiv(GPGETUNIFORMUIV fnptr, GLuint program, GLint location, GLuint * params) { +// (*fnptr)(program, location, params); +// } +// static void glowGetVertexArrayIndexed64iv(GPGETVERTEXARRAYINDEXED64IV fnptr, GLuint vaobj, GLuint index, GLenum pname, GLint64 * param) { +// (*fnptr)(vaobj, index, pname, param); +// } +// static void glowGetVertexArrayIndexediv(GPGETVERTEXARRAYINDEXEDIV fnptr, GLuint vaobj, GLuint index, GLenum pname, GLint * param) { +// (*fnptr)(vaobj, index, pname, param); +// } +// static void glowGetVertexArrayIntegeri_vEXT(GPGETVERTEXARRAYINTEGERI_VEXT fnptr, GLuint vaobj, GLuint index, GLenum pname, GLint * param) { +// (*fnptr)(vaobj, index, pname, param); +// } +// static void glowGetVertexArrayIntegervEXT(GPGETVERTEXARRAYINTEGERVEXT fnptr, GLuint vaobj, GLenum pname, GLint * param) { +// (*fnptr)(vaobj, pname, param); +// } +// static void glowGetVertexArrayPointeri_vEXT(GPGETVERTEXARRAYPOINTERI_VEXT fnptr, GLuint vaobj, GLuint index, GLenum pname, void ** param) { +// (*fnptr)(vaobj, index, pname, param); +// } +// static void glowGetVertexArrayPointervEXT(GPGETVERTEXARRAYPOINTERVEXT fnptr, GLuint vaobj, GLenum pname, void ** param) { +// (*fnptr)(vaobj, pname, param); +// } +// static void glowGetVertexArrayiv(GPGETVERTEXARRAYIV fnptr, GLuint vaobj, GLenum pname, GLint * param) { +// (*fnptr)(vaobj, pname, param); +// } +// static void glowGetVertexAttribIiv(GPGETVERTEXATTRIBIIV fnptr, GLuint index, GLenum pname, GLint * params) { +// (*fnptr)(index, pname, params); +// } +// static void glowGetVertexAttribIuiv(GPGETVERTEXATTRIBIUIV fnptr, GLuint index, GLenum pname, GLuint * params) { +// (*fnptr)(index, pname, params); +// } +// static void glowGetVertexAttribLdv(GPGETVERTEXATTRIBLDV fnptr, GLuint index, GLenum pname, GLdouble * params) { +// (*fnptr)(index, pname, params); +// } +// static void glowGetVertexAttribLi64vNV(GPGETVERTEXATTRIBLI64VNV fnptr, GLuint index, GLenum pname, GLint64EXT * params) { +// (*fnptr)(index, pname, params); +// } +// static void glowGetVertexAttribLui64vARB(GPGETVERTEXATTRIBLUI64VARB fnptr, GLuint index, GLenum pname, GLuint64EXT * params) { +// (*fnptr)(index, pname, params); +// } +// static void glowGetVertexAttribLui64vNV(GPGETVERTEXATTRIBLUI64VNV fnptr, GLuint index, GLenum pname, GLuint64EXT * params) { +// (*fnptr)(index, pname, params); +// } +// static void glowGetVertexAttribPointerv(GPGETVERTEXATTRIBPOINTERV fnptr, GLuint index, GLenum pname, void ** pointer) { +// (*fnptr)(index, pname, pointer); +// } +// static void glowGetVertexAttribdv(GPGETVERTEXATTRIBDV fnptr, GLuint index, GLenum pname, GLdouble * params) { +// (*fnptr)(index, pname, params); +// } +// static void glowGetVertexAttribfv(GPGETVERTEXATTRIBFV fnptr, GLuint index, GLenum pname, GLfloat * params) { +// (*fnptr)(index, pname, params); +// } +// static void glowGetVertexAttribiv(GPGETVERTEXATTRIBIV fnptr, GLuint index, GLenum pname, GLint * params) { +// (*fnptr)(index, pname, params); +// } +// static GLVULKANPROCNV glowGetVkProcAddrNV(GPGETVKPROCADDRNV fnptr, const GLchar * name) { +// return (*fnptr)(name); +// } +// static void glowGetnCompressedTexImageARB(GPGETNCOMPRESSEDTEXIMAGEARB fnptr, GLenum target, GLint lod, GLsizei bufSize, void * img) { +// (*fnptr)(target, lod, bufSize, img); +// } +// static void glowGetnTexImageARB(GPGETNTEXIMAGEARB fnptr, GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void * img) { +// (*fnptr)(target, level, format, type, bufSize, img); +// } +// static void glowGetnUniformdvARB(GPGETNUNIFORMDVARB fnptr, GLuint program, GLint location, GLsizei bufSize, GLdouble * params) { +// (*fnptr)(program, location, bufSize, params); +// } +// static void glowGetnUniformfv(GPGETNUNIFORMFV fnptr, GLuint program, GLint location, GLsizei bufSize, GLfloat * params) { +// (*fnptr)(program, location, bufSize, params); +// } +// static void glowGetnUniformfvARB(GPGETNUNIFORMFVARB fnptr, GLuint program, GLint location, GLsizei bufSize, GLfloat * params) { +// (*fnptr)(program, location, bufSize, params); +// } +// static void glowGetnUniformfvKHR(GPGETNUNIFORMFVKHR fnptr, GLuint program, GLint location, GLsizei bufSize, GLfloat * params) { +// (*fnptr)(program, location, bufSize, params); +// } +// static void glowGetnUniformi64vARB(GPGETNUNIFORMI64VARB fnptr, GLuint program, GLint location, GLsizei bufSize, GLint64 * params) { +// (*fnptr)(program, location, bufSize, params); +// } +// static void glowGetnUniformiv(GPGETNUNIFORMIV fnptr, GLuint program, GLint location, GLsizei bufSize, GLint * params) { +// (*fnptr)(program, location, bufSize, params); +// } +// static void glowGetnUniformivARB(GPGETNUNIFORMIVARB fnptr, GLuint program, GLint location, GLsizei bufSize, GLint * params) { +// (*fnptr)(program, location, bufSize, params); +// } +// static void glowGetnUniformivKHR(GPGETNUNIFORMIVKHR fnptr, GLuint program, GLint location, GLsizei bufSize, GLint * params) { +// (*fnptr)(program, location, bufSize, params); +// } +// static void glowGetnUniformui64vARB(GPGETNUNIFORMUI64VARB fnptr, GLuint program, GLint location, GLsizei bufSize, GLuint64 * params) { +// (*fnptr)(program, location, bufSize, params); +// } +// static void glowGetnUniformuiv(GPGETNUNIFORMUIV fnptr, GLuint program, GLint location, GLsizei bufSize, GLuint * params) { +// (*fnptr)(program, location, bufSize, params); +// } +// static void glowGetnUniformuivARB(GPGETNUNIFORMUIVARB fnptr, GLuint program, GLint location, GLsizei bufSize, GLuint * params) { +// (*fnptr)(program, location, bufSize, params); +// } +// static void glowGetnUniformuivKHR(GPGETNUNIFORMUIVKHR fnptr, GLuint program, GLint location, GLsizei bufSize, GLuint * params) { +// (*fnptr)(program, location, bufSize, params); +// } +// static void glowHint(GPHINT fnptr, GLenum target, GLenum mode) { +// (*fnptr)(target, mode); +// } +// static void glowIndexFormatNV(GPINDEXFORMATNV fnptr, GLenum type, GLsizei stride) { +// (*fnptr)(type, stride); +// } +// static void glowInsertEventMarkerEXT(GPINSERTEVENTMARKEREXT fnptr, GLsizei length, const GLchar * marker) { +// (*fnptr)(length, marker); +// } +// static void glowInterpolatePathsNV(GPINTERPOLATEPATHSNV fnptr, GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight) { +// (*fnptr)(resultPath, pathA, pathB, weight); +// } +// static void glowInvalidateBufferData(GPINVALIDATEBUFFERDATA fnptr, GLuint buffer) { +// (*fnptr)(buffer); +// } +// static void glowInvalidateBufferSubData(GPINVALIDATEBUFFERSUBDATA fnptr, GLuint buffer, GLintptr offset, GLsizeiptr length) { +// (*fnptr)(buffer, offset, length); +// } +// static void glowInvalidateFramebuffer(GPINVALIDATEFRAMEBUFFER fnptr, GLenum target, GLsizei numAttachments, const GLenum * attachments) { +// (*fnptr)(target, numAttachments, attachments); +// } +// static void glowInvalidateNamedFramebufferData(GPINVALIDATENAMEDFRAMEBUFFERDATA fnptr, GLuint framebuffer, GLsizei numAttachments, const GLenum * attachments) { +// (*fnptr)(framebuffer, numAttachments, attachments); +// } +// static void glowInvalidateNamedFramebufferSubData(GPINVALIDATENAMEDFRAMEBUFFERSUBDATA fnptr, GLuint framebuffer, GLsizei numAttachments, const GLenum * attachments, GLint x, GLint y, GLsizei width, GLsizei height) { +// (*fnptr)(framebuffer, numAttachments, attachments, x, y, width, height); +// } +// static void glowInvalidateSubFramebuffer(GPINVALIDATESUBFRAMEBUFFER fnptr, GLenum target, GLsizei numAttachments, const GLenum * attachments, GLint x, GLint y, GLsizei width, GLsizei height) { +// (*fnptr)(target, numAttachments, attachments, x, y, width, height); +// } +// static void glowInvalidateTexImage(GPINVALIDATETEXIMAGE fnptr, GLuint texture, GLint level) { +// (*fnptr)(texture, level); +// } +// static void glowInvalidateTexSubImage(GPINVALIDATETEXSUBIMAGE fnptr, GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth) { +// (*fnptr)(texture, level, xoffset, yoffset, zoffset, width, height, depth); +// } +// static GLboolean glowIsBuffer(GPISBUFFER fnptr, GLuint buffer) { +// return (*fnptr)(buffer); +// } +// static GLboolean glowIsBufferResidentNV(GPISBUFFERRESIDENTNV fnptr, GLenum target) { +// return (*fnptr)(target); +// } +// static GLboolean glowIsCommandListNV(GPISCOMMANDLISTNV fnptr, GLuint list) { +// return (*fnptr)(list); +// } +// static GLboolean glowIsEnabled(GPISENABLED fnptr, GLenum cap) { +// return (*fnptr)(cap); +// } +// static GLboolean glowIsEnabledIndexedEXT(GPISENABLEDINDEXEDEXT fnptr, GLenum target, GLuint index) { +// return (*fnptr)(target, index); +// } +// static GLboolean glowIsEnabledi(GPISENABLEDI fnptr, GLenum target, GLuint index) { +// return (*fnptr)(target, index); +// } +// static GLboolean glowIsFramebuffer(GPISFRAMEBUFFER fnptr, GLuint framebuffer) { +// return (*fnptr)(framebuffer); +// } +// static GLboolean glowIsImageHandleResidentARB(GPISIMAGEHANDLERESIDENTARB fnptr, GLuint64 handle) { +// return (*fnptr)(handle); +// } +// static GLboolean glowIsImageHandleResidentNV(GPISIMAGEHANDLERESIDENTNV fnptr, GLuint64 handle) { +// return (*fnptr)(handle); +// } +// static GLboolean glowIsNamedBufferResidentNV(GPISNAMEDBUFFERRESIDENTNV fnptr, GLuint buffer) { +// return (*fnptr)(buffer); +// } +// static GLboolean glowIsNamedStringARB(GPISNAMEDSTRINGARB fnptr, GLint namelen, const GLchar * name) { +// return (*fnptr)(namelen, name); +// } +// static GLboolean glowIsPathNV(GPISPATHNV fnptr, GLuint path) { +// return (*fnptr)(path); +// } +// static GLboolean glowIsPointInFillPathNV(GPISPOINTINFILLPATHNV fnptr, GLuint path, GLuint mask, GLfloat x, GLfloat y) { +// return (*fnptr)(path, mask, x, y); +// } +// static GLboolean glowIsPointInStrokePathNV(GPISPOINTINSTROKEPATHNV fnptr, GLuint path, GLfloat x, GLfloat y) { +// return (*fnptr)(path, x, y); +// } +// static GLboolean glowIsProgram(GPISPROGRAM fnptr, GLuint program) { +// return (*fnptr)(program); +// } +// static GLboolean glowIsProgramPipeline(GPISPROGRAMPIPELINE fnptr, GLuint pipeline) { +// return (*fnptr)(pipeline); +// } +// static GLboolean glowIsProgramPipelineEXT(GPISPROGRAMPIPELINEEXT fnptr, GLuint pipeline) { +// return (*fnptr)(pipeline); +// } +// static GLboolean glowIsQuery(GPISQUERY fnptr, GLuint id) { +// return (*fnptr)(id); +// } +// static GLboolean glowIsRenderbuffer(GPISRENDERBUFFER fnptr, GLuint renderbuffer) { +// return (*fnptr)(renderbuffer); +// } +// static GLboolean glowIsSampler(GPISSAMPLER fnptr, GLuint sampler) { +// return (*fnptr)(sampler); +// } +// static GLboolean glowIsShader(GPISSHADER fnptr, GLuint shader) { +// return (*fnptr)(shader); +// } +// static GLboolean glowIsStateNV(GPISSTATENV fnptr, GLuint state) { +// return (*fnptr)(state); +// } +// static GLboolean glowIsSync(GPISSYNC fnptr, GLsync sync) { +// return (*fnptr)(sync); +// } +// static GLboolean glowIsTexture(GPISTEXTURE fnptr, GLuint texture) { +// return (*fnptr)(texture); +// } +// static GLboolean glowIsTextureHandleResidentARB(GPISTEXTUREHANDLERESIDENTARB fnptr, GLuint64 handle) { +// return (*fnptr)(handle); +// } +// static GLboolean glowIsTextureHandleResidentNV(GPISTEXTUREHANDLERESIDENTNV fnptr, GLuint64 handle) { +// return (*fnptr)(handle); +// } +// static GLboolean glowIsTransformFeedback(GPISTRANSFORMFEEDBACK fnptr, GLuint id) { +// return (*fnptr)(id); +// } +// static GLboolean glowIsVertexArray(GPISVERTEXARRAY fnptr, GLuint array) { +// return (*fnptr)(array); +// } +// static void glowLabelObjectEXT(GPLABELOBJECTEXT fnptr, GLenum type, GLuint object, GLsizei length, const GLchar * label) { +// (*fnptr)(type, object, length, label); +// } +// static void glowLineWidth(GPLINEWIDTH fnptr, GLfloat width) { +// (*fnptr)(width); +// } +// static void glowLinkProgram(GPLINKPROGRAM fnptr, GLuint program) { +// (*fnptr)(program); +// } +// static void glowListDrawCommandsStatesClientNV(GPLISTDRAWCOMMANDSSTATESCLIENTNV fnptr, GLuint list, GLuint segment, const void ** indirects, const GLsizei * sizes, const GLuint * states, const GLuint * fbos, GLuint count) { +// (*fnptr)(list, segment, indirects, sizes, states, fbos, count); +// } +// static void glowLogicOp(GPLOGICOP fnptr, GLenum opcode) { +// (*fnptr)(opcode); +// } +// static void glowMakeBufferNonResidentNV(GPMAKEBUFFERNONRESIDENTNV fnptr, GLenum target) { +// (*fnptr)(target); +// } +// static void glowMakeBufferResidentNV(GPMAKEBUFFERRESIDENTNV fnptr, GLenum target, GLenum access) { +// (*fnptr)(target, access); +// } +// static void glowMakeImageHandleNonResidentARB(GPMAKEIMAGEHANDLENONRESIDENTARB fnptr, GLuint64 handle) { +// (*fnptr)(handle); +// } +// static void glowMakeImageHandleNonResidentNV(GPMAKEIMAGEHANDLENONRESIDENTNV fnptr, GLuint64 handle) { +// (*fnptr)(handle); +// } +// static void glowMakeImageHandleResidentARB(GPMAKEIMAGEHANDLERESIDENTARB fnptr, GLuint64 handle, GLenum access) { +// (*fnptr)(handle, access); +// } +// static void glowMakeImageHandleResidentNV(GPMAKEIMAGEHANDLERESIDENTNV fnptr, GLuint64 handle, GLenum access) { +// (*fnptr)(handle, access); +// } +// static void glowMakeNamedBufferNonResidentNV(GPMAKENAMEDBUFFERNONRESIDENTNV fnptr, GLuint buffer) { +// (*fnptr)(buffer); +// } +// static void glowMakeNamedBufferResidentNV(GPMAKENAMEDBUFFERRESIDENTNV fnptr, GLuint buffer, GLenum access) { +// (*fnptr)(buffer, access); +// } +// static void glowMakeTextureHandleNonResidentARB(GPMAKETEXTUREHANDLENONRESIDENTARB fnptr, GLuint64 handle) { +// (*fnptr)(handle); +// } +// static void glowMakeTextureHandleNonResidentNV(GPMAKETEXTUREHANDLENONRESIDENTNV fnptr, GLuint64 handle) { +// (*fnptr)(handle); +// } +// static void glowMakeTextureHandleResidentARB(GPMAKETEXTUREHANDLERESIDENTARB fnptr, GLuint64 handle) { +// (*fnptr)(handle); +// } +// static void glowMakeTextureHandleResidentNV(GPMAKETEXTUREHANDLERESIDENTNV fnptr, GLuint64 handle) { +// (*fnptr)(handle); +// } +// static void * glowMapBuffer(GPMAPBUFFER fnptr, GLenum target, GLenum access) { +// return (*fnptr)(target, access); +// } +// static void * glowMapBufferRange(GPMAPBUFFERRANGE fnptr, GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) { +// return (*fnptr)(target, offset, length, access); +// } +// static void * glowMapNamedBuffer(GPMAPNAMEDBUFFER fnptr, GLuint buffer, GLenum access) { +// return (*fnptr)(buffer, access); +// } +// static void * glowMapNamedBufferEXT(GPMAPNAMEDBUFFEREXT fnptr, GLuint buffer, GLenum access) { +// return (*fnptr)(buffer, access); +// } +// static void * glowMapNamedBufferRange(GPMAPNAMEDBUFFERRANGE fnptr, GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access) { +// return (*fnptr)(buffer, offset, length, access); +// } +// static void * glowMapNamedBufferRangeEXT(GPMAPNAMEDBUFFERRANGEEXT fnptr, GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access) { +// return (*fnptr)(buffer, offset, length, access); +// } +// static void glowMatrixFrustumEXT(GPMATRIXFRUSTUMEXT fnptr, GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) { +// (*fnptr)(mode, left, right, bottom, top, zNear, zFar); +// } +// static void glowMatrixLoad3x2fNV(GPMATRIXLOAD3X2FNV fnptr, GLenum matrixMode, const GLfloat * m) { +// (*fnptr)(matrixMode, m); +// } +// static void glowMatrixLoad3x3fNV(GPMATRIXLOAD3X3FNV fnptr, GLenum matrixMode, const GLfloat * m) { +// (*fnptr)(matrixMode, m); +// } +// static void glowMatrixLoadIdentityEXT(GPMATRIXLOADIDENTITYEXT fnptr, GLenum mode) { +// (*fnptr)(mode); +// } +// static void glowMatrixLoadTranspose3x3fNV(GPMATRIXLOADTRANSPOSE3X3FNV fnptr, GLenum matrixMode, const GLfloat * m) { +// (*fnptr)(matrixMode, m); +// } +// static void glowMatrixLoadTransposedEXT(GPMATRIXLOADTRANSPOSEDEXT fnptr, GLenum mode, const GLdouble * m) { +// (*fnptr)(mode, m); +// } +// static void glowMatrixLoadTransposefEXT(GPMATRIXLOADTRANSPOSEFEXT fnptr, GLenum mode, const GLfloat * m) { +// (*fnptr)(mode, m); +// } +// static void glowMatrixLoaddEXT(GPMATRIXLOADDEXT fnptr, GLenum mode, const GLdouble * m) { +// (*fnptr)(mode, m); +// } +// static void glowMatrixLoadfEXT(GPMATRIXLOADFEXT fnptr, GLenum mode, const GLfloat * m) { +// (*fnptr)(mode, m); +// } +// static void glowMatrixMult3x2fNV(GPMATRIXMULT3X2FNV fnptr, GLenum matrixMode, const GLfloat * m) { +// (*fnptr)(matrixMode, m); +// } +// static void glowMatrixMult3x3fNV(GPMATRIXMULT3X3FNV fnptr, GLenum matrixMode, const GLfloat * m) { +// (*fnptr)(matrixMode, m); +// } +// static void glowMatrixMultTranspose3x3fNV(GPMATRIXMULTTRANSPOSE3X3FNV fnptr, GLenum matrixMode, const GLfloat * m) { +// (*fnptr)(matrixMode, m); +// } +// static void glowMatrixMultTransposedEXT(GPMATRIXMULTTRANSPOSEDEXT fnptr, GLenum mode, const GLdouble * m) { +// (*fnptr)(mode, m); +// } +// static void glowMatrixMultTransposefEXT(GPMATRIXMULTTRANSPOSEFEXT fnptr, GLenum mode, const GLfloat * m) { +// (*fnptr)(mode, m); +// } +// static void glowMatrixMultdEXT(GPMATRIXMULTDEXT fnptr, GLenum mode, const GLdouble * m) { +// (*fnptr)(mode, m); +// } +// static void glowMatrixMultfEXT(GPMATRIXMULTFEXT fnptr, GLenum mode, const GLfloat * m) { +// (*fnptr)(mode, m); +// } +// static void glowMatrixOrthoEXT(GPMATRIXORTHOEXT fnptr, GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) { +// (*fnptr)(mode, left, right, bottom, top, zNear, zFar); +// } +// static void glowMatrixPopEXT(GPMATRIXPOPEXT fnptr, GLenum mode) { +// (*fnptr)(mode); +// } +// static void glowMatrixPushEXT(GPMATRIXPUSHEXT fnptr, GLenum mode) { +// (*fnptr)(mode); +// } +// static void glowMatrixRotatedEXT(GPMATRIXROTATEDEXT fnptr, GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z) { +// (*fnptr)(mode, angle, x, y, z); +// } +// static void glowMatrixRotatefEXT(GPMATRIXROTATEFEXT fnptr, GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z) { +// (*fnptr)(mode, angle, x, y, z); +// } +// static void glowMatrixScaledEXT(GPMATRIXSCALEDEXT fnptr, GLenum mode, GLdouble x, GLdouble y, GLdouble z) { +// (*fnptr)(mode, x, y, z); +// } +// static void glowMatrixScalefEXT(GPMATRIXSCALEFEXT fnptr, GLenum mode, GLfloat x, GLfloat y, GLfloat z) { +// (*fnptr)(mode, x, y, z); +// } +// static void glowMatrixTranslatedEXT(GPMATRIXTRANSLATEDEXT fnptr, GLenum mode, GLdouble x, GLdouble y, GLdouble z) { +// (*fnptr)(mode, x, y, z); +// } +// static void glowMatrixTranslatefEXT(GPMATRIXTRANSLATEFEXT fnptr, GLenum mode, GLfloat x, GLfloat y, GLfloat z) { +// (*fnptr)(mode, x, y, z); +// } +// static void glowMaxShaderCompilerThreadsARB(GPMAXSHADERCOMPILERTHREADSARB fnptr, GLuint count) { +// (*fnptr)(count); +// } +// static void glowMaxShaderCompilerThreadsKHR(GPMAXSHADERCOMPILERTHREADSKHR fnptr, GLuint count) { +// (*fnptr)(count); +// } +// static void glowMemoryBarrier(GPMEMORYBARRIER fnptr, GLbitfield barriers) { +// (*fnptr)(barriers); +// } +// static void glowMemoryBarrierByRegion(GPMEMORYBARRIERBYREGION fnptr, GLbitfield barriers) { +// (*fnptr)(barriers); +// } +// static void glowMinSampleShading(GPMINSAMPLESHADING fnptr, GLfloat value) { +// (*fnptr)(value); +// } +// static void glowMinSampleShadingARB(GPMINSAMPLESHADINGARB fnptr, GLfloat value) { +// (*fnptr)(value); +// } +// static void glowMultiDrawArrays(GPMULTIDRAWARRAYS fnptr, GLenum mode, const GLint * first, const GLsizei * count, GLsizei drawcount) { +// (*fnptr)(mode, first, count, drawcount); +// } +// static void glowMultiDrawArraysIndirect(GPMULTIDRAWARRAYSINDIRECT fnptr, GLenum mode, const void * indirect, GLsizei drawcount, GLsizei stride) { +// (*fnptr)(mode, indirect, drawcount, stride); +// } +// static void glowMultiDrawArraysIndirectBindlessCountNV(GPMULTIDRAWARRAYSINDIRECTBINDLESSCOUNTNV fnptr, GLenum mode, const void * indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount) { +// (*fnptr)(mode, indirect, drawCount, maxDrawCount, stride, vertexBufferCount); +// } +// static void glowMultiDrawArraysIndirectBindlessNV(GPMULTIDRAWARRAYSINDIRECTBINDLESSNV fnptr, GLenum mode, const void * indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount) { +// (*fnptr)(mode, indirect, drawCount, stride, vertexBufferCount); +// } +// static void glowMultiDrawArraysIndirectCountARB(GPMULTIDRAWARRAYSINDIRECTCOUNTARB fnptr, GLenum mode, const void * indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride) { +// (*fnptr)(mode, indirect, drawcount, maxdrawcount, stride); +// } +// static void glowMultiDrawElements(GPMULTIDRAWELEMENTS fnptr, GLenum mode, const GLsizei * count, GLenum type, const void *const* indices, GLsizei drawcount) { +// (*fnptr)(mode, count, type, indices, drawcount); +// } +// static void glowMultiDrawElementsBaseVertex(GPMULTIDRAWELEMENTSBASEVERTEX fnptr, GLenum mode, const GLsizei * count, GLenum type, const void *const* indices, GLsizei drawcount, const GLint * basevertex) { +// (*fnptr)(mode, count, type, indices, drawcount, basevertex); +// } +// static void glowMultiDrawElementsIndirect(GPMULTIDRAWELEMENTSINDIRECT fnptr, GLenum mode, GLenum type, const void * indirect, GLsizei drawcount, GLsizei stride) { +// (*fnptr)(mode, type, indirect, drawcount, stride); +// } +// static void glowMultiDrawElementsIndirectBindlessCountNV(GPMULTIDRAWELEMENTSINDIRECTBINDLESSCOUNTNV fnptr, GLenum mode, GLenum type, const void * indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount) { +// (*fnptr)(mode, type, indirect, drawCount, maxDrawCount, stride, vertexBufferCount); +// } +// static void glowMultiDrawElementsIndirectBindlessNV(GPMULTIDRAWELEMENTSINDIRECTBINDLESSNV fnptr, GLenum mode, GLenum type, const void * indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount) { +// (*fnptr)(mode, type, indirect, drawCount, stride, vertexBufferCount); +// } +// static void glowMultiDrawElementsIndirectCountARB(GPMULTIDRAWELEMENTSINDIRECTCOUNTARB fnptr, GLenum mode, GLenum type, const void * indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride) { +// (*fnptr)(mode, type, indirect, drawcount, maxdrawcount, stride); +// } +// static void glowMultiTexBufferEXT(GPMULTITEXBUFFEREXT fnptr, GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer) { +// (*fnptr)(texunit, target, internalformat, buffer); +// } +// static void glowMultiTexCoordPointerEXT(GPMULTITEXCOORDPOINTEREXT fnptr, GLenum texunit, GLint size, GLenum type, GLsizei stride, const void * pointer) { +// (*fnptr)(texunit, size, type, stride, pointer); +// } +// static void glowMultiTexEnvfEXT(GPMULTITEXENVFEXT fnptr, GLenum texunit, GLenum target, GLenum pname, GLfloat param) { +// (*fnptr)(texunit, target, pname, param); +// } +// static void glowMultiTexEnvfvEXT(GPMULTITEXENVFVEXT fnptr, GLenum texunit, GLenum target, GLenum pname, const GLfloat * params) { +// (*fnptr)(texunit, target, pname, params); +// } +// static void glowMultiTexEnviEXT(GPMULTITEXENVIEXT fnptr, GLenum texunit, GLenum target, GLenum pname, GLint param) { +// (*fnptr)(texunit, target, pname, param); +// } +// static void glowMultiTexEnvivEXT(GPMULTITEXENVIVEXT fnptr, GLenum texunit, GLenum target, GLenum pname, const GLint * params) { +// (*fnptr)(texunit, target, pname, params); +// } +// static void glowMultiTexGendEXT(GPMULTITEXGENDEXT fnptr, GLenum texunit, GLenum coord, GLenum pname, GLdouble param) { +// (*fnptr)(texunit, coord, pname, param); +// } +// static void glowMultiTexGendvEXT(GPMULTITEXGENDVEXT fnptr, GLenum texunit, GLenum coord, GLenum pname, const GLdouble * params) { +// (*fnptr)(texunit, coord, pname, params); +// } +// static void glowMultiTexGenfEXT(GPMULTITEXGENFEXT fnptr, GLenum texunit, GLenum coord, GLenum pname, GLfloat param) { +// (*fnptr)(texunit, coord, pname, param); +// } +// static void glowMultiTexGenfvEXT(GPMULTITEXGENFVEXT fnptr, GLenum texunit, GLenum coord, GLenum pname, const GLfloat * params) { +// (*fnptr)(texunit, coord, pname, params); +// } +// static void glowMultiTexGeniEXT(GPMULTITEXGENIEXT fnptr, GLenum texunit, GLenum coord, GLenum pname, GLint param) { +// (*fnptr)(texunit, coord, pname, param); +// } +// static void glowMultiTexGenivEXT(GPMULTITEXGENIVEXT fnptr, GLenum texunit, GLenum coord, GLenum pname, const GLint * params) { +// (*fnptr)(texunit, coord, pname, params); +// } +// static void glowMultiTexImage1DEXT(GPMULTITEXIMAGE1DEXT fnptr, GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void * pixels) { +// (*fnptr)(texunit, target, level, internalformat, width, border, format, type, pixels); +// } +// static void glowMultiTexImage2DEXT(GPMULTITEXIMAGE2DEXT fnptr, GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void * pixels) { +// (*fnptr)(texunit, target, level, internalformat, width, height, border, format, type, pixels); +// } +// static void glowMultiTexImage3DEXT(GPMULTITEXIMAGE3DEXT fnptr, GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void * pixels) { +// (*fnptr)(texunit, target, level, internalformat, width, height, depth, border, format, type, pixels); +// } +// static void glowMultiTexParameterIivEXT(GPMULTITEXPARAMETERIIVEXT fnptr, GLenum texunit, GLenum target, GLenum pname, const GLint * params) { +// (*fnptr)(texunit, target, pname, params); +// } +// static void glowMultiTexParameterIuivEXT(GPMULTITEXPARAMETERIUIVEXT fnptr, GLenum texunit, GLenum target, GLenum pname, const GLuint * params) { +// (*fnptr)(texunit, target, pname, params); +// } +// static void glowMultiTexParameterfEXT(GPMULTITEXPARAMETERFEXT fnptr, GLenum texunit, GLenum target, GLenum pname, GLfloat param) { +// (*fnptr)(texunit, target, pname, param); +// } +// static void glowMultiTexParameterfvEXT(GPMULTITEXPARAMETERFVEXT fnptr, GLenum texunit, GLenum target, GLenum pname, const GLfloat * params) { +// (*fnptr)(texunit, target, pname, params); +// } +// static void glowMultiTexParameteriEXT(GPMULTITEXPARAMETERIEXT fnptr, GLenum texunit, GLenum target, GLenum pname, GLint param) { +// (*fnptr)(texunit, target, pname, param); +// } +// static void glowMultiTexParameterivEXT(GPMULTITEXPARAMETERIVEXT fnptr, GLenum texunit, GLenum target, GLenum pname, const GLint * params) { +// (*fnptr)(texunit, target, pname, params); +// } +// static void glowMultiTexRenderbufferEXT(GPMULTITEXRENDERBUFFEREXT fnptr, GLenum texunit, GLenum target, GLuint renderbuffer) { +// (*fnptr)(texunit, target, renderbuffer); +// } +// static void glowMultiTexSubImage1DEXT(GPMULTITEXSUBIMAGE1DEXT fnptr, GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void * pixels) { +// (*fnptr)(texunit, target, level, xoffset, width, format, type, pixels); +// } +// static void glowMultiTexSubImage2DEXT(GPMULTITEXSUBIMAGE2DEXT fnptr, GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * pixels) { +// (*fnptr)(texunit, target, level, xoffset, yoffset, width, height, format, type, pixels); +// } +// static void glowMultiTexSubImage3DEXT(GPMULTITEXSUBIMAGE3DEXT fnptr, GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels) { +// (*fnptr)(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); +// } +// static void glowNamedBufferData(GPNAMEDBUFFERDATA fnptr, GLuint buffer, GLsizeiptr size, const void * data, GLenum usage) { +// (*fnptr)(buffer, size, data, usage); +// } +// static void glowNamedBufferDataEXT(GPNAMEDBUFFERDATAEXT fnptr, GLuint buffer, GLsizeiptr size, const void * data, GLenum usage) { +// (*fnptr)(buffer, size, data, usage); +// } +// static void glowNamedBufferPageCommitmentARB(GPNAMEDBUFFERPAGECOMMITMENTARB fnptr, GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit) { +// (*fnptr)(buffer, offset, size, commit); +// } +// static void glowNamedBufferPageCommitmentEXT(GPNAMEDBUFFERPAGECOMMITMENTEXT fnptr, GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit) { +// (*fnptr)(buffer, offset, size, commit); +// } +// static void glowNamedBufferStorage(GPNAMEDBUFFERSTORAGE fnptr, GLuint buffer, GLsizeiptr size, const void * data, GLbitfield flags) { +// (*fnptr)(buffer, size, data, flags); +// } +// static void glowNamedBufferStorageEXT(GPNAMEDBUFFERSTORAGEEXT fnptr, GLuint buffer, GLsizeiptr size, const void * data, GLbitfield flags) { +// (*fnptr)(buffer, size, data, flags); +// } +// static void glowNamedBufferSubData(GPNAMEDBUFFERSUBDATA fnptr, GLuint buffer, GLintptr offset, GLsizeiptr size, const void * data) { +// (*fnptr)(buffer, offset, size, data); +// } +// static void glowNamedBufferSubDataEXT(GPNAMEDBUFFERSUBDATAEXT fnptr, GLuint buffer, GLintptr offset, GLsizeiptr size, const void * data) { +// (*fnptr)(buffer, offset, size, data); +// } +// static void glowNamedCopyBufferSubDataEXT(GPNAMEDCOPYBUFFERSUBDATAEXT fnptr, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) { +// (*fnptr)(readBuffer, writeBuffer, readOffset, writeOffset, size); +// } +// static void glowNamedFramebufferDrawBuffer(GPNAMEDFRAMEBUFFERDRAWBUFFER fnptr, GLuint framebuffer, GLenum buf) { +// (*fnptr)(framebuffer, buf); +// } +// static void glowNamedFramebufferDrawBuffers(GPNAMEDFRAMEBUFFERDRAWBUFFERS fnptr, GLuint framebuffer, GLsizei n, const GLenum * bufs) { +// (*fnptr)(framebuffer, n, bufs); +// } +// static void glowNamedFramebufferParameteri(GPNAMEDFRAMEBUFFERPARAMETERI fnptr, GLuint framebuffer, GLenum pname, GLint param) { +// (*fnptr)(framebuffer, pname, param); +// } +// static void glowNamedFramebufferParameteriEXT(GPNAMEDFRAMEBUFFERPARAMETERIEXT fnptr, GLuint framebuffer, GLenum pname, GLint param) { +// (*fnptr)(framebuffer, pname, param); +// } +// static void glowNamedFramebufferReadBuffer(GPNAMEDFRAMEBUFFERREADBUFFER fnptr, GLuint framebuffer, GLenum src) { +// (*fnptr)(framebuffer, src); +// } +// static void glowNamedFramebufferRenderbuffer(GPNAMEDFRAMEBUFFERRENDERBUFFER fnptr, GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) { +// (*fnptr)(framebuffer, attachment, renderbuffertarget, renderbuffer); +// } +// static void glowNamedFramebufferRenderbufferEXT(GPNAMEDFRAMEBUFFERRENDERBUFFEREXT fnptr, GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) { +// (*fnptr)(framebuffer, attachment, renderbuffertarget, renderbuffer); +// } +// static void glowNamedFramebufferSampleLocationsfvARB(GPNAMEDFRAMEBUFFERSAMPLELOCATIONSFVARB fnptr, GLuint framebuffer, GLuint start, GLsizei count, const GLfloat * v) { +// (*fnptr)(framebuffer, start, count, v); +// } +// static void glowNamedFramebufferSampleLocationsfvNV(GPNAMEDFRAMEBUFFERSAMPLELOCATIONSFVNV fnptr, GLuint framebuffer, GLuint start, GLsizei count, const GLfloat * v) { +// (*fnptr)(framebuffer, start, count, v); +// } +// static void glowNamedFramebufferTexture(GPNAMEDFRAMEBUFFERTEXTURE fnptr, GLuint framebuffer, GLenum attachment, GLuint texture, GLint level) { +// (*fnptr)(framebuffer, attachment, texture, level); +// } +// static void glowNamedFramebufferTexture1DEXT(GPNAMEDFRAMEBUFFERTEXTURE1DEXT fnptr, GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level) { +// (*fnptr)(framebuffer, attachment, textarget, texture, level); +// } +// static void glowNamedFramebufferTexture2DEXT(GPNAMEDFRAMEBUFFERTEXTURE2DEXT fnptr, GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level) { +// (*fnptr)(framebuffer, attachment, textarget, texture, level); +// } +// static void glowNamedFramebufferTexture3DEXT(GPNAMEDFRAMEBUFFERTEXTURE3DEXT fnptr, GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) { +// (*fnptr)(framebuffer, attachment, textarget, texture, level, zoffset); +// } +// static void glowNamedFramebufferTextureEXT(GPNAMEDFRAMEBUFFERTEXTUREEXT fnptr, GLuint framebuffer, GLenum attachment, GLuint texture, GLint level) { +// (*fnptr)(framebuffer, attachment, texture, level); +// } +// static void glowNamedFramebufferTextureFaceEXT(GPNAMEDFRAMEBUFFERTEXTUREFACEEXT fnptr, GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face) { +// (*fnptr)(framebuffer, attachment, texture, level, face); +// } +// static void glowNamedFramebufferTextureLayer(GPNAMEDFRAMEBUFFERTEXTURELAYER fnptr, GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer) { +// (*fnptr)(framebuffer, attachment, texture, level, layer); +// } +// static void glowNamedFramebufferTextureLayerEXT(GPNAMEDFRAMEBUFFERTEXTURELAYEREXT fnptr, GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer) { +// (*fnptr)(framebuffer, attachment, texture, level, layer); +// } +// static void glowNamedProgramLocalParameter4dEXT(GPNAMEDPROGRAMLOCALPARAMETER4DEXT fnptr, GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) { +// (*fnptr)(program, target, index, x, y, z, w); +// } +// static void glowNamedProgramLocalParameter4dvEXT(GPNAMEDPROGRAMLOCALPARAMETER4DVEXT fnptr, GLuint program, GLenum target, GLuint index, const GLdouble * params) { +// (*fnptr)(program, target, index, params); +// } +// static void glowNamedProgramLocalParameter4fEXT(GPNAMEDPROGRAMLOCALPARAMETER4FEXT fnptr, GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { +// (*fnptr)(program, target, index, x, y, z, w); +// } +// static void glowNamedProgramLocalParameter4fvEXT(GPNAMEDPROGRAMLOCALPARAMETER4FVEXT fnptr, GLuint program, GLenum target, GLuint index, const GLfloat * params) { +// (*fnptr)(program, target, index, params); +// } +// static void glowNamedProgramLocalParameterI4iEXT(GPNAMEDPROGRAMLOCALPARAMETERI4IEXT fnptr, GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w) { +// (*fnptr)(program, target, index, x, y, z, w); +// } +// static void glowNamedProgramLocalParameterI4ivEXT(GPNAMEDPROGRAMLOCALPARAMETERI4IVEXT fnptr, GLuint program, GLenum target, GLuint index, const GLint * params) { +// (*fnptr)(program, target, index, params); +// } +// static void glowNamedProgramLocalParameterI4uiEXT(GPNAMEDPROGRAMLOCALPARAMETERI4UIEXT fnptr, GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) { +// (*fnptr)(program, target, index, x, y, z, w); +// } +// static void glowNamedProgramLocalParameterI4uivEXT(GPNAMEDPROGRAMLOCALPARAMETERI4UIVEXT fnptr, GLuint program, GLenum target, GLuint index, const GLuint * params) { +// (*fnptr)(program, target, index, params); +// } +// static void glowNamedProgramLocalParameters4fvEXT(GPNAMEDPROGRAMLOCALPARAMETERS4FVEXT fnptr, GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat * params) { +// (*fnptr)(program, target, index, count, params); +// } +// static void glowNamedProgramLocalParametersI4ivEXT(GPNAMEDPROGRAMLOCALPARAMETERSI4IVEXT fnptr, GLuint program, GLenum target, GLuint index, GLsizei count, const GLint * params) { +// (*fnptr)(program, target, index, count, params); +// } +// static void glowNamedProgramLocalParametersI4uivEXT(GPNAMEDPROGRAMLOCALPARAMETERSI4UIVEXT fnptr, GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint * params) { +// (*fnptr)(program, target, index, count, params); +// } +// static void glowNamedProgramStringEXT(GPNAMEDPROGRAMSTRINGEXT fnptr, GLuint program, GLenum target, GLenum format, GLsizei len, const void * string) { +// (*fnptr)(program, target, format, len, string); +// } +// static void glowNamedRenderbufferStorage(GPNAMEDRENDERBUFFERSTORAGE fnptr, GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height) { +// (*fnptr)(renderbuffer, internalformat, width, height); +// } +// static void glowNamedRenderbufferStorageEXT(GPNAMEDRENDERBUFFERSTORAGEEXT fnptr, GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height) { +// (*fnptr)(renderbuffer, internalformat, width, height); +// } +// static void glowNamedRenderbufferStorageMultisample(GPNAMEDRENDERBUFFERSTORAGEMULTISAMPLE fnptr, GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) { +// (*fnptr)(renderbuffer, samples, internalformat, width, height); +// } +// static void glowNamedRenderbufferStorageMultisampleCoverageEXT(GPNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXT fnptr, GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height) { +// (*fnptr)(renderbuffer, coverageSamples, colorSamples, internalformat, width, height); +// } +// static void glowNamedRenderbufferStorageMultisampleEXT(GPNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXT fnptr, GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) { +// (*fnptr)(renderbuffer, samples, internalformat, width, height); +// } +// static void glowNamedStringARB(GPNAMEDSTRINGARB fnptr, GLenum type, GLint namelen, const GLchar * name, GLint stringlen, const GLchar * string) { +// (*fnptr)(type, namelen, name, stringlen, string); +// } +// static void glowNormalFormatNV(GPNORMALFORMATNV fnptr, GLenum type, GLsizei stride) { +// (*fnptr)(type, stride); +// } +// static void glowObjectLabel(GPOBJECTLABEL fnptr, GLenum identifier, GLuint name, GLsizei length, const GLchar * label) { +// (*fnptr)(identifier, name, length, label); +// } +// static void glowObjectLabelKHR(GPOBJECTLABELKHR fnptr, GLenum identifier, GLuint name, GLsizei length, const GLchar * label) { +// (*fnptr)(identifier, name, length, label); +// } +// static void glowObjectPtrLabel(GPOBJECTPTRLABEL fnptr, const void * ptr, GLsizei length, const GLchar * label) { +// (*fnptr)(ptr, length, label); +// } +// static void glowObjectPtrLabelKHR(GPOBJECTPTRLABELKHR fnptr, const void * ptr, GLsizei length, const GLchar * label) { +// (*fnptr)(ptr, length, label); +// } +// static void glowPatchParameterfv(GPPATCHPARAMETERFV fnptr, GLenum pname, const GLfloat * values) { +// (*fnptr)(pname, values); +// } +// static void glowPatchParameteri(GPPATCHPARAMETERI fnptr, GLenum pname, GLint value) { +// (*fnptr)(pname, value); +// } +// static void glowPathCommandsNV(GPPATHCOMMANDSNV fnptr, GLuint path, GLsizei numCommands, const GLubyte * commands, GLsizei numCoords, GLenum coordType, const void * coords) { +// (*fnptr)(path, numCommands, commands, numCoords, coordType, coords); +// } +// static void glowPathCoordsNV(GPPATHCOORDSNV fnptr, GLuint path, GLsizei numCoords, GLenum coordType, const void * coords) { +// (*fnptr)(path, numCoords, coordType, coords); +// } +// static void glowPathCoverDepthFuncNV(GPPATHCOVERDEPTHFUNCNV fnptr, GLenum func) { +// (*fnptr)(func); +// } +// static void glowPathDashArrayNV(GPPATHDASHARRAYNV fnptr, GLuint path, GLsizei dashCount, const GLfloat * dashArray) { +// (*fnptr)(path, dashCount, dashArray); +// } +// static GLenum glowPathGlyphIndexArrayNV(GPPATHGLYPHINDEXARRAYNV fnptr, GLuint firstPathName, GLenum fontTarget, const void * fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale) { +// return (*fnptr)(firstPathName, fontTarget, fontName, fontStyle, firstGlyphIndex, numGlyphs, pathParameterTemplate, emScale); +// } +// static GLenum glowPathGlyphIndexRangeNV(GPPATHGLYPHINDEXRANGENV fnptr, GLenum fontTarget, const void * fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint * baseAndCount) { +// return (*fnptr)(fontTarget, fontName, fontStyle, pathParameterTemplate, emScale, baseAndCount); +// } +// static void glowPathGlyphRangeNV(GPPATHGLYPHRANGENV fnptr, GLuint firstPathName, GLenum fontTarget, const void * fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale) { +// (*fnptr)(firstPathName, fontTarget, fontName, fontStyle, firstGlyph, numGlyphs, handleMissingGlyphs, pathParameterTemplate, emScale); +// } +// static void glowPathGlyphsNV(GPPATHGLYPHSNV fnptr, GLuint firstPathName, GLenum fontTarget, const void * fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void * charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale) { +// (*fnptr)(firstPathName, fontTarget, fontName, fontStyle, numGlyphs, type, charcodes, handleMissingGlyphs, pathParameterTemplate, emScale); +// } +// static GLenum glowPathMemoryGlyphIndexArrayNV(GPPATHMEMORYGLYPHINDEXARRAYNV fnptr, GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void * fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale) { +// return (*fnptr)(firstPathName, fontTarget, fontSize, fontData, faceIndex, firstGlyphIndex, numGlyphs, pathParameterTemplate, emScale); +// } +// static void glowPathParameterfNV(GPPATHPARAMETERFNV fnptr, GLuint path, GLenum pname, GLfloat value) { +// (*fnptr)(path, pname, value); +// } +// static void glowPathParameterfvNV(GPPATHPARAMETERFVNV fnptr, GLuint path, GLenum pname, const GLfloat * value) { +// (*fnptr)(path, pname, value); +// } +// static void glowPathParameteriNV(GPPATHPARAMETERINV fnptr, GLuint path, GLenum pname, GLint value) { +// (*fnptr)(path, pname, value); +// } +// static void glowPathParameterivNV(GPPATHPARAMETERIVNV fnptr, GLuint path, GLenum pname, const GLint * value) { +// (*fnptr)(path, pname, value); +// } +// static void glowPathStencilDepthOffsetNV(GPPATHSTENCILDEPTHOFFSETNV fnptr, GLfloat factor, GLfloat units) { +// (*fnptr)(factor, units); +// } +// static void glowPathStencilFuncNV(GPPATHSTENCILFUNCNV fnptr, GLenum func, GLint ref, GLuint mask) { +// (*fnptr)(func, ref, mask); +// } +// static void glowPathStringNV(GPPATHSTRINGNV fnptr, GLuint path, GLenum format, GLsizei length, const void * pathString) { +// (*fnptr)(path, format, length, pathString); +// } +// static void glowPathSubCommandsNV(GPPATHSUBCOMMANDSNV fnptr, GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte * commands, GLsizei numCoords, GLenum coordType, const void * coords) { +// (*fnptr)(path, commandStart, commandsToDelete, numCommands, commands, numCoords, coordType, coords); +// } +// static void glowPathSubCoordsNV(GPPATHSUBCOORDSNV fnptr, GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void * coords) { +// (*fnptr)(path, coordStart, numCoords, coordType, coords); +// } +// static void glowPauseTransformFeedback(GPPAUSETRANSFORMFEEDBACK fnptr) { +// (*fnptr)(); +// } +// static void glowPixelStoref(GPPIXELSTOREF fnptr, GLenum pname, GLfloat param) { +// (*fnptr)(pname, param); +// } +// static void glowPixelStorei(GPPIXELSTOREI fnptr, GLenum pname, GLint param) { +// (*fnptr)(pname, param); +// } +// static GLboolean glowPointAlongPathNV(GPPOINTALONGPATHNV fnptr, GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat * x, GLfloat * y, GLfloat * tangentX, GLfloat * tangentY) { +// return (*fnptr)(path, startSegment, numSegments, distance, x, y, tangentX, tangentY); +// } +// static void glowPointParameterf(GPPOINTPARAMETERF fnptr, GLenum pname, GLfloat param) { +// (*fnptr)(pname, param); +// } +// static void glowPointParameterfv(GPPOINTPARAMETERFV fnptr, GLenum pname, const GLfloat * params) { +// (*fnptr)(pname, params); +// } +// static void glowPointParameteri(GPPOINTPARAMETERI fnptr, GLenum pname, GLint param) { +// (*fnptr)(pname, param); +// } +// static void glowPointParameteriv(GPPOINTPARAMETERIV fnptr, GLenum pname, const GLint * params) { +// (*fnptr)(pname, params); +// } +// static void glowPointSize(GPPOINTSIZE fnptr, GLfloat size) { +// (*fnptr)(size); +// } +// static void glowPolygonMode(GPPOLYGONMODE fnptr, GLenum face, GLenum mode) { +// (*fnptr)(face, mode); +// } +// static void glowPolygonOffset(GPPOLYGONOFFSET fnptr, GLfloat factor, GLfloat units) { +// (*fnptr)(factor, units); +// } +// static void glowPolygonOffsetClamp(GPPOLYGONOFFSETCLAMP fnptr, GLfloat factor, GLfloat units, GLfloat clamp) { +// (*fnptr)(factor, units, clamp); +// } +// static void glowPolygonOffsetClampEXT(GPPOLYGONOFFSETCLAMPEXT fnptr, GLfloat factor, GLfloat units, GLfloat clamp) { +// (*fnptr)(factor, units, clamp); +// } +// static void glowPopDebugGroup(GPPOPDEBUGGROUP fnptr) { +// (*fnptr)(); +// } +// static void glowPopDebugGroupKHR(GPPOPDEBUGGROUPKHR fnptr) { +// (*fnptr)(); +// } +// static void glowPopGroupMarkerEXT(GPPOPGROUPMARKEREXT fnptr) { +// (*fnptr)(); +// } +// static void glowPrimitiveBoundingBoxARB(GPPRIMITIVEBOUNDINGBOXARB fnptr, GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW) { +// (*fnptr)(minX, minY, minZ, minW, maxX, maxY, maxZ, maxW); +// } +// static void glowPrimitiveRestartIndex(GPPRIMITIVERESTARTINDEX fnptr, GLuint index) { +// (*fnptr)(index); +// } +// static void glowProgramBinary(GPPROGRAMBINARY fnptr, GLuint program, GLenum binaryFormat, const void * binary, GLsizei length) { +// (*fnptr)(program, binaryFormat, binary, length); +// } +// static void glowProgramParameteri(GPPROGRAMPARAMETERI fnptr, GLuint program, GLenum pname, GLint value) { +// (*fnptr)(program, pname, value); +// } +// static void glowProgramParameteriARB(GPPROGRAMPARAMETERIARB fnptr, GLuint program, GLenum pname, GLint value) { +// (*fnptr)(program, pname, value); +// } +// static void glowProgramParameteriEXT(GPPROGRAMPARAMETERIEXT fnptr, GLuint program, GLenum pname, GLint value) { +// (*fnptr)(program, pname, value); +// } +// static void glowProgramPathFragmentInputGenNV(GPPROGRAMPATHFRAGMENTINPUTGENNV fnptr, GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat * coeffs) { +// (*fnptr)(program, location, genMode, components, coeffs); +// } +// static void glowProgramUniform1d(GPPROGRAMUNIFORM1D fnptr, GLuint program, GLint location, GLdouble v0) { +// (*fnptr)(program, location, v0); +// } +// static void glowProgramUniform1dEXT(GPPROGRAMUNIFORM1DEXT fnptr, GLuint program, GLint location, GLdouble x) { +// (*fnptr)(program, location, x); +// } +// static void glowProgramUniform1dv(GPPROGRAMUNIFORM1DV fnptr, GLuint program, GLint location, GLsizei count, const GLdouble * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform1dvEXT(GPPROGRAMUNIFORM1DVEXT fnptr, GLuint program, GLint location, GLsizei count, const GLdouble * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform1f(GPPROGRAMUNIFORM1F fnptr, GLuint program, GLint location, GLfloat v0) { +// (*fnptr)(program, location, v0); +// } +// static void glowProgramUniform1fEXT(GPPROGRAMUNIFORM1FEXT fnptr, GLuint program, GLint location, GLfloat v0) { +// (*fnptr)(program, location, v0); +// } +// static void glowProgramUniform1fv(GPPROGRAMUNIFORM1FV fnptr, GLuint program, GLint location, GLsizei count, const GLfloat * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform1fvEXT(GPPROGRAMUNIFORM1FVEXT fnptr, GLuint program, GLint location, GLsizei count, const GLfloat * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform1i(GPPROGRAMUNIFORM1I fnptr, GLuint program, GLint location, GLint v0) { +// (*fnptr)(program, location, v0); +// } +// static void glowProgramUniform1i64ARB(GPPROGRAMUNIFORM1I64ARB fnptr, GLuint program, GLint location, GLint64 x) { +// (*fnptr)(program, location, x); +// } +// static void glowProgramUniform1i64NV(GPPROGRAMUNIFORM1I64NV fnptr, GLuint program, GLint location, GLint64EXT x) { +// (*fnptr)(program, location, x); +// } +// static void glowProgramUniform1i64vARB(GPPROGRAMUNIFORM1I64VARB fnptr, GLuint program, GLint location, GLsizei count, const GLint64 * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform1i64vNV(GPPROGRAMUNIFORM1I64VNV fnptr, GLuint program, GLint location, GLsizei count, const GLint64EXT * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform1iEXT(GPPROGRAMUNIFORM1IEXT fnptr, GLuint program, GLint location, GLint v0) { +// (*fnptr)(program, location, v0); +// } +// static void glowProgramUniform1iv(GPPROGRAMUNIFORM1IV fnptr, GLuint program, GLint location, GLsizei count, const GLint * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform1ivEXT(GPPROGRAMUNIFORM1IVEXT fnptr, GLuint program, GLint location, GLsizei count, const GLint * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform1ui(GPPROGRAMUNIFORM1UI fnptr, GLuint program, GLint location, GLuint v0) { +// (*fnptr)(program, location, v0); +// } +// static void glowProgramUniform1ui64ARB(GPPROGRAMUNIFORM1UI64ARB fnptr, GLuint program, GLint location, GLuint64 x) { +// (*fnptr)(program, location, x); +// } +// static void glowProgramUniform1ui64NV(GPPROGRAMUNIFORM1UI64NV fnptr, GLuint program, GLint location, GLuint64EXT x) { +// (*fnptr)(program, location, x); +// } +// static void glowProgramUniform1ui64vARB(GPPROGRAMUNIFORM1UI64VARB fnptr, GLuint program, GLint location, GLsizei count, const GLuint64 * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform1ui64vNV(GPPROGRAMUNIFORM1UI64VNV fnptr, GLuint program, GLint location, GLsizei count, const GLuint64EXT * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform1uiEXT(GPPROGRAMUNIFORM1UIEXT fnptr, GLuint program, GLint location, GLuint v0) { +// (*fnptr)(program, location, v0); +// } +// static void glowProgramUniform1uiv(GPPROGRAMUNIFORM1UIV fnptr, GLuint program, GLint location, GLsizei count, const GLuint * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform1uivEXT(GPPROGRAMUNIFORM1UIVEXT fnptr, GLuint program, GLint location, GLsizei count, const GLuint * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform2d(GPPROGRAMUNIFORM2D fnptr, GLuint program, GLint location, GLdouble v0, GLdouble v1) { +// (*fnptr)(program, location, v0, v1); +// } +// static void glowProgramUniform2dEXT(GPPROGRAMUNIFORM2DEXT fnptr, GLuint program, GLint location, GLdouble x, GLdouble y) { +// (*fnptr)(program, location, x, y); +// } +// static void glowProgramUniform2dv(GPPROGRAMUNIFORM2DV fnptr, GLuint program, GLint location, GLsizei count, const GLdouble * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform2dvEXT(GPPROGRAMUNIFORM2DVEXT fnptr, GLuint program, GLint location, GLsizei count, const GLdouble * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform2f(GPPROGRAMUNIFORM2F fnptr, GLuint program, GLint location, GLfloat v0, GLfloat v1) { +// (*fnptr)(program, location, v0, v1); +// } +// static void glowProgramUniform2fEXT(GPPROGRAMUNIFORM2FEXT fnptr, GLuint program, GLint location, GLfloat v0, GLfloat v1) { +// (*fnptr)(program, location, v0, v1); +// } +// static void glowProgramUniform2fv(GPPROGRAMUNIFORM2FV fnptr, GLuint program, GLint location, GLsizei count, const GLfloat * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform2fvEXT(GPPROGRAMUNIFORM2FVEXT fnptr, GLuint program, GLint location, GLsizei count, const GLfloat * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform2i(GPPROGRAMUNIFORM2I fnptr, GLuint program, GLint location, GLint v0, GLint v1) { +// (*fnptr)(program, location, v0, v1); +// } +// static void glowProgramUniform2i64ARB(GPPROGRAMUNIFORM2I64ARB fnptr, GLuint program, GLint location, GLint64 x, GLint64 y) { +// (*fnptr)(program, location, x, y); +// } +// static void glowProgramUniform2i64NV(GPPROGRAMUNIFORM2I64NV fnptr, GLuint program, GLint location, GLint64EXT x, GLint64EXT y) { +// (*fnptr)(program, location, x, y); +// } +// static void glowProgramUniform2i64vARB(GPPROGRAMUNIFORM2I64VARB fnptr, GLuint program, GLint location, GLsizei count, const GLint64 * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform2i64vNV(GPPROGRAMUNIFORM2I64VNV fnptr, GLuint program, GLint location, GLsizei count, const GLint64EXT * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform2iEXT(GPPROGRAMUNIFORM2IEXT fnptr, GLuint program, GLint location, GLint v0, GLint v1) { +// (*fnptr)(program, location, v0, v1); +// } +// static void glowProgramUniform2iv(GPPROGRAMUNIFORM2IV fnptr, GLuint program, GLint location, GLsizei count, const GLint * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform2ivEXT(GPPROGRAMUNIFORM2IVEXT fnptr, GLuint program, GLint location, GLsizei count, const GLint * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform2ui(GPPROGRAMUNIFORM2UI fnptr, GLuint program, GLint location, GLuint v0, GLuint v1) { +// (*fnptr)(program, location, v0, v1); +// } +// static void glowProgramUniform2ui64ARB(GPPROGRAMUNIFORM2UI64ARB fnptr, GLuint program, GLint location, GLuint64 x, GLuint64 y) { +// (*fnptr)(program, location, x, y); +// } +// static void glowProgramUniform2ui64NV(GPPROGRAMUNIFORM2UI64NV fnptr, GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y) { +// (*fnptr)(program, location, x, y); +// } +// static void glowProgramUniform2ui64vARB(GPPROGRAMUNIFORM2UI64VARB fnptr, GLuint program, GLint location, GLsizei count, const GLuint64 * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform2ui64vNV(GPPROGRAMUNIFORM2UI64VNV fnptr, GLuint program, GLint location, GLsizei count, const GLuint64EXT * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform2uiEXT(GPPROGRAMUNIFORM2UIEXT fnptr, GLuint program, GLint location, GLuint v0, GLuint v1) { +// (*fnptr)(program, location, v0, v1); +// } +// static void glowProgramUniform2uiv(GPPROGRAMUNIFORM2UIV fnptr, GLuint program, GLint location, GLsizei count, const GLuint * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform2uivEXT(GPPROGRAMUNIFORM2UIVEXT fnptr, GLuint program, GLint location, GLsizei count, const GLuint * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform3d(GPPROGRAMUNIFORM3D fnptr, GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2) { +// (*fnptr)(program, location, v0, v1, v2); +// } +// static void glowProgramUniform3dEXT(GPPROGRAMUNIFORM3DEXT fnptr, GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z) { +// (*fnptr)(program, location, x, y, z); +// } +// static void glowProgramUniform3dv(GPPROGRAMUNIFORM3DV fnptr, GLuint program, GLint location, GLsizei count, const GLdouble * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform3dvEXT(GPPROGRAMUNIFORM3DVEXT fnptr, GLuint program, GLint location, GLsizei count, const GLdouble * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform3f(GPPROGRAMUNIFORM3F fnptr, GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) { +// (*fnptr)(program, location, v0, v1, v2); +// } +// static void glowProgramUniform3fEXT(GPPROGRAMUNIFORM3FEXT fnptr, GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) { +// (*fnptr)(program, location, v0, v1, v2); +// } +// static void glowProgramUniform3fv(GPPROGRAMUNIFORM3FV fnptr, GLuint program, GLint location, GLsizei count, const GLfloat * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform3fvEXT(GPPROGRAMUNIFORM3FVEXT fnptr, GLuint program, GLint location, GLsizei count, const GLfloat * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform3i(GPPROGRAMUNIFORM3I fnptr, GLuint program, GLint location, GLint v0, GLint v1, GLint v2) { +// (*fnptr)(program, location, v0, v1, v2); +// } +// static void glowProgramUniform3i64ARB(GPPROGRAMUNIFORM3I64ARB fnptr, GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z) { +// (*fnptr)(program, location, x, y, z); +// } +// static void glowProgramUniform3i64NV(GPPROGRAMUNIFORM3I64NV fnptr, GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z) { +// (*fnptr)(program, location, x, y, z); +// } +// static void glowProgramUniform3i64vARB(GPPROGRAMUNIFORM3I64VARB fnptr, GLuint program, GLint location, GLsizei count, const GLint64 * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform3i64vNV(GPPROGRAMUNIFORM3I64VNV fnptr, GLuint program, GLint location, GLsizei count, const GLint64EXT * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform3iEXT(GPPROGRAMUNIFORM3IEXT fnptr, GLuint program, GLint location, GLint v0, GLint v1, GLint v2) { +// (*fnptr)(program, location, v0, v1, v2); +// } +// static void glowProgramUniform3iv(GPPROGRAMUNIFORM3IV fnptr, GLuint program, GLint location, GLsizei count, const GLint * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform3ivEXT(GPPROGRAMUNIFORM3IVEXT fnptr, GLuint program, GLint location, GLsizei count, const GLint * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform3ui(GPPROGRAMUNIFORM3UI fnptr, GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2) { +// (*fnptr)(program, location, v0, v1, v2); +// } +// static void glowProgramUniform3ui64ARB(GPPROGRAMUNIFORM3UI64ARB fnptr, GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z) { +// (*fnptr)(program, location, x, y, z); +// } +// static void glowProgramUniform3ui64NV(GPPROGRAMUNIFORM3UI64NV fnptr, GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z) { +// (*fnptr)(program, location, x, y, z); +// } +// static void glowProgramUniform3ui64vARB(GPPROGRAMUNIFORM3UI64VARB fnptr, GLuint program, GLint location, GLsizei count, const GLuint64 * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform3ui64vNV(GPPROGRAMUNIFORM3UI64VNV fnptr, GLuint program, GLint location, GLsizei count, const GLuint64EXT * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform3uiEXT(GPPROGRAMUNIFORM3UIEXT fnptr, GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2) { +// (*fnptr)(program, location, v0, v1, v2); +// } +// static void glowProgramUniform3uiv(GPPROGRAMUNIFORM3UIV fnptr, GLuint program, GLint location, GLsizei count, const GLuint * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform3uivEXT(GPPROGRAMUNIFORM3UIVEXT fnptr, GLuint program, GLint location, GLsizei count, const GLuint * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform4d(GPPROGRAMUNIFORM4D fnptr, GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3) { +// (*fnptr)(program, location, v0, v1, v2, v3); +// } +// static void glowProgramUniform4dEXT(GPPROGRAMUNIFORM4DEXT fnptr, GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w) { +// (*fnptr)(program, location, x, y, z, w); +// } +// static void glowProgramUniform4dv(GPPROGRAMUNIFORM4DV fnptr, GLuint program, GLint location, GLsizei count, const GLdouble * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform4dvEXT(GPPROGRAMUNIFORM4DVEXT fnptr, GLuint program, GLint location, GLsizei count, const GLdouble * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform4f(GPPROGRAMUNIFORM4F fnptr, GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) { +// (*fnptr)(program, location, v0, v1, v2, v3); +// } +// static void glowProgramUniform4fEXT(GPPROGRAMUNIFORM4FEXT fnptr, GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) { +// (*fnptr)(program, location, v0, v1, v2, v3); +// } +// static void glowProgramUniform4fv(GPPROGRAMUNIFORM4FV fnptr, GLuint program, GLint location, GLsizei count, const GLfloat * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform4fvEXT(GPPROGRAMUNIFORM4FVEXT fnptr, GLuint program, GLint location, GLsizei count, const GLfloat * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform4i(GPPROGRAMUNIFORM4I fnptr, GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) { +// (*fnptr)(program, location, v0, v1, v2, v3); +// } +// static void glowProgramUniform4i64ARB(GPPROGRAMUNIFORM4I64ARB fnptr, GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w) { +// (*fnptr)(program, location, x, y, z, w); +// } +// static void glowProgramUniform4i64NV(GPPROGRAMUNIFORM4I64NV fnptr, GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w) { +// (*fnptr)(program, location, x, y, z, w); +// } +// static void glowProgramUniform4i64vARB(GPPROGRAMUNIFORM4I64VARB fnptr, GLuint program, GLint location, GLsizei count, const GLint64 * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform4i64vNV(GPPROGRAMUNIFORM4I64VNV fnptr, GLuint program, GLint location, GLsizei count, const GLint64EXT * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform4iEXT(GPPROGRAMUNIFORM4IEXT fnptr, GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) { +// (*fnptr)(program, location, v0, v1, v2, v3); +// } +// static void glowProgramUniform4iv(GPPROGRAMUNIFORM4IV fnptr, GLuint program, GLint location, GLsizei count, const GLint * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform4ivEXT(GPPROGRAMUNIFORM4IVEXT fnptr, GLuint program, GLint location, GLsizei count, const GLint * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform4ui(GPPROGRAMUNIFORM4UI fnptr, GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) { +// (*fnptr)(program, location, v0, v1, v2, v3); +// } +// static void glowProgramUniform4ui64ARB(GPPROGRAMUNIFORM4UI64ARB fnptr, GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w) { +// (*fnptr)(program, location, x, y, z, w); +// } +// static void glowProgramUniform4ui64NV(GPPROGRAMUNIFORM4UI64NV fnptr, GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w) { +// (*fnptr)(program, location, x, y, z, w); +// } +// static void glowProgramUniform4ui64vARB(GPPROGRAMUNIFORM4UI64VARB fnptr, GLuint program, GLint location, GLsizei count, const GLuint64 * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform4ui64vNV(GPPROGRAMUNIFORM4UI64VNV fnptr, GLuint program, GLint location, GLsizei count, const GLuint64EXT * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform4uiEXT(GPPROGRAMUNIFORM4UIEXT fnptr, GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) { +// (*fnptr)(program, location, v0, v1, v2, v3); +// } +// static void glowProgramUniform4uiv(GPPROGRAMUNIFORM4UIV fnptr, GLuint program, GLint location, GLsizei count, const GLuint * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniform4uivEXT(GPPROGRAMUNIFORM4UIVEXT fnptr, GLuint program, GLint location, GLsizei count, const GLuint * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProgramUniformHandleui64ARB(GPPROGRAMUNIFORMHANDLEUI64ARB fnptr, GLuint program, GLint location, GLuint64 value) { +// (*fnptr)(program, location, value); +// } +// static void glowProgramUniformHandleui64NV(GPPROGRAMUNIFORMHANDLEUI64NV fnptr, GLuint program, GLint location, GLuint64 value) { +// (*fnptr)(program, location, value); +// } +// static void glowProgramUniformHandleui64vARB(GPPROGRAMUNIFORMHANDLEUI64VARB fnptr, GLuint program, GLint location, GLsizei count, const GLuint64 * values) { +// (*fnptr)(program, location, count, values); +// } +// static void glowProgramUniformHandleui64vNV(GPPROGRAMUNIFORMHANDLEUI64VNV fnptr, GLuint program, GLint location, GLsizei count, const GLuint64 * values) { +// (*fnptr)(program, location, count, values); +// } +// static void glowProgramUniformMatrix2dv(GPPROGRAMUNIFORMMATRIX2DV fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix2dvEXT(GPPROGRAMUNIFORMMATRIX2DVEXT fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix2fv(GPPROGRAMUNIFORMMATRIX2FV fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix2fvEXT(GPPROGRAMUNIFORMMATRIX2FVEXT fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix2x3dv(GPPROGRAMUNIFORMMATRIX2X3DV fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix2x3dvEXT(GPPROGRAMUNIFORMMATRIX2X3DVEXT fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix2x3fv(GPPROGRAMUNIFORMMATRIX2X3FV fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix2x3fvEXT(GPPROGRAMUNIFORMMATRIX2X3FVEXT fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix2x4dv(GPPROGRAMUNIFORMMATRIX2X4DV fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix2x4dvEXT(GPPROGRAMUNIFORMMATRIX2X4DVEXT fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix2x4fv(GPPROGRAMUNIFORMMATRIX2X4FV fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix2x4fvEXT(GPPROGRAMUNIFORMMATRIX2X4FVEXT fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix3dv(GPPROGRAMUNIFORMMATRIX3DV fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix3dvEXT(GPPROGRAMUNIFORMMATRIX3DVEXT fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix3fv(GPPROGRAMUNIFORMMATRIX3FV fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix3fvEXT(GPPROGRAMUNIFORMMATRIX3FVEXT fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix3x2dv(GPPROGRAMUNIFORMMATRIX3X2DV fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix3x2dvEXT(GPPROGRAMUNIFORMMATRIX3X2DVEXT fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix3x2fv(GPPROGRAMUNIFORMMATRIX3X2FV fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix3x2fvEXT(GPPROGRAMUNIFORMMATRIX3X2FVEXT fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix3x4dv(GPPROGRAMUNIFORMMATRIX3X4DV fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix3x4dvEXT(GPPROGRAMUNIFORMMATRIX3X4DVEXT fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix3x4fv(GPPROGRAMUNIFORMMATRIX3X4FV fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix3x4fvEXT(GPPROGRAMUNIFORMMATRIX3X4FVEXT fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix4dv(GPPROGRAMUNIFORMMATRIX4DV fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix4dvEXT(GPPROGRAMUNIFORMMATRIX4DVEXT fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix4fv(GPPROGRAMUNIFORMMATRIX4FV fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix4fvEXT(GPPROGRAMUNIFORMMATRIX4FVEXT fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix4x2dv(GPPROGRAMUNIFORMMATRIX4X2DV fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix4x2dvEXT(GPPROGRAMUNIFORMMATRIX4X2DVEXT fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix4x2fv(GPPROGRAMUNIFORMMATRIX4X2FV fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix4x2fvEXT(GPPROGRAMUNIFORMMATRIX4X2FVEXT fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix4x3dv(GPPROGRAMUNIFORMMATRIX4X3DV fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix4x3dvEXT(GPPROGRAMUNIFORMMATRIX4X3DVEXT fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix4x3fv(GPPROGRAMUNIFORMMATRIX4X3FV fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformMatrix4x3fvEXT(GPPROGRAMUNIFORMMATRIX4X3FVEXT fnptr, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(program, location, count, transpose, value); +// } +// static void glowProgramUniformui64NV(GPPROGRAMUNIFORMUI64NV fnptr, GLuint program, GLint location, GLuint64EXT value) { +// (*fnptr)(program, location, value); +// } +// static void glowProgramUniformui64vNV(GPPROGRAMUNIFORMUI64VNV fnptr, GLuint program, GLint location, GLsizei count, const GLuint64EXT * value) { +// (*fnptr)(program, location, count, value); +// } +// static void glowProvokingVertex(GPPROVOKINGVERTEX fnptr, GLenum mode) { +// (*fnptr)(mode); +// } +// static void glowPushClientAttribDefaultEXT(GPPUSHCLIENTATTRIBDEFAULTEXT fnptr, GLbitfield mask) { +// (*fnptr)(mask); +// } +// static void glowPushDebugGroup(GPPUSHDEBUGGROUP fnptr, GLenum source, GLuint id, GLsizei length, const GLchar * message) { +// (*fnptr)(source, id, length, message); +// } +// static void glowPushDebugGroupKHR(GPPUSHDEBUGGROUPKHR fnptr, GLenum source, GLuint id, GLsizei length, const GLchar * message) { +// (*fnptr)(source, id, length, message); +// } +// static void glowPushGroupMarkerEXT(GPPUSHGROUPMARKEREXT fnptr, GLsizei length, const GLchar * marker) { +// (*fnptr)(length, marker); +// } +// static void glowQueryCounter(GPQUERYCOUNTER fnptr, GLuint id, GLenum target) { +// (*fnptr)(id, target); +// } +// static void glowRasterSamplesEXT(GPRASTERSAMPLESEXT fnptr, GLuint samples, GLboolean fixedsamplelocations) { +// (*fnptr)(samples, fixedsamplelocations); +// } +// static void glowReadBuffer(GPREADBUFFER fnptr, GLenum src) { +// (*fnptr)(src); +// } +// static void glowReadPixels(GPREADPIXELS fnptr, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void * pixels) { +// (*fnptr)(x, y, width, height, format, type, pixels); +// } +// static void glowReadnPixels(GPREADNPIXELS fnptr, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void * data) { +// (*fnptr)(x, y, width, height, format, type, bufSize, data); +// } +// static void glowReadnPixelsARB(GPREADNPIXELSARB fnptr, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void * data) { +// (*fnptr)(x, y, width, height, format, type, bufSize, data); +// } +// static void glowReadnPixelsKHR(GPREADNPIXELSKHR fnptr, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void * data) { +// (*fnptr)(x, y, width, height, format, type, bufSize, data); +// } +// static void glowReleaseShaderCompiler(GPRELEASESHADERCOMPILER fnptr) { +// (*fnptr)(); +// } +// static void glowRenderbufferStorage(GPRENDERBUFFERSTORAGE fnptr, GLenum target, GLenum internalformat, GLsizei width, GLsizei height) { +// (*fnptr)(target, internalformat, width, height); +// } +// static void glowRenderbufferStorageMultisample(GPRENDERBUFFERSTORAGEMULTISAMPLE fnptr, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) { +// (*fnptr)(target, samples, internalformat, width, height); +// } +// static void glowRenderbufferStorageMultisampleCoverageNV(GPRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENV fnptr, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height) { +// (*fnptr)(target, coverageSamples, colorSamples, internalformat, width, height); +// } +// static void glowResolveDepthValuesNV(GPRESOLVEDEPTHVALUESNV fnptr) { +// (*fnptr)(); +// } +// static void glowResumeTransformFeedback(GPRESUMETRANSFORMFEEDBACK fnptr) { +// (*fnptr)(); +// } +// static void glowSampleCoverage(GPSAMPLECOVERAGE fnptr, GLfloat value, GLboolean invert) { +// (*fnptr)(value, invert); +// } +// static void glowSampleMaski(GPSAMPLEMASKI fnptr, GLuint maskNumber, GLbitfield mask) { +// (*fnptr)(maskNumber, mask); +// } +// static void glowSamplerParameterIiv(GPSAMPLERPARAMETERIIV fnptr, GLuint sampler, GLenum pname, const GLint * param) { +// (*fnptr)(sampler, pname, param); +// } +// static void glowSamplerParameterIuiv(GPSAMPLERPARAMETERIUIV fnptr, GLuint sampler, GLenum pname, const GLuint * param) { +// (*fnptr)(sampler, pname, param); +// } +// static void glowSamplerParameterf(GPSAMPLERPARAMETERF fnptr, GLuint sampler, GLenum pname, GLfloat param) { +// (*fnptr)(sampler, pname, param); +// } +// static void glowSamplerParameterfv(GPSAMPLERPARAMETERFV fnptr, GLuint sampler, GLenum pname, const GLfloat * param) { +// (*fnptr)(sampler, pname, param); +// } +// static void glowSamplerParameteri(GPSAMPLERPARAMETERI fnptr, GLuint sampler, GLenum pname, GLint param) { +// (*fnptr)(sampler, pname, param); +// } +// static void glowSamplerParameteriv(GPSAMPLERPARAMETERIV fnptr, GLuint sampler, GLenum pname, const GLint * param) { +// (*fnptr)(sampler, pname, param); +// } +// static void glowScissor(GPSCISSOR fnptr, GLint x, GLint y, GLsizei width, GLsizei height) { +// (*fnptr)(x, y, width, height); +// } +// static void glowScissorArrayv(GPSCISSORARRAYV fnptr, GLuint first, GLsizei count, const GLint * v) { +// (*fnptr)(first, count, v); +// } +// static void glowScissorIndexed(GPSCISSORINDEXED fnptr, GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height) { +// (*fnptr)(index, left, bottom, width, height); +// } +// static void glowScissorIndexedv(GPSCISSORINDEXEDV fnptr, GLuint index, const GLint * v) { +// (*fnptr)(index, v); +// } +// static void glowSecondaryColorFormatNV(GPSECONDARYCOLORFORMATNV fnptr, GLint size, GLenum type, GLsizei stride) { +// (*fnptr)(size, type, stride); +// } +// static void glowSelectPerfMonitorCountersAMD(GPSELECTPERFMONITORCOUNTERSAMD fnptr, GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint * counterList) { +// (*fnptr)(monitor, enable, group, numCounters, counterList); +// } +// static void glowShaderBinary(GPSHADERBINARY fnptr, GLsizei count, const GLuint * shaders, GLenum binaryformat, const void * binary, GLsizei length) { +// (*fnptr)(count, shaders, binaryformat, binary, length); +// } +// static void glowShaderSource(GPSHADERSOURCE fnptr, GLuint shader, GLsizei count, const GLchar *const* string, const GLint * length) { +// (*fnptr)(shader, count, string, length); +// } +// static void glowShaderStorageBlockBinding(GPSHADERSTORAGEBLOCKBINDING fnptr, GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding) { +// (*fnptr)(program, storageBlockIndex, storageBlockBinding); +// } +// static void glowSignalVkFenceNV(GPSIGNALVKFENCENV fnptr, GLuint64 vkFence) { +// (*fnptr)(vkFence); +// } +// static void glowSignalVkSemaphoreNV(GPSIGNALVKSEMAPHORENV fnptr, GLuint64 vkSemaphore) { +// (*fnptr)(vkSemaphore); +// } +// static void glowSpecializeShaderARB(GPSPECIALIZESHADERARB fnptr, GLuint shader, const GLchar * pEntryPoint, GLuint numSpecializationConstants, const GLuint * pConstantIndex, const GLuint * pConstantValue) { +// (*fnptr)(shader, pEntryPoint, numSpecializationConstants, pConstantIndex, pConstantValue); +// } +// static void glowStateCaptureNV(GPSTATECAPTURENV fnptr, GLuint state, GLenum mode) { +// (*fnptr)(state, mode); +// } +// static void glowStencilFillPathInstancedNV(GPSTENCILFILLPATHINSTANCEDNV fnptr, GLsizei numPaths, GLenum pathNameType, const void * paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat * transformValues) { +// (*fnptr)(numPaths, pathNameType, paths, pathBase, fillMode, mask, transformType, transformValues); +// } +// static void glowStencilFillPathNV(GPSTENCILFILLPATHNV fnptr, GLuint path, GLenum fillMode, GLuint mask) { +// (*fnptr)(path, fillMode, mask); +// } +// static void glowStencilFunc(GPSTENCILFUNC fnptr, GLenum func, GLint ref, GLuint mask) { +// (*fnptr)(func, ref, mask); +// } +// static void glowStencilFuncSeparate(GPSTENCILFUNCSEPARATE fnptr, GLenum face, GLenum func, GLint ref, GLuint mask) { +// (*fnptr)(face, func, ref, mask); +// } +// static void glowStencilMask(GPSTENCILMASK fnptr, GLuint mask) { +// (*fnptr)(mask); +// } +// static void glowStencilMaskSeparate(GPSTENCILMASKSEPARATE fnptr, GLenum face, GLuint mask) { +// (*fnptr)(face, mask); +// } +// static void glowStencilOp(GPSTENCILOP fnptr, GLenum fail, GLenum zfail, GLenum zpass) { +// (*fnptr)(fail, zfail, zpass); +// } +// static void glowStencilOpSeparate(GPSTENCILOPSEPARATE fnptr, GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass) { +// (*fnptr)(face, sfail, dpfail, dppass); +// } +// static void glowStencilStrokePathInstancedNV(GPSTENCILSTROKEPATHINSTANCEDNV fnptr, GLsizei numPaths, GLenum pathNameType, const void * paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat * transformValues) { +// (*fnptr)(numPaths, pathNameType, paths, pathBase, reference, mask, transformType, transformValues); +// } +// static void glowStencilStrokePathNV(GPSTENCILSTROKEPATHNV fnptr, GLuint path, GLint reference, GLuint mask) { +// (*fnptr)(path, reference, mask); +// } +// static void glowStencilThenCoverFillPathInstancedNV(GPSTENCILTHENCOVERFILLPATHINSTANCEDNV fnptr, GLsizei numPaths, GLenum pathNameType, const void * paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat * transformValues) { +// (*fnptr)(numPaths, pathNameType, paths, pathBase, fillMode, mask, coverMode, transformType, transformValues); +// } +// static void glowStencilThenCoverFillPathNV(GPSTENCILTHENCOVERFILLPATHNV fnptr, GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode) { +// (*fnptr)(path, fillMode, mask, coverMode); +// } +// static void glowStencilThenCoverStrokePathInstancedNV(GPSTENCILTHENCOVERSTROKEPATHINSTANCEDNV fnptr, GLsizei numPaths, GLenum pathNameType, const void * paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat * transformValues) { +// (*fnptr)(numPaths, pathNameType, paths, pathBase, reference, mask, coverMode, transformType, transformValues); +// } +// static void glowStencilThenCoverStrokePathNV(GPSTENCILTHENCOVERSTROKEPATHNV fnptr, GLuint path, GLint reference, GLuint mask, GLenum coverMode) { +// (*fnptr)(path, reference, mask, coverMode); +// } +// static void glowSubpixelPrecisionBiasNV(GPSUBPIXELPRECISIONBIASNV fnptr, GLuint xbits, GLuint ybits) { +// (*fnptr)(xbits, ybits); +// } +// static void glowTexBuffer(GPTEXBUFFER fnptr, GLenum target, GLenum internalformat, GLuint buffer) { +// (*fnptr)(target, internalformat, buffer); +// } +// static void glowTexBufferARB(GPTEXBUFFERARB fnptr, GLenum target, GLenum internalformat, GLuint buffer) { +// (*fnptr)(target, internalformat, buffer); +// } +// static void glowTexBufferRange(GPTEXBUFFERRANGE fnptr, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size) { +// (*fnptr)(target, internalformat, buffer, offset, size); +// } +// static void glowTexCoordFormatNV(GPTEXCOORDFORMATNV fnptr, GLint size, GLenum type, GLsizei stride) { +// (*fnptr)(size, type, stride); +// } +// static void glowTexImage1D(GPTEXIMAGE1D fnptr, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void * pixels) { +// (*fnptr)(target, level, internalformat, width, border, format, type, pixels); +// } +// static void glowTexImage2D(GPTEXIMAGE2D fnptr, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void * pixels) { +// (*fnptr)(target, level, internalformat, width, height, border, format, type, pixels); +// } +// static void glowTexImage2DMultisample(GPTEXIMAGE2DMULTISAMPLE fnptr, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) { +// (*fnptr)(target, samples, internalformat, width, height, fixedsamplelocations); +// } +// static void glowTexImage3D(GPTEXIMAGE3D fnptr, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void * pixels) { +// (*fnptr)(target, level, internalformat, width, height, depth, border, format, type, pixels); +// } +// static void glowTexImage3DMultisample(GPTEXIMAGE3DMULTISAMPLE fnptr, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) { +// (*fnptr)(target, samples, internalformat, width, height, depth, fixedsamplelocations); +// } +// static void glowTexPageCommitmentARB(GPTEXPAGECOMMITMENTARB fnptr, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit) { +// (*fnptr)(target, level, xoffset, yoffset, zoffset, width, height, depth, commit); +// } +// static void glowTexParameterIiv(GPTEXPARAMETERIIV fnptr, GLenum target, GLenum pname, const GLint * params) { +// (*fnptr)(target, pname, params); +// } +// static void glowTexParameterIuiv(GPTEXPARAMETERIUIV fnptr, GLenum target, GLenum pname, const GLuint * params) { +// (*fnptr)(target, pname, params); +// } +// static void glowTexParameterf(GPTEXPARAMETERF fnptr, GLenum target, GLenum pname, GLfloat param) { +// (*fnptr)(target, pname, param); +// } +// static void glowTexParameterfv(GPTEXPARAMETERFV fnptr, GLenum target, GLenum pname, const GLfloat * params) { +// (*fnptr)(target, pname, params); +// } +// static void glowTexParameteri(GPTEXPARAMETERI fnptr, GLenum target, GLenum pname, GLint param) { +// (*fnptr)(target, pname, param); +// } +// static void glowTexParameteriv(GPTEXPARAMETERIV fnptr, GLenum target, GLenum pname, const GLint * params) { +// (*fnptr)(target, pname, params); +// } +// static void glowTexStorage1D(GPTEXSTORAGE1D fnptr, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) { +// (*fnptr)(target, levels, internalformat, width); +// } +// static void glowTexStorage2D(GPTEXSTORAGE2D fnptr, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) { +// (*fnptr)(target, levels, internalformat, width, height); +// } +// static void glowTexStorage2DMultisample(GPTEXSTORAGE2DMULTISAMPLE fnptr, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) { +// (*fnptr)(target, samples, internalformat, width, height, fixedsamplelocations); +// } +// static void glowTexStorage3D(GPTEXSTORAGE3D fnptr, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) { +// (*fnptr)(target, levels, internalformat, width, height, depth); +// } +// static void glowTexStorage3DMultisample(GPTEXSTORAGE3DMULTISAMPLE fnptr, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) { +// (*fnptr)(target, samples, internalformat, width, height, depth, fixedsamplelocations); +// } +// static void glowTexSubImage1D(GPTEXSUBIMAGE1D fnptr, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void * pixels) { +// (*fnptr)(target, level, xoffset, width, format, type, pixels); +// } +// static void glowTexSubImage2D(GPTEXSUBIMAGE2D fnptr, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * pixels) { +// (*fnptr)(target, level, xoffset, yoffset, width, height, format, type, pixels); +// } +// static void glowTexSubImage3D(GPTEXSUBIMAGE3D fnptr, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels) { +// (*fnptr)(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); +// } +// static void glowTextureBarrier(GPTEXTUREBARRIER fnptr) { +// (*fnptr)(); +// } +// static void glowTextureBarrierNV(GPTEXTUREBARRIERNV fnptr) { +// (*fnptr)(); +// } +// static void glowTextureBuffer(GPTEXTUREBUFFER fnptr, GLuint texture, GLenum internalformat, GLuint buffer) { +// (*fnptr)(texture, internalformat, buffer); +// } +// static void glowTextureBufferEXT(GPTEXTUREBUFFEREXT fnptr, GLuint texture, GLenum target, GLenum internalformat, GLuint buffer) { +// (*fnptr)(texture, target, internalformat, buffer); +// } +// static void glowTextureBufferRange(GPTEXTUREBUFFERRANGE fnptr, GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size) { +// (*fnptr)(texture, internalformat, buffer, offset, size); +// } +// static void glowTextureBufferRangeEXT(GPTEXTUREBUFFERRANGEEXT fnptr, GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size) { +// (*fnptr)(texture, target, internalformat, buffer, offset, size); +// } +// static void glowTextureImage1DEXT(GPTEXTUREIMAGE1DEXT fnptr, GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void * pixels) { +// (*fnptr)(texture, target, level, internalformat, width, border, format, type, pixels); +// } +// static void glowTextureImage2DEXT(GPTEXTUREIMAGE2DEXT fnptr, GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void * pixels) { +// (*fnptr)(texture, target, level, internalformat, width, height, border, format, type, pixels); +// } +// static void glowTextureImage3DEXT(GPTEXTUREIMAGE3DEXT fnptr, GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void * pixels) { +// (*fnptr)(texture, target, level, internalformat, width, height, depth, border, format, type, pixels); +// } +// static void glowTexturePageCommitmentEXT(GPTEXTUREPAGECOMMITMENTEXT fnptr, GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit) { +// (*fnptr)(texture, level, xoffset, yoffset, zoffset, width, height, depth, commit); +// } +// static void glowTextureParameterIiv(GPTEXTUREPARAMETERIIV fnptr, GLuint texture, GLenum pname, const GLint * params) { +// (*fnptr)(texture, pname, params); +// } +// static void glowTextureParameterIivEXT(GPTEXTUREPARAMETERIIVEXT fnptr, GLuint texture, GLenum target, GLenum pname, const GLint * params) { +// (*fnptr)(texture, target, pname, params); +// } +// static void glowTextureParameterIuiv(GPTEXTUREPARAMETERIUIV fnptr, GLuint texture, GLenum pname, const GLuint * params) { +// (*fnptr)(texture, pname, params); +// } +// static void glowTextureParameterIuivEXT(GPTEXTUREPARAMETERIUIVEXT fnptr, GLuint texture, GLenum target, GLenum pname, const GLuint * params) { +// (*fnptr)(texture, target, pname, params); +// } +// static void glowTextureParameterf(GPTEXTUREPARAMETERF fnptr, GLuint texture, GLenum pname, GLfloat param) { +// (*fnptr)(texture, pname, param); +// } +// static void glowTextureParameterfEXT(GPTEXTUREPARAMETERFEXT fnptr, GLuint texture, GLenum target, GLenum pname, GLfloat param) { +// (*fnptr)(texture, target, pname, param); +// } +// static void glowTextureParameterfv(GPTEXTUREPARAMETERFV fnptr, GLuint texture, GLenum pname, const GLfloat * param) { +// (*fnptr)(texture, pname, param); +// } +// static void glowTextureParameterfvEXT(GPTEXTUREPARAMETERFVEXT fnptr, GLuint texture, GLenum target, GLenum pname, const GLfloat * params) { +// (*fnptr)(texture, target, pname, params); +// } +// static void glowTextureParameteri(GPTEXTUREPARAMETERI fnptr, GLuint texture, GLenum pname, GLint param) { +// (*fnptr)(texture, pname, param); +// } +// static void glowTextureParameteriEXT(GPTEXTUREPARAMETERIEXT fnptr, GLuint texture, GLenum target, GLenum pname, GLint param) { +// (*fnptr)(texture, target, pname, param); +// } +// static void glowTextureParameteriv(GPTEXTUREPARAMETERIV fnptr, GLuint texture, GLenum pname, const GLint * param) { +// (*fnptr)(texture, pname, param); +// } +// static void glowTextureParameterivEXT(GPTEXTUREPARAMETERIVEXT fnptr, GLuint texture, GLenum target, GLenum pname, const GLint * params) { +// (*fnptr)(texture, target, pname, params); +// } +// static void glowTextureRenderbufferEXT(GPTEXTURERENDERBUFFEREXT fnptr, GLuint texture, GLenum target, GLuint renderbuffer) { +// (*fnptr)(texture, target, renderbuffer); +// } +// static void glowTextureStorage1D(GPTEXTURESTORAGE1D fnptr, GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width) { +// (*fnptr)(texture, levels, internalformat, width); +// } +// static void glowTextureStorage1DEXT(GPTEXTURESTORAGE1DEXT fnptr, GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) { +// (*fnptr)(texture, target, levels, internalformat, width); +// } +// static void glowTextureStorage2D(GPTEXTURESTORAGE2D fnptr, GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) { +// (*fnptr)(texture, levels, internalformat, width, height); +// } +// static void glowTextureStorage2DEXT(GPTEXTURESTORAGE2DEXT fnptr, GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) { +// (*fnptr)(texture, target, levels, internalformat, width, height); +// } +// static void glowTextureStorage2DMultisample(GPTEXTURESTORAGE2DMULTISAMPLE fnptr, GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) { +// (*fnptr)(texture, samples, internalformat, width, height, fixedsamplelocations); +// } +// static void glowTextureStorage2DMultisampleEXT(GPTEXTURESTORAGE2DMULTISAMPLEEXT fnptr, GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) { +// (*fnptr)(texture, target, samples, internalformat, width, height, fixedsamplelocations); +// } +// static void glowTextureStorage3D(GPTEXTURESTORAGE3D fnptr, GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) { +// (*fnptr)(texture, levels, internalformat, width, height, depth); +// } +// static void glowTextureStorage3DEXT(GPTEXTURESTORAGE3DEXT fnptr, GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) { +// (*fnptr)(texture, target, levels, internalformat, width, height, depth); +// } +// static void glowTextureStorage3DMultisample(GPTEXTURESTORAGE3DMULTISAMPLE fnptr, GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) { +// (*fnptr)(texture, samples, internalformat, width, height, depth, fixedsamplelocations); +// } +// static void glowTextureStorage3DMultisampleEXT(GPTEXTURESTORAGE3DMULTISAMPLEEXT fnptr, GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) { +// (*fnptr)(texture, target, samples, internalformat, width, height, depth, fixedsamplelocations); +// } +// static void glowTextureSubImage1D(GPTEXTURESUBIMAGE1D fnptr, GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void * pixels) { +// (*fnptr)(texture, level, xoffset, width, format, type, pixels); +// } +// static void glowTextureSubImage1DEXT(GPTEXTURESUBIMAGE1DEXT fnptr, GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void * pixels) { +// (*fnptr)(texture, target, level, xoffset, width, format, type, pixels); +// } +// static void glowTextureSubImage2D(GPTEXTURESUBIMAGE2D fnptr, GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * pixels) { +// (*fnptr)(texture, level, xoffset, yoffset, width, height, format, type, pixels); +// } +// static void glowTextureSubImage2DEXT(GPTEXTURESUBIMAGE2DEXT fnptr, GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * pixels) { +// (*fnptr)(texture, target, level, xoffset, yoffset, width, height, format, type, pixels); +// } +// static void glowTextureSubImage3D(GPTEXTURESUBIMAGE3D fnptr, GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels) { +// (*fnptr)(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); +// } +// static void glowTextureSubImage3DEXT(GPTEXTURESUBIMAGE3DEXT fnptr, GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels) { +// (*fnptr)(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); +// } +// static void glowTextureView(GPTEXTUREVIEW fnptr, GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers) { +// (*fnptr)(texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers); +// } +// static void glowTransformFeedbackBufferBase(GPTRANSFORMFEEDBACKBUFFERBASE fnptr, GLuint xfb, GLuint index, GLuint buffer) { +// (*fnptr)(xfb, index, buffer); +// } +// static void glowTransformFeedbackBufferRange(GPTRANSFORMFEEDBACKBUFFERRANGE fnptr, GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) { +// (*fnptr)(xfb, index, buffer, offset, size); +// } +// static void glowTransformFeedbackVaryings(GPTRANSFORMFEEDBACKVARYINGS fnptr, GLuint program, GLsizei count, const GLchar *const* varyings, GLenum bufferMode) { +// (*fnptr)(program, count, varyings, bufferMode); +// } +// static void glowTransformPathNV(GPTRANSFORMPATHNV fnptr, GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat * transformValues) { +// (*fnptr)(resultPath, srcPath, transformType, transformValues); +// } +// static void glowUniform1d(GPUNIFORM1D fnptr, GLint location, GLdouble x) { +// (*fnptr)(location, x); +// } +// static void glowUniform1dv(GPUNIFORM1DV fnptr, GLint location, GLsizei count, const GLdouble * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform1f(GPUNIFORM1F fnptr, GLint location, GLfloat v0) { +// (*fnptr)(location, v0); +// } +// static void glowUniform1fv(GPUNIFORM1FV fnptr, GLint location, GLsizei count, const GLfloat * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform1i(GPUNIFORM1I fnptr, GLint location, GLint v0) { +// (*fnptr)(location, v0); +// } +// static void glowUniform1i64ARB(GPUNIFORM1I64ARB fnptr, GLint location, GLint64 x) { +// (*fnptr)(location, x); +// } +// static void glowUniform1i64NV(GPUNIFORM1I64NV fnptr, GLint location, GLint64EXT x) { +// (*fnptr)(location, x); +// } +// static void glowUniform1i64vARB(GPUNIFORM1I64VARB fnptr, GLint location, GLsizei count, const GLint64 * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform1i64vNV(GPUNIFORM1I64VNV fnptr, GLint location, GLsizei count, const GLint64EXT * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform1iv(GPUNIFORM1IV fnptr, GLint location, GLsizei count, const GLint * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform1ui(GPUNIFORM1UI fnptr, GLint location, GLuint v0) { +// (*fnptr)(location, v0); +// } +// static void glowUniform1ui64ARB(GPUNIFORM1UI64ARB fnptr, GLint location, GLuint64 x) { +// (*fnptr)(location, x); +// } +// static void glowUniform1ui64NV(GPUNIFORM1UI64NV fnptr, GLint location, GLuint64EXT x) { +// (*fnptr)(location, x); +// } +// static void glowUniform1ui64vARB(GPUNIFORM1UI64VARB fnptr, GLint location, GLsizei count, const GLuint64 * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform1ui64vNV(GPUNIFORM1UI64VNV fnptr, GLint location, GLsizei count, const GLuint64EXT * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform1uiv(GPUNIFORM1UIV fnptr, GLint location, GLsizei count, const GLuint * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform2d(GPUNIFORM2D fnptr, GLint location, GLdouble x, GLdouble y) { +// (*fnptr)(location, x, y); +// } +// static void glowUniform2dv(GPUNIFORM2DV fnptr, GLint location, GLsizei count, const GLdouble * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform2f(GPUNIFORM2F fnptr, GLint location, GLfloat v0, GLfloat v1) { +// (*fnptr)(location, v0, v1); +// } +// static void glowUniform2fv(GPUNIFORM2FV fnptr, GLint location, GLsizei count, const GLfloat * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform2i(GPUNIFORM2I fnptr, GLint location, GLint v0, GLint v1) { +// (*fnptr)(location, v0, v1); +// } +// static void glowUniform2i64ARB(GPUNIFORM2I64ARB fnptr, GLint location, GLint64 x, GLint64 y) { +// (*fnptr)(location, x, y); +// } +// static void glowUniform2i64NV(GPUNIFORM2I64NV fnptr, GLint location, GLint64EXT x, GLint64EXT y) { +// (*fnptr)(location, x, y); +// } +// static void glowUniform2i64vARB(GPUNIFORM2I64VARB fnptr, GLint location, GLsizei count, const GLint64 * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform2i64vNV(GPUNIFORM2I64VNV fnptr, GLint location, GLsizei count, const GLint64EXT * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform2iv(GPUNIFORM2IV fnptr, GLint location, GLsizei count, const GLint * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform2ui(GPUNIFORM2UI fnptr, GLint location, GLuint v0, GLuint v1) { +// (*fnptr)(location, v0, v1); +// } +// static void glowUniform2ui64ARB(GPUNIFORM2UI64ARB fnptr, GLint location, GLuint64 x, GLuint64 y) { +// (*fnptr)(location, x, y); +// } +// static void glowUniform2ui64NV(GPUNIFORM2UI64NV fnptr, GLint location, GLuint64EXT x, GLuint64EXT y) { +// (*fnptr)(location, x, y); +// } +// static void glowUniform2ui64vARB(GPUNIFORM2UI64VARB fnptr, GLint location, GLsizei count, const GLuint64 * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform2ui64vNV(GPUNIFORM2UI64VNV fnptr, GLint location, GLsizei count, const GLuint64EXT * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform2uiv(GPUNIFORM2UIV fnptr, GLint location, GLsizei count, const GLuint * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform3d(GPUNIFORM3D fnptr, GLint location, GLdouble x, GLdouble y, GLdouble z) { +// (*fnptr)(location, x, y, z); +// } +// static void glowUniform3dv(GPUNIFORM3DV fnptr, GLint location, GLsizei count, const GLdouble * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform3f(GPUNIFORM3F fnptr, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) { +// (*fnptr)(location, v0, v1, v2); +// } +// static void glowUniform3fv(GPUNIFORM3FV fnptr, GLint location, GLsizei count, const GLfloat * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform3i(GPUNIFORM3I fnptr, GLint location, GLint v0, GLint v1, GLint v2) { +// (*fnptr)(location, v0, v1, v2); +// } +// static void glowUniform3i64ARB(GPUNIFORM3I64ARB fnptr, GLint location, GLint64 x, GLint64 y, GLint64 z) { +// (*fnptr)(location, x, y, z); +// } +// static void glowUniform3i64NV(GPUNIFORM3I64NV fnptr, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z) { +// (*fnptr)(location, x, y, z); +// } +// static void glowUniform3i64vARB(GPUNIFORM3I64VARB fnptr, GLint location, GLsizei count, const GLint64 * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform3i64vNV(GPUNIFORM3I64VNV fnptr, GLint location, GLsizei count, const GLint64EXT * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform3iv(GPUNIFORM3IV fnptr, GLint location, GLsizei count, const GLint * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform3ui(GPUNIFORM3UI fnptr, GLint location, GLuint v0, GLuint v1, GLuint v2) { +// (*fnptr)(location, v0, v1, v2); +// } +// static void glowUniform3ui64ARB(GPUNIFORM3UI64ARB fnptr, GLint location, GLuint64 x, GLuint64 y, GLuint64 z) { +// (*fnptr)(location, x, y, z); +// } +// static void glowUniform3ui64NV(GPUNIFORM3UI64NV fnptr, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z) { +// (*fnptr)(location, x, y, z); +// } +// static void glowUniform3ui64vARB(GPUNIFORM3UI64VARB fnptr, GLint location, GLsizei count, const GLuint64 * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform3ui64vNV(GPUNIFORM3UI64VNV fnptr, GLint location, GLsizei count, const GLuint64EXT * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform3uiv(GPUNIFORM3UIV fnptr, GLint location, GLsizei count, const GLuint * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform4d(GPUNIFORM4D fnptr, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w) { +// (*fnptr)(location, x, y, z, w); +// } +// static void glowUniform4dv(GPUNIFORM4DV fnptr, GLint location, GLsizei count, const GLdouble * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform4f(GPUNIFORM4F fnptr, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) { +// (*fnptr)(location, v0, v1, v2, v3); +// } +// static void glowUniform4fv(GPUNIFORM4FV fnptr, GLint location, GLsizei count, const GLfloat * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform4i(GPUNIFORM4I fnptr, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) { +// (*fnptr)(location, v0, v1, v2, v3); +// } +// static void glowUniform4i64ARB(GPUNIFORM4I64ARB fnptr, GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w) { +// (*fnptr)(location, x, y, z, w); +// } +// static void glowUniform4i64NV(GPUNIFORM4I64NV fnptr, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w) { +// (*fnptr)(location, x, y, z, w); +// } +// static void glowUniform4i64vARB(GPUNIFORM4I64VARB fnptr, GLint location, GLsizei count, const GLint64 * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform4i64vNV(GPUNIFORM4I64VNV fnptr, GLint location, GLsizei count, const GLint64EXT * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform4iv(GPUNIFORM4IV fnptr, GLint location, GLsizei count, const GLint * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform4ui(GPUNIFORM4UI fnptr, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) { +// (*fnptr)(location, v0, v1, v2, v3); +// } +// static void glowUniform4ui64ARB(GPUNIFORM4UI64ARB fnptr, GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w) { +// (*fnptr)(location, x, y, z, w); +// } +// static void glowUniform4ui64NV(GPUNIFORM4UI64NV fnptr, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w) { +// (*fnptr)(location, x, y, z, w); +// } +// static void glowUniform4ui64vARB(GPUNIFORM4UI64VARB fnptr, GLint location, GLsizei count, const GLuint64 * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform4ui64vNV(GPUNIFORM4UI64VNV fnptr, GLint location, GLsizei count, const GLuint64EXT * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniform4uiv(GPUNIFORM4UIV fnptr, GLint location, GLsizei count, const GLuint * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniformBlockBinding(GPUNIFORMBLOCKBINDING fnptr, GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) { +// (*fnptr)(program, uniformBlockIndex, uniformBlockBinding); +// } +// static void glowUniformHandleui64ARB(GPUNIFORMHANDLEUI64ARB fnptr, GLint location, GLuint64 value) { +// (*fnptr)(location, value); +// } +// static void glowUniformHandleui64NV(GPUNIFORMHANDLEUI64NV fnptr, GLint location, GLuint64 value) { +// (*fnptr)(location, value); +// } +// static void glowUniformHandleui64vARB(GPUNIFORMHANDLEUI64VARB fnptr, GLint location, GLsizei count, const GLuint64 * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniformHandleui64vNV(GPUNIFORMHANDLEUI64VNV fnptr, GLint location, GLsizei count, const GLuint64 * value) { +// (*fnptr)(location, count, value); +// } +// static void glowUniformMatrix2dv(GPUNIFORMMATRIX2DV fnptr, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(location, count, transpose, value); +// } +// static void glowUniformMatrix2fv(GPUNIFORMMATRIX2FV fnptr, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(location, count, transpose, value); +// } +// static void glowUniformMatrix2x3dv(GPUNIFORMMATRIX2X3DV fnptr, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(location, count, transpose, value); +// } +// static void glowUniformMatrix2x3fv(GPUNIFORMMATRIX2X3FV fnptr, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(location, count, transpose, value); +// } +// static void glowUniformMatrix2x4dv(GPUNIFORMMATRIX2X4DV fnptr, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(location, count, transpose, value); +// } +// static void glowUniformMatrix2x4fv(GPUNIFORMMATRIX2X4FV fnptr, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(location, count, transpose, value); +// } +// static void glowUniformMatrix3dv(GPUNIFORMMATRIX3DV fnptr, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(location, count, transpose, value); +// } +// static void glowUniformMatrix3fv(GPUNIFORMMATRIX3FV fnptr, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(location, count, transpose, value); +// } +// static void glowUniformMatrix3x2dv(GPUNIFORMMATRIX3X2DV fnptr, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(location, count, transpose, value); +// } +// static void glowUniformMatrix3x2fv(GPUNIFORMMATRIX3X2FV fnptr, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(location, count, transpose, value); +// } +// static void glowUniformMatrix3x4dv(GPUNIFORMMATRIX3X4DV fnptr, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(location, count, transpose, value); +// } +// static void glowUniformMatrix3x4fv(GPUNIFORMMATRIX3X4FV fnptr, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(location, count, transpose, value); +// } +// static void glowUniformMatrix4dv(GPUNIFORMMATRIX4DV fnptr, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(location, count, transpose, value); +// } +// static void glowUniformMatrix4fv(GPUNIFORMMATRIX4FV fnptr, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(location, count, transpose, value); +// } +// static void glowUniformMatrix4x2dv(GPUNIFORMMATRIX4X2DV fnptr, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(location, count, transpose, value); +// } +// static void glowUniformMatrix4x2fv(GPUNIFORMMATRIX4X2FV fnptr, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(location, count, transpose, value); +// } +// static void glowUniformMatrix4x3dv(GPUNIFORMMATRIX4X3DV fnptr, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value) { +// (*fnptr)(location, count, transpose, value); +// } +// static void glowUniformMatrix4x3fv(GPUNIFORMMATRIX4X3FV fnptr, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { +// (*fnptr)(location, count, transpose, value); +// } +// static void glowUniformSubroutinesuiv(GPUNIFORMSUBROUTINESUIV fnptr, GLenum shadertype, GLsizei count, const GLuint * indices) { +// (*fnptr)(shadertype, count, indices); +// } +// static void glowUniformui64NV(GPUNIFORMUI64NV fnptr, GLint location, GLuint64EXT value) { +// (*fnptr)(location, value); +// } +// static void glowUniformui64vNV(GPUNIFORMUI64VNV fnptr, GLint location, GLsizei count, const GLuint64EXT * value) { +// (*fnptr)(location, count, value); +// } +// static GLboolean glowUnmapBuffer(GPUNMAPBUFFER fnptr, GLenum target) { +// return (*fnptr)(target); +// } +// static GLboolean glowUnmapNamedBuffer(GPUNMAPNAMEDBUFFER fnptr, GLuint buffer) { +// return (*fnptr)(buffer); +// } +// static GLboolean glowUnmapNamedBufferEXT(GPUNMAPNAMEDBUFFEREXT fnptr, GLuint buffer) { +// return (*fnptr)(buffer); +// } +// static void glowUseProgram(GPUSEPROGRAM fnptr, GLuint program) { +// (*fnptr)(program); +// } +// static void glowUseProgramStages(GPUSEPROGRAMSTAGES fnptr, GLuint pipeline, GLbitfield stages, GLuint program) { +// (*fnptr)(pipeline, stages, program); +// } +// static void glowUseProgramStagesEXT(GPUSEPROGRAMSTAGESEXT fnptr, GLuint pipeline, GLbitfield stages, GLuint program) { +// (*fnptr)(pipeline, stages, program); +// } +// static void glowUseShaderProgramEXT(GPUSESHADERPROGRAMEXT fnptr, GLenum type, GLuint program) { +// (*fnptr)(type, program); +// } +// static void glowValidateProgram(GPVALIDATEPROGRAM fnptr, GLuint program) { +// (*fnptr)(program); +// } +// static void glowValidateProgramPipeline(GPVALIDATEPROGRAMPIPELINE fnptr, GLuint pipeline) { +// (*fnptr)(pipeline); +// } +// static void glowValidateProgramPipelineEXT(GPVALIDATEPROGRAMPIPELINEEXT fnptr, GLuint pipeline) { +// (*fnptr)(pipeline); +// } +// static void glowVertexArrayAttribBinding(GPVERTEXARRAYATTRIBBINDING fnptr, GLuint vaobj, GLuint attribindex, GLuint bindingindex) { +// (*fnptr)(vaobj, attribindex, bindingindex); +// } +// static void glowVertexArrayAttribFormat(GPVERTEXARRAYATTRIBFORMAT fnptr, GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) { +// (*fnptr)(vaobj, attribindex, size, type, normalized, relativeoffset); +// } +// static void glowVertexArrayAttribIFormat(GPVERTEXARRAYATTRIBIFORMAT fnptr, GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) { +// (*fnptr)(vaobj, attribindex, size, type, relativeoffset); +// } +// static void glowVertexArrayAttribLFormat(GPVERTEXARRAYATTRIBLFORMAT fnptr, GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) { +// (*fnptr)(vaobj, attribindex, size, type, relativeoffset); +// } +// static void glowVertexArrayBindVertexBufferEXT(GPVERTEXARRAYBINDVERTEXBUFFEREXT fnptr, GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) { +// (*fnptr)(vaobj, bindingindex, buffer, offset, stride); +// } +// static void glowVertexArrayBindingDivisor(GPVERTEXARRAYBINDINGDIVISOR fnptr, GLuint vaobj, GLuint bindingindex, GLuint divisor) { +// (*fnptr)(vaobj, bindingindex, divisor); +// } +// static void glowVertexArrayColorOffsetEXT(GPVERTEXARRAYCOLOROFFSETEXT fnptr, GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset) { +// (*fnptr)(vaobj, buffer, size, type, stride, offset); +// } +// static void glowVertexArrayEdgeFlagOffsetEXT(GPVERTEXARRAYEDGEFLAGOFFSETEXT fnptr, GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset) { +// (*fnptr)(vaobj, buffer, stride, offset); +// } +// static void glowVertexArrayElementBuffer(GPVERTEXARRAYELEMENTBUFFER fnptr, GLuint vaobj, GLuint buffer) { +// (*fnptr)(vaobj, buffer); +// } +// static void glowVertexArrayFogCoordOffsetEXT(GPVERTEXARRAYFOGCOORDOFFSETEXT fnptr, GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset) { +// (*fnptr)(vaobj, buffer, type, stride, offset); +// } +// static void glowVertexArrayIndexOffsetEXT(GPVERTEXARRAYINDEXOFFSETEXT fnptr, GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset) { +// (*fnptr)(vaobj, buffer, type, stride, offset); +// } +// static void glowVertexArrayMultiTexCoordOffsetEXT(GPVERTEXARRAYMULTITEXCOORDOFFSETEXT fnptr, GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset) { +// (*fnptr)(vaobj, buffer, texunit, size, type, stride, offset); +// } +// static void glowVertexArrayNormalOffsetEXT(GPVERTEXARRAYNORMALOFFSETEXT fnptr, GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset) { +// (*fnptr)(vaobj, buffer, type, stride, offset); +// } +// static void glowVertexArraySecondaryColorOffsetEXT(GPVERTEXARRAYSECONDARYCOLOROFFSETEXT fnptr, GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset) { +// (*fnptr)(vaobj, buffer, size, type, stride, offset); +// } +// static void glowVertexArrayTexCoordOffsetEXT(GPVERTEXARRAYTEXCOORDOFFSETEXT fnptr, GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset) { +// (*fnptr)(vaobj, buffer, size, type, stride, offset); +// } +// static void glowVertexArrayVertexAttribBindingEXT(GPVERTEXARRAYVERTEXATTRIBBINDINGEXT fnptr, GLuint vaobj, GLuint attribindex, GLuint bindingindex) { +// (*fnptr)(vaobj, attribindex, bindingindex); +// } +// static void glowVertexArrayVertexAttribDivisorEXT(GPVERTEXARRAYVERTEXATTRIBDIVISOREXT fnptr, GLuint vaobj, GLuint index, GLuint divisor) { +// (*fnptr)(vaobj, index, divisor); +// } +// static void glowVertexArrayVertexAttribFormatEXT(GPVERTEXARRAYVERTEXATTRIBFORMATEXT fnptr, GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) { +// (*fnptr)(vaobj, attribindex, size, type, normalized, relativeoffset); +// } +// static void glowVertexArrayVertexAttribIFormatEXT(GPVERTEXARRAYVERTEXATTRIBIFORMATEXT fnptr, GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) { +// (*fnptr)(vaobj, attribindex, size, type, relativeoffset); +// } +// static void glowVertexArrayVertexAttribIOffsetEXT(GPVERTEXARRAYVERTEXATTRIBIOFFSETEXT fnptr, GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset) { +// (*fnptr)(vaobj, buffer, index, size, type, stride, offset); +// } +// static void glowVertexArrayVertexAttribLFormatEXT(GPVERTEXARRAYVERTEXATTRIBLFORMATEXT fnptr, GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) { +// (*fnptr)(vaobj, attribindex, size, type, relativeoffset); +// } +// static void glowVertexArrayVertexAttribLOffsetEXT(GPVERTEXARRAYVERTEXATTRIBLOFFSETEXT fnptr, GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset) { +// (*fnptr)(vaobj, buffer, index, size, type, stride, offset); +// } +// static void glowVertexArrayVertexAttribOffsetEXT(GPVERTEXARRAYVERTEXATTRIBOFFSETEXT fnptr, GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset) { +// (*fnptr)(vaobj, buffer, index, size, type, normalized, stride, offset); +// } +// static void glowVertexArrayVertexBindingDivisorEXT(GPVERTEXARRAYVERTEXBINDINGDIVISOREXT fnptr, GLuint vaobj, GLuint bindingindex, GLuint divisor) { +// (*fnptr)(vaobj, bindingindex, divisor); +// } +// static void glowVertexArrayVertexBuffer(GPVERTEXARRAYVERTEXBUFFER fnptr, GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) { +// (*fnptr)(vaobj, bindingindex, buffer, offset, stride); +// } +// static void glowVertexArrayVertexBuffers(GPVERTEXARRAYVERTEXBUFFERS fnptr, GLuint vaobj, GLuint first, GLsizei count, const GLuint * buffers, const GLintptr * offsets, const GLsizei * strides) { +// (*fnptr)(vaobj, first, count, buffers, offsets, strides); +// } +// static void glowVertexArrayVertexOffsetEXT(GPVERTEXARRAYVERTEXOFFSETEXT fnptr, GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset) { +// (*fnptr)(vaobj, buffer, size, type, stride, offset); +// } +// static void glowVertexAttrib1d(GPVERTEXATTRIB1D fnptr, GLuint index, GLdouble x) { +// (*fnptr)(index, x); +// } +// static void glowVertexAttrib1dv(GPVERTEXATTRIB1DV fnptr, GLuint index, const GLdouble * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttrib1f(GPVERTEXATTRIB1F fnptr, GLuint index, GLfloat x) { +// (*fnptr)(index, x); +// } +// static void glowVertexAttrib1fv(GPVERTEXATTRIB1FV fnptr, GLuint index, const GLfloat * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttrib1s(GPVERTEXATTRIB1S fnptr, GLuint index, GLshort x) { +// (*fnptr)(index, x); +// } +// static void glowVertexAttrib1sv(GPVERTEXATTRIB1SV fnptr, GLuint index, const GLshort * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttrib2d(GPVERTEXATTRIB2D fnptr, GLuint index, GLdouble x, GLdouble y) { +// (*fnptr)(index, x, y); +// } +// static void glowVertexAttrib2dv(GPVERTEXATTRIB2DV fnptr, GLuint index, const GLdouble * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttrib2f(GPVERTEXATTRIB2F fnptr, GLuint index, GLfloat x, GLfloat y) { +// (*fnptr)(index, x, y); +// } +// static void glowVertexAttrib2fv(GPVERTEXATTRIB2FV fnptr, GLuint index, const GLfloat * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttrib2s(GPVERTEXATTRIB2S fnptr, GLuint index, GLshort x, GLshort y) { +// (*fnptr)(index, x, y); +// } +// static void glowVertexAttrib2sv(GPVERTEXATTRIB2SV fnptr, GLuint index, const GLshort * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttrib3d(GPVERTEXATTRIB3D fnptr, GLuint index, GLdouble x, GLdouble y, GLdouble z) { +// (*fnptr)(index, x, y, z); +// } +// static void glowVertexAttrib3dv(GPVERTEXATTRIB3DV fnptr, GLuint index, const GLdouble * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttrib3f(GPVERTEXATTRIB3F fnptr, GLuint index, GLfloat x, GLfloat y, GLfloat z) { +// (*fnptr)(index, x, y, z); +// } +// static void glowVertexAttrib3fv(GPVERTEXATTRIB3FV fnptr, GLuint index, const GLfloat * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttrib3s(GPVERTEXATTRIB3S fnptr, GLuint index, GLshort x, GLshort y, GLshort z) { +// (*fnptr)(index, x, y, z); +// } +// static void glowVertexAttrib3sv(GPVERTEXATTRIB3SV fnptr, GLuint index, const GLshort * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttrib4Nbv(GPVERTEXATTRIB4NBV fnptr, GLuint index, const GLbyte * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttrib4Niv(GPVERTEXATTRIB4NIV fnptr, GLuint index, const GLint * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttrib4Nsv(GPVERTEXATTRIB4NSV fnptr, GLuint index, const GLshort * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttrib4Nub(GPVERTEXATTRIB4NUB fnptr, GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) { +// (*fnptr)(index, x, y, z, w); +// } +// static void glowVertexAttrib4Nubv(GPVERTEXATTRIB4NUBV fnptr, GLuint index, const GLubyte * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttrib4Nuiv(GPVERTEXATTRIB4NUIV fnptr, GLuint index, const GLuint * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttrib4Nusv(GPVERTEXATTRIB4NUSV fnptr, GLuint index, const GLushort * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttrib4bv(GPVERTEXATTRIB4BV fnptr, GLuint index, const GLbyte * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttrib4d(GPVERTEXATTRIB4D fnptr, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) { +// (*fnptr)(index, x, y, z, w); +// } +// static void glowVertexAttrib4dv(GPVERTEXATTRIB4DV fnptr, GLuint index, const GLdouble * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttrib4f(GPVERTEXATTRIB4F fnptr, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { +// (*fnptr)(index, x, y, z, w); +// } +// static void glowVertexAttrib4fv(GPVERTEXATTRIB4FV fnptr, GLuint index, const GLfloat * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttrib4iv(GPVERTEXATTRIB4IV fnptr, GLuint index, const GLint * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttrib4s(GPVERTEXATTRIB4S fnptr, GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) { +// (*fnptr)(index, x, y, z, w); +// } +// static void glowVertexAttrib4sv(GPVERTEXATTRIB4SV fnptr, GLuint index, const GLshort * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttrib4ubv(GPVERTEXATTRIB4UBV fnptr, GLuint index, const GLubyte * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttrib4uiv(GPVERTEXATTRIB4UIV fnptr, GLuint index, const GLuint * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttrib4usv(GPVERTEXATTRIB4USV fnptr, GLuint index, const GLushort * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttribBinding(GPVERTEXATTRIBBINDING fnptr, GLuint attribindex, GLuint bindingindex) { +// (*fnptr)(attribindex, bindingindex); +// } +// static void glowVertexAttribDivisor(GPVERTEXATTRIBDIVISOR fnptr, GLuint index, GLuint divisor) { +// (*fnptr)(index, divisor); +// } +// static void glowVertexAttribDivisorARB(GPVERTEXATTRIBDIVISORARB fnptr, GLuint index, GLuint divisor) { +// (*fnptr)(index, divisor); +// } +// static void glowVertexAttribFormat(GPVERTEXATTRIBFORMAT fnptr, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) { +// (*fnptr)(attribindex, size, type, normalized, relativeoffset); +// } +// static void glowVertexAttribFormatNV(GPVERTEXATTRIBFORMATNV fnptr, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride) { +// (*fnptr)(index, size, type, normalized, stride); +// } +// static void glowVertexAttribI1i(GPVERTEXATTRIBI1I fnptr, GLuint index, GLint x) { +// (*fnptr)(index, x); +// } +// static void glowVertexAttribI1iv(GPVERTEXATTRIBI1IV fnptr, GLuint index, const GLint * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttribI1ui(GPVERTEXATTRIBI1UI fnptr, GLuint index, GLuint x) { +// (*fnptr)(index, x); +// } +// static void glowVertexAttribI1uiv(GPVERTEXATTRIBI1UIV fnptr, GLuint index, const GLuint * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttribI2i(GPVERTEXATTRIBI2I fnptr, GLuint index, GLint x, GLint y) { +// (*fnptr)(index, x, y); +// } +// static void glowVertexAttribI2iv(GPVERTEXATTRIBI2IV fnptr, GLuint index, const GLint * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttribI2ui(GPVERTEXATTRIBI2UI fnptr, GLuint index, GLuint x, GLuint y) { +// (*fnptr)(index, x, y); +// } +// static void glowVertexAttribI2uiv(GPVERTEXATTRIBI2UIV fnptr, GLuint index, const GLuint * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttribI3i(GPVERTEXATTRIBI3I fnptr, GLuint index, GLint x, GLint y, GLint z) { +// (*fnptr)(index, x, y, z); +// } +// static void glowVertexAttribI3iv(GPVERTEXATTRIBI3IV fnptr, GLuint index, const GLint * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttribI3ui(GPVERTEXATTRIBI3UI fnptr, GLuint index, GLuint x, GLuint y, GLuint z) { +// (*fnptr)(index, x, y, z); +// } +// static void glowVertexAttribI3uiv(GPVERTEXATTRIBI3UIV fnptr, GLuint index, const GLuint * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttribI4bv(GPVERTEXATTRIBI4BV fnptr, GLuint index, const GLbyte * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttribI4i(GPVERTEXATTRIBI4I fnptr, GLuint index, GLint x, GLint y, GLint z, GLint w) { +// (*fnptr)(index, x, y, z, w); +// } +// static void glowVertexAttribI4iv(GPVERTEXATTRIBI4IV fnptr, GLuint index, const GLint * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttribI4sv(GPVERTEXATTRIBI4SV fnptr, GLuint index, const GLshort * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttribI4ubv(GPVERTEXATTRIBI4UBV fnptr, GLuint index, const GLubyte * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttribI4ui(GPVERTEXATTRIBI4UI fnptr, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) { +// (*fnptr)(index, x, y, z, w); +// } +// static void glowVertexAttribI4uiv(GPVERTEXATTRIBI4UIV fnptr, GLuint index, const GLuint * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttribI4usv(GPVERTEXATTRIBI4USV fnptr, GLuint index, const GLushort * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttribIFormat(GPVERTEXATTRIBIFORMAT fnptr, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) { +// (*fnptr)(attribindex, size, type, relativeoffset); +// } +// static void glowVertexAttribIFormatNV(GPVERTEXATTRIBIFORMATNV fnptr, GLuint index, GLint size, GLenum type, GLsizei stride) { +// (*fnptr)(index, size, type, stride); +// } +// static void glowVertexAttribIPointer(GPVERTEXATTRIBIPOINTER fnptr, GLuint index, GLint size, GLenum type, GLsizei stride, const void * pointer) { +// (*fnptr)(index, size, type, stride, pointer); +// } +// static void glowVertexAttribL1d(GPVERTEXATTRIBL1D fnptr, GLuint index, GLdouble x) { +// (*fnptr)(index, x); +// } +// static void glowVertexAttribL1dv(GPVERTEXATTRIBL1DV fnptr, GLuint index, const GLdouble * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttribL1i64NV(GPVERTEXATTRIBL1I64NV fnptr, GLuint index, GLint64EXT x) { +// (*fnptr)(index, x); +// } +// static void glowVertexAttribL1i64vNV(GPVERTEXATTRIBL1I64VNV fnptr, GLuint index, const GLint64EXT * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttribL1ui64ARB(GPVERTEXATTRIBL1UI64ARB fnptr, GLuint index, GLuint64EXT x) { +// (*fnptr)(index, x); +// } +// static void glowVertexAttribL1ui64NV(GPVERTEXATTRIBL1UI64NV fnptr, GLuint index, GLuint64EXT x) { +// (*fnptr)(index, x); +// } +// static void glowVertexAttribL1ui64vARB(GPVERTEXATTRIBL1UI64VARB fnptr, GLuint index, const GLuint64EXT * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttribL1ui64vNV(GPVERTEXATTRIBL1UI64VNV fnptr, GLuint index, const GLuint64EXT * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttribL2d(GPVERTEXATTRIBL2D fnptr, GLuint index, GLdouble x, GLdouble y) { +// (*fnptr)(index, x, y); +// } +// static void glowVertexAttribL2dv(GPVERTEXATTRIBL2DV fnptr, GLuint index, const GLdouble * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttribL2i64NV(GPVERTEXATTRIBL2I64NV fnptr, GLuint index, GLint64EXT x, GLint64EXT y) { +// (*fnptr)(index, x, y); +// } +// static void glowVertexAttribL2i64vNV(GPVERTEXATTRIBL2I64VNV fnptr, GLuint index, const GLint64EXT * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttribL2ui64NV(GPVERTEXATTRIBL2UI64NV fnptr, GLuint index, GLuint64EXT x, GLuint64EXT y) { +// (*fnptr)(index, x, y); +// } +// static void glowVertexAttribL2ui64vNV(GPVERTEXATTRIBL2UI64VNV fnptr, GLuint index, const GLuint64EXT * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttribL3d(GPVERTEXATTRIBL3D fnptr, GLuint index, GLdouble x, GLdouble y, GLdouble z) { +// (*fnptr)(index, x, y, z); +// } +// static void glowVertexAttribL3dv(GPVERTEXATTRIBL3DV fnptr, GLuint index, const GLdouble * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttribL3i64NV(GPVERTEXATTRIBL3I64NV fnptr, GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z) { +// (*fnptr)(index, x, y, z); +// } +// static void glowVertexAttribL3i64vNV(GPVERTEXATTRIBL3I64VNV fnptr, GLuint index, const GLint64EXT * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttribL3ui64NV(GPVERTEXATTRIBL3UI64NV fnptr, GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z) { +// (*fnptr)(index, x, y, z); +// } +// static void glowVertexAttribL3ui64vNV(GPVERTEXATTRIBL3UI64VNV fnptr, GLuint index, const GLuint64EXT * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttribL4d(GPVERTEXATTRIBL4D fnptr, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) { +// (*fnptr)(index, x, y, z, w); +// } +// static void glowVertexAttribL4dv(GPVERTEXATTRIBL4DV fnptr, GLuint index, const GLdouble * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttribL4i64NV(GPVERTEXATTRIBL4I64NV fnptr, GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w) { +// (*fnptr)(index, x, y, z, w); +// } +// static void glowVertexAttribL4i64vNV(GPVERTEXATTRIBL4I64VNV fnptr, GLuint index, const GLint64EXT * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttribL4ui64NV(GPVERTEXATTRIBL4UI64NV fnptr, GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w) { +// (*fnptr)(index, x, y, z, w); +// } +// static void glowVertexAttribL4ui64vNV(GPVERTEXATTRIBL4UI64VNV fnptr, GLuint index, const GLuint64EXT * v) { +// (*fnptr)(index, v); +// } +// static void glowVertexAttribLFormat(GPVERTEXATTRIBLFORMAT fnptr, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) { +// (*fnptr)(attribindex, size, type, relativeoffset); +// } +// static void glowVertexAttribLFormatNV(GPVERTEXATTRIBLFORMATNV fnptr, GLuint index, GLint size, GLenum type, GLsizei stride) { +// (*fnptr)(index, size, type, stride); +// } +// static void glowVertexAttribLPointer(GPVERTEXATTRIBLPOINTER fnptr, GLuint index, GLint size, GLenum type, GLsizei stride, const void * pointer) { +// (*fnptr)(index, size, type, stride, pointer); +// } +// static void glowVertexAttribP1ui(GPVERTEXATTRIBP1UI fnptr, GLuint index, GLenum type, GLboolean normalized, GLuint value) { +// (*fnptr)(index, type, normalized, value); +// } +// static void glowVertexAttribP1uiv(GPVERTEXATTRIBP1UIV fnptr, GLuint index, GLenum type, GLboolean normalized, const GLuint * value) { +// (*fnptr)(index, type, normalized, value); +// } +// static void glowVertexAttribP2ui(GPVERTEXATTRIBP2UI fnptr, GLuint index, GLenum type, GLboolean normalized, GLuint value) { +// (*fnptr)(index, type, normalized, value); +// } +// static void glowVertexAttribP2uiv(GPVERTEXATTRIBP2UIV fnptr, GLuint index, GLenum type, GLboolean normalized, const GLuint * value) { +// (*fnptr)(index, type, normalized, value); +// } +// static void glowVertexAttribP3ui(GPVERTEXATTRIBP3UI fnptr, GLuint index, GLenum type, GLboolean normalized, GLuint value) { +// (*fnptr)(index, type, normalized, value); +// } +// static void glowVertexAttribP3uiv(GPVERTEXATTRIBP3UIV fnptr, GLuint index, GLenum type, GLboolean normalized, const GLuint * value) { +// (*fnptr)(index, type, normalized, value); +// } +// static void glowVertexAttribP4ui(GPVERTEXATTRIBP4UI fnptr, GLuint index, GLenum type, GLboolean normalized, GLuint value) { +// (*fnptr)(index, type, normalized, value); +// } +// static void glowVertexAttribP4uiv(GPVERTEXATTRIBP4UIV fnptr, GLuint index, GLenum type, GLboolean normalized, const GLuint * value) { +// (*fnptr)(index, type, normalized, value); +// } +// static void glowVertexAttribPointer(GPVERTEXATTRIBPOINTER fnptr, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void * pointer) { +// (*fnptr)(index, size, type, normalized, stride, pointer); +// } +// static void glowVertexBindingDivisor(GPVERTEXBINDINGDIVISOR fnptr, GLuint bindingindex, GLuint divisor) { +// (*fnptr)(bindingindex, divisor); +// } +// static void glowVertexFormatNV(GPVERTEXFORMATNV fnptr, GLint size, GLenum type, GLsizei stride) { +// (*fnptr)(size, type, stride); +// } +// static void glowViewport(GPVIEWPORT fnptr, GLint x, GLint y, GLsizei width, GLsizei height) { +// (*fnptr)(x, y, width, height); +// } +// static void glowViewportArrayv(GPVIEWPORTARRAYV fnptr, GLuint first, GLsizei count, const GLfloat * v) { +// (*fnptr)(first, count, v); +// } +// static void glowViewportIndexedf(GPVIEWPORTINDEXEDF fnptr, GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h) { +// (*fnptr)(index, x, y, w, h); +// } +// static void glowViewportIndexedfv(GPVIEWPORTINDEXEDFV fnptr, GLuint index, const GLfloat * v) { +// (*fnptr)(index, v); +// } +// static void glowViewportPositionWScaleNV(GPVIEWPORTPOSITIONWSCALENV fnptr, GLuint index, GLfloat xcoeff, GLfloat ycoeff) { +// (*fnptr)(index, xcoeff, ycoeff); +// } +// static void glowViewportSwizzleNV(GPVIEWPORTSWIZZLENV fnptr, GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, GLenum swizzlew) { +// (*fnptr)(index, swizzlex, swizzley, swizzlez, swizzlew); +// } +// static void glowWaitSync(GPWAITSYNC fnptr, GLsync sync, GLbitfield flags, GLuint64 timeout) { +// (*fnptr)(sync, flags, timeout); +// } +// static void glowWaitVkSemaphoreNV(GPWAITVKSEMAPHORENV fnptr, GLuint64 vkSemaphore) { +// (*fnptr)(vkSemaphore); +// } +// static void glowWeightPathsNV(GPWEIGHTPATHSNV fnptr, GLuint resultPath, GLsizei numPaths, const GLuint * paths, const GLfloat * weights) { +// (*fnptr)(resultPath, numPaths, paths, weights); +// } +// static void glowWindowRectanglesEXT(GPWINDOWRECTANGLESEXT fnptr, GLenum mode, GLsizei count, const GLint * box) { +// (*fnptr)(mode, count, box); +// } +import "C" +import ( + "errors" + "unsafe" +) + +const ( + ACCUM_ADJACENT_PAIRS_NV = 0x90AD + ACTIVE_ATOMIC_COUNTER_BUFFERS = 0x92D9 + ACTIVE_ATTRIBUTES = 0x8B89 + ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A + ACTIVE_PROGRAM = 0x8259 + ACTIVE_PROGRAM_EXT = 0x8B8D + ACTIVE_RESOURCES = 0x92F5 + ACTIVE_SUBROUTINES = 0x8DE5 + ACTIVE_SUBROUTINE_MAX_LENGTH = 0x8E48 + ACTIVE_SUBROUTINE_UNIFORMS = 0x8DE6 + ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS = 0x8E47 + ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH = 0x8E49 + ACTIVE_TEXTURE = 0x84E0 + ACTIVE_UNIFORMS = 0x8B86 + ACTIVE_UNIFORM_BLOCKS = 0x8A36 + ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = 0x8A35 + ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87 + ACTIVE_VARIABLES = 0x9305 + ADJACENT_PAIRS_NV = 0x90AE + AFFINE_2D_NV = 0x9092 + AFFINE_3D_NV = 0x9094 + ALIASED_LINE_WIDTH_RANGE = 0x846E + ALL_BARRIER_BITS = 0xFFFFFFFF + ALL_SHADER_BITS = 0xFFFFFFFF + ALL_SHADER_BITS_EXT = 0xFFFFFFFF + ALPHA = 0x1906 + ALPHA_REF_COMMAND_NV = 0x000F + ALREADY_SIGNALED = 0x911A + ALWAYS = 0x0207 + AND = 0x1501 + AND_INVERTED = 0x1504 + AND_REVERSE = 0x1502 + ANY_SAMPLES_PASSED = 0x8C2F + ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8D6A + ARC_TO_NV = 0xFE + ARRAY_BUFFER = 0x8892 + ARRAY_BUFFER_BINDING = 0x8894 + ARRAY_SIZE = 0x92FB + ARRAY_STRIDE = 0x92FE + ATOMIC_COUNTER_BARRIER_BIT = 0x00001000 + ATOMIC_COUNTER_BUFFER = 0x92C0 + ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS = 0x92C5 + ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES = 0x92C6 + ATOMIC_COUNTER_BUFFER_BINDING = 0x92C1 + ATOMIC_COUNTER_BUFFER_DATA_SIZE = 0x92C4 + ATOMIC_COUNTER_BUFFER_INDEX = 0x9301 + ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER = 0x90ED + ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER = 0x92CB + ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER = 0x92CA + ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER = 0x92C8 + ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x92C9 + ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER = 0x92C7 + ATOMIC_COUNTER_BUFFER_SIZE = 0x92C3 + ATOMIC_COUNTER_BUFFER_START = 0x92C2 + ATTACHED_SHADERS = 0x8B85 + ATTRIBUTE_ADDRESS_COMMAND_NV = 0x0009 + AUTO_GENERATE_MIPMAP = 0x8295 + BACK = 0x0405 + BACK_LEFT = 0x0402 + BACK_RIGHT = 0x0403 + BEVEL_NV = 0x90A6 + BGR = 0x80E0 + BGRA = 0x80E1 + BGRA_INTEGER = 0x8D9B + BGR_INTEGER = 0x8D9A + BLACKHOLE_RENDER_INTEL = 0x83FC + BLEND = 0x0BE2 + BLEND_ADVANCED_COHERENT_KHR = 0x9285 + BLEND_ADVANCED_COHERENT_NV = 0x9285 + BLEND_COLOR = 0x8005 + BLEND_COLOR_COMMAND_NV = 0x000B + BLEND_DST = 0x0BE0 + BLEND_DST_ALPHA = 0x80CA + BLEND_DST_RGB = 0x80C8 + BLEND_EQUATION = 0x8009 + BLEND_EQUATION_ALPHA = 0x883D + BLEND_EQUATION_RGB = 0x8009 + BLEND_OVERLAP_NV = 0x9281 + BLEND_PREMULTIPLIED_SRC_NV = 0x9280 + BLEND_SRC = 0x0BE1 + BLEND_SRC_ALPHA = 0x80CB + BLEND_SRC_RGB = 0x80C9 + BLOCK_INDEX = 0x92FD + BLUE = 0x1905 + BLUE_INTEGER = 0x8D96 + BLUE_NV = 0x1905 + BOLD_BIT_NV = 0x01 + BOOL = 0x8B56 + BOOL_VEC2 = 0x8B57 + BOOL_VEC3 = 0x8B58 + BOOL_VEC4 = 0x8B59 + BOUNDING_BOX_NV = 0x908D + BOUNDING_BOX_OF_BOUNDING_BOXES_NV = 0x909C + BUFFER = 0x82E0 + BUFFER_ACCESS = 0x88BB + BUFFER_ACCESS_FLAGS = 0x911F + BUFFER_BINDING = 0x9302 + BUFFER_DATA_SIZE = 0x9303 + BUFFER_GPU_ADDRESS_NV = 0x8F1D + BUFFER_IMMUTABLE_STORAGE = 0x821F + BUFFER_KHR = 0x82E0 + BUFFER_MAPPED = 0x88BC + BUFFER_MAP_LENGTH = 0x9120 + BUFFER_MAP_OFFSET = 0x9121 + BUFFER_MAP_POINTER = 0x88BD + BUFFER_OBJECT_EXT = 0x9151 + BUFFER_SIZE = 0x8764 + BUFFER_STORAGE_FLAGS = 0x8220 + BUFFER_UPDATE_BARRIER_BIT = 0x00000200 + BUFFER_USAGE = 0x8765 + BUFFER_VARIABLE = 0x92E5 + BYTE = 0x1400 + CAVEAT_SUPPORT = 0x82B8 + CCW = 0x0901 + CIRCULAR_CCW_ARC_TO_NV = 0xF8 + CIRCULAR_CW_ARC_TO_NV = 0xFA + CIRCULAR_TANGENT_ARC_TO_NV = 0xFC + CLAMP_READ_COLOR = 0x891C + CLAMP_TO_BORDER = 0x812D + CLAMP_TO_BORDER_ARB = 0x812D + CLAMP_TO_EDGE = 0x812F + CLEAR = 0x1500 + CLEAR_BUFFER = 0x82B4 + CLEAR_TEXTURE = 0x9365 + CLIENT_MAPPED_BUFFER_BARRIER_BIT = 0x00004000 + CLIENT_STORAGE_BIT = 0x0200 + CLIPPING_INPUT_PRIMITIVES_ARB = 0x82F6 + CLIPPING_OUTPUT_PRIMITIVES_ARB = 0x82F7 + CLIP_DEPTH_MODE = 0x935D + CLIP_DISTANCE0 = 0x3000 + CLIP_DISTANCE1 = 0x3001 + CLIP_DISTANCE2 = 0x3002 + CLIP_DISTANCE3 = 0x3003 + CLIP_DISTANCE4 = 0x3004 + CLIP_DISTANCE5 = 0x3005 + CLIP_DISTANCE6 = 0x3006 + CLIP_DISTANCE7 = 0x3007 + CLIP_ORIGIN = 0x935C + CLOSE_PATH_NV = 0x00 + COLOR = 0x1800 + COLORBURN_KHR = 0x929A + COLORBURN_NV = 0x929A + COLORDODGE_KHR = 0x9299 + COLORDODGE_NV = 0x9299 + COLOR_ARRAY_ADDRESS_NV = 0x8F23 + COLOR_ARRAY_LENGTH_NV = 0x8F2D + COLOR_ATTACHMENT0 = 0x8CE0 + COLOR_ATTACHMENT1 = 0x8CE1 + COLOR_ATTACHMENT10 = 0x8CEA + COLOR_ATTACHMENT11 = 0x8CEB + COLOR_ATTACHMENT12 = 0x8CEC + COLOR_ATTACHMENT13 = 0x8CED + COLOR_ATTACHMENT14 = 0x8CEE + COLOR_ATTACHMENT15 = 0x8CEF + COLOR_ATTACHMENT16 = 0x8CF0 + COLOR_ATTACHMENT17 = 0x8CF1 + COLOR_ATTACHMENT18 = 0x8CF2 + COLOR_ATTACHMENT19 = 0x8CF3 + COLOR_ATTACHMENT2 = 0x8CE2 + COLOR_ATTACHMENT20 = 0x8CF4 + COLOR_ATTACHMENT21 = 0x8CF5 + COLOR_ATTACHMENT22 = 0x8CF6 + COLOR_ATTACHMENT23 = 0x8CF7 + COLOR_ATTACHMENT24 = 0x8CF8 + COLOR_ATTACHMENT25 = 0x8CF9 + COLOR_ATTACHMENT26 = 0x8CFA + COLOR_ATTACHMENT27 = 0x8CFB + COLOR_ATTACHMENT28 = 0x8CFC + COLOR_ATTACHMENT29 = 0x8CFD + COLOR_ATTACHMENT3 = 0x8CE3 + COLOR_ATTACHMENT30 = 0x8CFE + COLOR_ATTACHMENT31 = 0x8CFF + COLOR_ATTACHMENT4 = 0x8CE4 + COLOR_ATTACHMENT5 = 0x8CE5 + COLOR_ATTACHMENT6 = 0x8CE6 + COLOR_ATTACHMENT7 = 0x8CE7 + COLOR_ATTACHMENT8 = 0x8CE8 + COLOR_ATTACHMENT9 = 0x8CE9 + COLOR_BUFFER_BIT = 0x00004000 + COLOR_CLEAR_VALUE = 0x0C22 + COLOR_COMPONENTS = 0x8283 + COLOR_ENCODING = 0x8296 + COLOR_LOGIC_OP = 0x0BF2 + COLOR_RENDERABLE = 0x8286 + COLOR_SAMPLES_NV = 0x8E20 + COLOR_WRITEMASK = 0x0C23 + COMMAND_BARRIER_BIT = 0x00000040 + COMPARE_REF_TO_TEXTURE = 0x884E + COMPATIBLE_SUBROUTINES = 0x8E4B + COMPILE_STATUS = 0x8B81 + COMPLETION_STATUS_ARB = 0x91B1 + COMPLETION_STATUS_KHR = 0x91B1 + COMPRESSED_R11_EAC = 0x9270 + COMPRESSED_RED = 0x8225 + COMPRESSED_RED_RGTC1 = 0x8DBB + COMPRESSED_RG = 0x8226 + COMPRESSED_RG11_EAC = 0x9272 + COMPRESSED_RGB = 0x84ED + COMPRESSED_RGB8_ETC2 = 0x9274 + COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276 + COMPRESSED_RGBA = 0x84EE + COMPRESSED_RGBA8_ETC2_EAC = 0x9278 + COMPRESSED_RGBA_ASTC_10x10_KHR = 0x93BB + COMPRESSED_RGBA_ASTC_10x5_KHR = 0x93B8 + COMPRESSED_RGBA_ASTC_10x6_KHR = 0x93B9 + COMPRESSED_RGBA_ASTC_10x8_KHR = 0x93BA + COMPRESSED_RGBA_ASTC_12x10_KHR = 0x93BC + COMPRESSED_RGBA_ASTC_12x12_KHR = 0x93BD + COMPRESSED_RGBA_ASTC_4x4_KHR = 0x93B0 + COMPRESSED_RGBA_ASTC_5x4_KHR = 0x93B1 + COMPRESSED_RGBA_ASTC_5x5_KHR = 0x93B2 + COMPRESSED_RGBA_ASTC_6x5_KHR = 0x93B3 + COMPRESSED_RGBA_ASTC_6x6_KHR = 0x93B4 + COMPRESSED_RGBA_ASTC_8x5_KHR = 0x93B5 + COMPRESSED_RGBA_ASTC_8x6_KHR = 0x93B6 + COMPRESSED_RGBA_ASTC_8x8_KHR = 0x93B7 + COMPRESSED_RGBA_BPTC_UNORM_ARB = 0x8E8C + COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1 + COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2 + COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3 + COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB = 0x8E8E + COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB = 0x8E8F + COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0 + COMPRESSED_RG_RGTC2 = 0x8DBD + COMPRESSED_SIGNED_R11_EAC = 0x9271 + COMPRESSED_SIGNED_RED_RGTC1 = 0x8DBC + COMPRESSED_SIGNED_RG11_EAC = 0x9273 + COMPRESSED_SIGNED_RG_RGTC2 = 0x8DBE + COMPRESSED_SRGB = 0x8C48 + COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR = 0x93DB + COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR = 0x93D8 + COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR = 0x93D9 + COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR = 0x93DA + COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR = 0x93DC + COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR = 0x93DD + COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = 0x93D0 + COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR = 0x93D1 + COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR = 0x93D2 + COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR = 0x93D3 + COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR = 0x93D4 + COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR = 0x93D5 + COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR = 0x93D6 + COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR = 0x93D7 + COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9279 + COMPRESSED_SRGB8_ETC2 = 0x9275 + COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277 + COMPRESSED_SRGB_ALPHA = 0x8C49 + COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB = 0x8E8D + COMPRESSED_TEXTURE_FORMATS = 0x86A3 + COMPUTE_SHADER = 0x91B9 + COMPUTE_SHADER_BIT = 0x00000020 + COMPUTE_SHADER_INVOCATIONS_ARB = 0x82F5 + COMPUTE_SUBROUTINE = 0x92ED + COMPUTE_SUBROUTINE_UNIFORM = 0x92F3 + COMPUTE_TEXTURE = 0x82A0 + COMPUTE_WORK_GROUP_SIZE = 0x8267 + CONDITION_SATISFIED = 0x911C + CONFORMANT_NV = 0x9374 + CONIC_CURVE_TO_NV = 0x1A + CONJOINT_NV = 0x9284 + CONSERVATIVE_RASTERIZATION_INTEL = 0x83FE + CONSERVATIVE_RASTERIZATION_NV = 0x9346 + CONSERVATIVE_RASTER_DILATE_GRANULARITY_NV = 0x937B + CONSERVATIVE_RASTER_DILATE_NV = 0x9379 + CONSERVATIVE_RASTER_DILATE_RANGE_NV = 0x937A + CONSERVATIVE_RASTER_MODE_NV = 0x954D + CONSERVATIVE_RASTER_MODE_POST_SNAP_NV = 0x954E + CONSERVATIVE_RASTER_MODE_PRE_SNAP_NV = 0x9550 + CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV = 0x954F + CONSTANT_ALPHA = 0x8003 + CONSTANT_COLOR = 0x8001 + CONTEXT_COMPATIBILITY_PROFILE_BIT = 0x00000002 + CONTEXT_CORE_PROFILE_BIT = 0x00000001 + CONTEXT_FLAGS = 0x821E + CONTEXT_FLAG_DEBUG_BIT = 0x00000002 + CONTEXT_FLAG_DEBUG_BIT_KHR = 0x00000002 + CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT = 0x00000001 + CONTEXT_FLAG_NO_ERROR_BIT_KHR = 0x00000008 + CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB = 0x00000004 + CONTEXT_LOST = 0x0507 + CONTEXT_LOST_KHR = 0x0507 + CONTEXT_PROFILE_MASK = 0x9126 + CONTEXT_RELEASE_BEHAVIOR = 0x82FB + CONTEXT_RELEASE_BEHAVIOR_FLUSH = 0x82FC + CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR = 0x82FC + CONTEXT_RELEASE_BEHAVIOR_KHR = 0x82FB + CONTEXT_ROBUST_ACCESS = 0x90F3 + CONTEXT_ROBUST_ACCESS_KHR = 0x90F3 + CONTRAST_NV = 0x92A1 + CONVEX_HULL_NV = 0x908B + COPY = 0x1503 + COPY_INVERTED = 0x150C + COPY_READ_BUFFER = 0x8F36 + COPY_WRITE_BUFFER = 0x8F37 + COUNTER_RANGE_AMD = 0x8BC1 + COUNTER_TYPE_AMD = 0x8BC0 + COUNT_DOWN_NV = 0x9089 + COUNT_UP_NV = 0x9088 + COVERAGE_MODULATION_NV = 0x9332 + COVERAGE_MODULATION_TABLE_NV = 0x9331 + COVERAGE_MODULATION_TABLE_SIZE_NV = 0x9333 + CUBIC_CURVE_TO_NV = 0x0C + CULL_FACE = 0x0B44 + CULL_FACE_MODE = 0x0B45 + CURRENT_PROGRAM = 0x8B8D + CURRENT_QUERY = 0x8865 + CURRENT_VERTEX_ATTRIB = 0x8626 + CW = 0x0900 + DARKEN_KHR = 0x9297 + DARKEN_NV = 0x9297 + DEBUG_CALLBACK_FUNCTION = 0x8244 + DEBUG_CALLBACK_FUNCTION_ARB = 0x8244 + DEBUG_CALLBACK_FUNCTION_KHR = 0x8244 + DEBUG_CALLBACK_USER_PARAM = 0x8245 + DEBUG_CALLBACK_USER_PARAM_ARB = 0x8245 + DEBUG_CALLBACK_USER_PARAM_KHR = 0x8245 + DEBUG_GROUP_STACK_DEPTH = 0x826D + DEBUG_GROUP_STACK_DEPTH_KHR = 0x826D + DEBUG_LOGGED_MESSAGES = 0x9145 + DEBUG_LOGGED_MESSAGES_ARB = 0x9145 + DEBUG_LOGGED_MESSAGES_KHR = 0x9145 + DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = 0x8243 + DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB = 0x8243 + DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR = 0x8243 + DEBUG_OUTPUT = 0x92E0 + DEBUG_OUTPUT_KHR = 0x92E0 + DEBUG_OUTPUT_SYNCHRONOUS = 0x8242 + DEBUG_OUTPUT_SYNCHRONOUS_ARB = 0x8242 + DEBUG_OUTPUT_SYNCHRONOUS_KHR = 0x8242 + DEBUG_SEVERITY_HIGH = 0x9146 + DEBUG_SEVERITY_HIGH_ARB = 0x9146 + DEBUG_SEVERITY_HIGH_KHR = 0x9146 + DEBUG_SEVERITY_LOW = 0x9148 + DEBUG_SEVERITY_LOW_ARB = 0x9148 + DEBUG_SEVERITY_LOW_KHR = 0x9148 + DEBUG_SEVERITY_MEDIUM = 0x9147 + DEBUG_SEVERITY_MEDIUM_ARB = 0x9147 + DEBUG_SEVERITY_MEDIUM_KHR = 0x9147 + DEBUG_SEVERITY_NOTIFICATION = 0x826B + DEBUG_SEVERITY_NOTIFICATION_KHR = 0x826B + DEBUG_SOURCE_API = 0x8246 + DEBUG_SOURCE_API_ARB = 0x8246 + DEBUG_SOURCE_API_KHR = 0x8246 + DEBUG_SOURCE_APPLICATION = 0x824A + DEBUG_SOURCE_APPLICATION_ARB = 0x824A + DEBUG_SOURCE_APPLICATION_KHR = 0x824A + DEBUG_SOURCE_OTHER = 0x824B + DEBUG_SOURCE_OTHER_ARB = 0x824B + DEBUG_SOURCE_OTHER_KHR = 0x824B + DEBUG_SOURCE_SHADER_COMPILER = 0x8248 + DEBUG_SOURCE_SHADER_COMPILER_ARB = 0x8248 + DEBUG_SOURCE_SHADER_COMPILER_KHR = 0x8248 + DEBUG_SOURCE_THIRD_PARTY = 0x8249 + DEBUG_SOURCE_THIRD_PARTY_ARB = 0x8249 + DEBUG_SOURCE_THIRD_PARTY_KHR = 0x8249 + DEBUG_SOURCE_WINDOW_SYSTEM = 0x8247 + DEBUG_SOURCE_WINDOW_SYSTEM_ARB = 0x8247 + DEBUG_SOURCE_WINDOW_SYSTEM_KHR = 0x8247 + DEBUG_TYPE_DEPRECATED_BEHAVIOR = 0x824D + DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB = 0x824D + DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR = 0x824D + DEBUG_TYPE_ERROR = 0x824C + DEBUG_TYPE_ERROR_ARB = 0x824C + DEBUG_TYPE_ERROR_KHR = 0x824C + DEBUG_TYPE_MARKER = 0x8268 + DEBUG_TYPE_MARKER_KHR = 0x8268 + DEBUG_TYPE_OTHER = 0x8251 + DEBUG_TYPE_OTHER_ARB = 0x8251 + DEBUG_TYPE_OTHER_KHR = 0x8251 + DEBUG_TYPE_PERFORMANCE = 0x8250 + DEBUG_TYPE_PERFORMANCE_ARB = 0x8250 + DEBUG_TYPE_PERFORMANCE_KHR = 0x8250 + DEBUG_TYPE_POP_GROUP = 0x826A + DEBUG_TYPE_POP_GROUP_KHR = 0x826A + DEBUG_TYPE_PORTABILITY = 0x824F + DEBUG_TYPE_PORTABILITY_ARB = 0x824F + DEBUG_TYPE_PORTABILITY_KHR = 0x824F + DEBUG_TYPE_PUSH_GROUP = 0x8269 + DEBUG_TYPE_PUSH_GROUP_KHR = 0x8269 + DEBUG_TYPE_UNDEFINED_BEHAVIOR = 0x824E + DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB = 0x824E + DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR = 0x824E + DECODE_EXT = 0x8A49 + DECR = 0x1E03 + DECR_WRAP = 0x8508 + DELETE_STATUS = 0x8B80 + DEPTH = 0x1801 + DEPTH24_STENCIL8 = 0x88F0 + DEPTH32F_STENCIL8 = 0x8CAD + DEPTH_ATTACHMENT = 0x8D00 + DEPTH_BUFFER_BIT = 0x00000100 + DEPTH_CLAMP = 0x864F + DEPTH_CLEAR_VALUE = 0x0B73 + DEPTH_COMPONENT = 0x1902 + DEPTH_COMPONENT16 = 0x81A5 + DEPTH_COMPONENT24 = 0x81A6 + DEPTH_COMPONENT32 = 0x81A7 + DEPTH_COMPONENT32F = 0x8CAC + DEPTH_COMPONENTS = 0x8284 + DEPTH_FUNC = 0x0B74 + DEPTH_RANGE = 0x0B70 + DEPTH_RENDERABLE = 0x8287 + DEPTH_SAMPLES_NV = 0x932D + DEPTH_STENCIL = 0x84F9 + DEPTH_STENCIL_ATTACHMENT = 0x821A + DEPTH_STENCIL_TEXTURE_MODE = 0x90EA + DEPTH_TEST = 0x0B71 + DEPTH_WRITEMASK = 0x0B72 + DIFFERENCE_KHR = 0x929E + DIFFERENCE_NV = 0x929E + DISJOINT_NV = 0x9283 + DISPATCH_INDIRECT_BUFFER = 0x90EE + DISPATCH_INDIRECT_BUFFER_BINDING = 0x90EF + DITHER = 0x0BD0 + DONT_CARE = 0x1100 + DOUBLE = 0x140A + DOUBLEBUFFER = 0x0C32 + DOUBLE_MAT2 = 0x8F46 + DOUBLE_MAT2x3 = 0x8F49 + DOUBLE_MAT2x4 = 0x8F4A + DOUBLE_MAT3 = 0x8F47 + DOUBLE_MAT3x2 = 0x8F4B + DOUBLE_MAT3x4 = 0x8F4C + DOUBLE_MAT4 = 0x8F48 + DOUBLE_MAT4x2 = 0x8F4D + DOUBLE_MAT4x3 = 0x8F4E + DOUBLE_VEC2 = 0x8FFC + DOUBLE_VEC3 = 0x8FFD + DOUBLE_VEC4 = 0x8FFE + DRAW_ARRAYS_COMMAND_NV = 0x0003 + DRAW_ARRAYS_INSTANCED_COMMAND_NV = 0x0007 + DRAW_ARRAYS_STRIP_COMMAND_NV = 0x0005 + DRAW_BUFFER = 0x0C01 + DRAW_BUFFER0 = 0x8825 + DRAW_BUFFER1 = 0x8826 + DRAW_BUFFER10 = 0x882F + DRAW_BUFFER11 = 0x8830 + DRAW_BUFFER12 = 0x8831 + DRAW_BUFFER13 = 0x8832 + DRAW_BUFFER14 = 0x8833 + DRAW_BUFFER15 = 0x8834 + DRAW_BUFFER2 = 0x8827 + DRAW_BUFFER3 = 0x8828 + DRAW_BUFFER4 = 0x8829 + DRAW_BUFFER5 = 0x882A + DRAW_BUFFER6 = 0x882B + DRAW_BUFFER7 = 0x882C + DRAW_BUFFER8 = 0x882D + DRAW_BUFFER9 = 0x882E + DRAW_ELEMENTS_COMMAND_NV = 0x0002 + DRAW_ELEMENTS_INSTANCED_COMMAND_NV = 0x0006 + DRAW_ELEMENTS_STRIP_COMMAND_NV = 0x0004 + DRAW_FRAMEBUFFER = 0x8CA9 + DRAW_FRAMEBUFFER_BINDING = 0x8CA6 + DRAW_INDIRECT_ADDRESS_NV = 0x8F41 + DRAW_INDIRECT_BUFFER = 0x8F3F + DRAW_INDIRECT_BUFFER_BINDING = 0x8F43 + DRAW_INDIRECT_LENGTH_NV = 0x8F42 + DRAW_INDIRECT_UNIFIED_NV = 0x8F40 + DST_ALPHA = 0x0304 + DST_ATOP_NV = 0x928F + DST_COLOR = 0x0306 + DST_IN_NV = 0x928B + DST_NV = 0x9287 + DST_OUT_NV = 0x928D + DST_OVER_NV = 0x9289 + DUP_FIRST_CUBIC_CURVE_TO_NV = 0xF2 + DUP_LAST_CUBIC_CURVE_TO_NV = 0xF4 + DYNAMIC_COPY = 0x88EA + DYNAMIC_DRAW = 0x88E8 + DYNAMIC_READ = 0x88E9 + DYNAMIC_STORAGE_BIT = 0x0100 + EDGE_FLAG_ARRAY_ADDRESS_NV = 0x8F26 + EDGE_FLAG_ARRAY_LENGTH_NV = 0x8F30 + EFFECTIVE_RASTER_SAMPLES_EXT = 0x932C + ELEMENT_ADDRESS_COMMAND_NV = 0x0008 + ELEMENT_ARRAY_ADDRESS_NV = 0x8F29 + ELEMENT_ARRAY_BARRIER_BIT = 0x00000002 + ELEMENT_ARRAY_BUFFER = 0x8893 + ELEMENT_ARRAY_BUFFER_BINDING = 0x8895 + ELEMENT_ARRAY_LENGTH_NV = 0x8F33 + ELEMENT_ARRAY_UNIFIED_NV = 0x8F1F + EQUAL = 0x0202 + EQUIV = 0x1509 + EXCLUSION_KHR = 0x92A0 + EXCLUSION_NV = 0x92A0 + EXCLUSIVE_EXT = 0x8F11 + EXTENSIONS = 0x1F03 + FACTOR_MAX_AMD = 0x901D + FACTOR_MIN_AMD = 0x901C + FALSE = 0 + FASTEST = 0x1101 + FILE_NAME_NV = 0x9074 + FILL = 0x1B02 + FILL_RECTANGLE_NV = 0x933C + FILTER = 0x829A + FIRST_TO_REST_NV = 0x90AF + FIRST_VERTEX_CONVENTION = 0x8E4D + FIXED = 0x140C + FIXED_ONLY = 0x891D + FLOAT = 0x1406 + FLOAT16_NV = 0x8FF8 + FLOAT16_VEC2_NV = 0x8FF9 + FLOAT16_VEC3_NV = 0x8FFA + FLOAT16_VEC4_NV = 0x8FFB + FLOAT_32_UNSIGNED_INT_24_8_REV = 0x8DAD + FLOAT_MAT2 = 0x8B5A + FLOAT_MAT2x3 = 0x8B65 + FLOAT_MAT2x4 = 0x8B66 + FLOAT_MAT3 = 0x8B5B + FLOAT_MAT3x2 = 0x8B67 + FLOAT_MAT3x4 = 0x8B68 + FLOAT_MAT4 = 0x8B5C + FLOAT_MAT4x2 = 0x8B69 + FLOAT_MAT4x3 = 0x8B6A + FLOAT_VEC2 = 0x8B50 + FLOAT_VEC3 = 0x8B51 + FLOAT_VEC4 = 0x8B52 + FOG_COORD_ARRAY_ADDRESS_NV = 0x8F28 + FOG_COORD_ARRAY_LENGTH_NV = 0x8F32 + FONT_ASCENDER_BIT_NV = 0x00200000 + FONT_DESCENDER_BIT_NV = 0x00400000 + FONT_GLYPHS_AVAILABLE_NV = 0x9368 + FONT_HAS_KERNING_BIT_NV = 0x10000000 + FONT_HEIGHT_BIT_NV = 0x00800000 + FONT_MAX_ADVANCE_HEIGHT_BIT_NV = 0x02000000 + FONT_MAX_ADVANCE_WIDTH_BIT_NV = 0x01000000 + FONT_NUM_GLYPH_INDICES_BIT_NV = 0x20000000 + FONT_TARGET_UNAVAILABLE_NV = 0x9369 + FONT_UNAVAILABLE_NV = 0x936A + FONT_UNDERLINE_POSITION_BIT_NV = 0x04000000 + FONT_UNDERLINE_THICKNESS_BIT_NV = 0x08000000 + FONT_UNINTELLIGIBLE_NV = 0x936B + FONT_UNITS_PER_EM_BIT_NV = 0x00100000 + FONT_X_MAX_BOUNDS_BIT_NV = 0x00040000 + FONT_X_MIN_BOUNDS_BIT_NV = 0x00010000 + FONT_Y_MAX_BOUNDS_BIT_NV = 0x00080000 + FONT_Y_MIN_BOUNDS_BIT_NV = 0x00020000 + FRACTIONAL_EVEN = 0x8E7C + FRACTIONAL_ODD = 0x8E7B + FRAGMENT_COVERAGE_COLOR_NV = 0x92DE + FRAGMENT_COVERAGE_TO_COLOR_NV = 0x92DD + FRAGMENT_INPUT_NV = 0x936D + FRAGMENT_INTERPOLATION_OFFSET_BITS = 0x8E5D + FRAGMENT_SHADER = 0x8B30 + FRAGMENT_SHADER_BIT = 0x00000002 + FRAGMENT_SHADER_BIT_EXT = 0x00000002 + FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8B8B + FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT = 0x8A52 + FRAGMENT_SHADER_INVOCATIONS_ARB = 0x82F4 + FRAGMENT_SUBROUTINE = 0x92EC + FRAGMENT_SUBROUTINE_UNIFORM = 0x92F2 + FRAGMENT_TEXTURE = 0x829F + FRAMEBUFFER = 0x8D40 + FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 0x8215 + FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 0x8214 + FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210 + FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 0x8211 + FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 0x8216 + FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 0x8213 + FRAMEBUFFER_ATTACHMENT_LAYERED = 0x8DA7 + FRAMEBUFFER_ATTACHMENT_LAYERED_ARB = 0x8DA7 + FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1 + FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0 + FRAMEBUFFER_ATTACHMENT_RED_SIZE = 0x8212 + FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 0x8217 + FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR = 0x9632 + FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3 + FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4 + FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2 + FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR = 0x9630 + FRAMEBUFFER_BARRIER_BIT = 0x00000400 + FRAMEBUFFER_BINDING = 0x8CA6 + FRAMEBUFFER_BLEND = 0x828B + FRAMEBUFFER_COMPLETE = 0x8CD5 + FRAMEBUFFER_DEFAULT = 0x8218 + FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS = 0x9314 + FRAMEBUFFER_DEFAULT_HEIGHT = 0x9311 + FRAMEBUFFER_DEFAULT_LAYERS = 0x9312 + FRAMEBUFFER_DEFAULT_SAMPLES = 0x9313 + FRAMEBUFFER_DEFAULT_WIDTH = 0x9310 + FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6 + FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER = 0x8CDB + FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB = 0x8DA9 + FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS = 0x8DA8 + FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB = 0x8DA8 + FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7 + FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56 + FRAMEBUFFER_INCOMPLETE_READ_BUFFER = 0x8CDC + FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR = 0x9633 + FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_ARB = 0x9342 + FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV = 0x9342 + FRAMEBUFFER_RENDERABLE = 0x8289 + FRAMEBUFFER_RENDERABLE_LAYERED = 0x828A + FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_ARB = 0x9343 + FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV = 0x9343 + FRAMEBUFFER_SRGB = 0x8DB9 + FRAMEBUFFER_UNDEFINED = 0x8219 + FRAMEBUFFER_UNSUPPORTED = 0x8CDD + FRONT = 0x0404 + FRONT_AND_BACK = 0x0408 + FRONT_FACE = 0x0B46 + FRONT_FACE_COMMAND_NV = 0x0012 + FRONT_LEFT = 0x0400 + FRONT_RIGHT = 0x0401 + FULL_SUPPORT = 0x82B7 + FUNC_ADD = 0x8006 + FUNC_REVERSE_SUBTRACT = 0x800B + FUNC_SUBTRACT = 0x800A + GEOMETRY_INPUT_TYPE = 0x8917 + GEOMETRY_INPUT_TYPE_ARB = 0x8DDB + GEOMETRY_OUTPUT_TYPE = 0x8918 + GEOMETRY_OUTPUT_TYPE_ARB = 0x8DDC + GEOMETRY_SHADER = 0x8DD9 + GEOMETRY_SHADER_ARB = 0x8DD9 + GEOMETRY_SHADER_BIT = 0x00000004 + GEOMETRY_SHADER_INVOCATIONS = 0x887F + GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB = 0x82F3 + GEOMETRY_SUBROUTINE = 0x92EB + GEOMETRY_SUBROUTINE_UNIFORM = 0x92F1 + GEOMETRY_TEXTURE = 0x829E + GEOMETRY_VERTICES_OUT = 0x8916 + GEOMETRY_VERTICES_OUT_ARB = 0x8DDA + GEQUAL = 0x0206 + GET_TEXTURE_IMAGE_FORMAT = 0x8291 + GET_TEXTURE_IMAGE_TYPE = 0x8292 + GLYPH_HAS_KERNING_BIT_NV = 0x100 + GLYPH_HEIGHT_BIT_NV = 0x02 + GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV = 0x10 + GLYPH_HORIZONTAL_BEARING_X_BIT_NV = 0x04 + GLYPH_HORIZONTAL_BEARING_Y_BIT_NV = 0x08 + GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV = 0x80 + GLYPH_VERTICAL_BEARING_X_BIT_NV = 0x20 + GLYPH_VERTICAL_BEARING_Y_BIT_NV = 0x40 + GLYPH_WIDTH_BIT_NV = 0x01 + GPU_ADDRESS_NV = 0x8F34 + GREATER = 0x0204 + GREEN = 0x1904 + GREEN_INTEGER = 0x8D95 + GREEN_NV = 0x1904 + GUILTY_CONTEXT_RESET = 0x8253 + GUILTY_CONTEXT_RESET_ARB = 0x8253 + GUILTY_CONTEXT_RESET_KHR = 0x8253 + HALF_FLOAT = 0x140B + HARDLIGHT_KHR = 0x929B + HARDLIGHT_NV = 0x929B + HARDMIX_NV = 0x92A9 + HIGH_FLOAT = 0x8DF2 + HIGH_INT = 0x8DF5 + HORIZONTAL_LINE_TO_NV = 0x06 + HSL_COLOR_KHR = 0x92AF + HSL_COLOR_NV = 0x92AF + HSL_HUE_KHR = 0x92AD + HSL_HUE_NV = 0x92AD + HSL_LUMINOSITY_KHR = 0x92B0 + HSL_LUMINOSITY_NV = 0x92B0 + HSL_SATURATION_KHR = 0x92AE + HSL_SATURATION_NV = 0x92AE + IMAGE_1D = 0x904C + IMAGE_1D_ARRAY = 0x9052 + IMAGE_2D = 0x904D + IMAGE_2D_ARRAY = 0x9053 + IMAGE_2D_MULTISAMPLE = 0x9055 + IMAGE_2D_MULTISAMPLE_ARRAY = 0x9056 + IMAGE_2D_RECT = 0x904F + IMAGE_3D = 0x904E + IMAGE_BINDING_ACCESS = 0x8F3E + IMAGE_BINDING_FORMAT = 0x906E + IMAGE_BINDING_LAYER = 0x8F3D + IMAGE_BINDING_LAYERED = 0x8F3C + IMAGE_BINDING_LEVEL = 0x8F3B + IMAGE_BINDING_NAME = 0x8F3A + IMAGE_BUFFER = 0x9051 + IMAGE_CLASS_10_10_10_2 = 0x82C3 + IMAGE_CLASS_11_11_10 = 0x82C2 + IMAGE_CLASS_1_X_16 = 0x82BE + IMAGE_CLASS_1_X_32 = 0x82BB + IMAGE_CLASS_1_X_8 = 0x82C1 + IMAGE_CLASS_2_X_16 = 0x82BD + IMAGE_CLASS_2_X_32 = 0x82BA + IMAGE_CLASS_2_X_8 = 0x82C0 + IMAGE_CLASS_4_X_16 = 0x82BC + IMAGE_CLASS_4_X_32 = 0x82B9 + IMAGE_CLASS_4_X_8 = 0x82BF + IMAGE_COMPATIBILITY_CLASS = 0x82A8 + IMAGE_CUBE = 0x9050 + IMAGE_CUBE_MAP_ARRAY = 0x9054 + IMAGE_FORMAT_COMPATIBILITY_BY_CLASS = 0x90C9 + IMAGE_FORMAT_COMPATIBILITY_BY_SIZE = 0x90C8 + IMAGE_FORMAT_COMPATIBILITY_TYPE = 0x90C7 + IMAGE_PIXEL_FORMAT = 0x82A9 + IMAGE_PIXEL_TYPE = 0x82AA + IMAGE_TEXEL_SIZE = 0x82A7 + IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B + IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A + INCLUSIVE_EXT = 0x8F10 + INCR = 0x1E02 + INCR_WRAP = 0x8507 + INDEX_ARRAY_ADDRESS_NV = 0x8F24 + INDEX_ARRAY_LENGTH_NV = 0x8F2E + INFO_LOG_LENGTH = 0x8B84 + INNOCENT_CONTEXT_RESET = 0x8254 + INNOCENT_CONTEXT_RESET_ARB = 0x8254 + INNOCENT_CONTEXT_RESET_KHR = 0x8254 + INT = 0x1404 + INT16_NV = 0x8FE4 + INT16_VEC2_NV = 0x8FE5 + INT16_VEC3_NV = 0x8FE6 + INT16_VEC4_NV = 0x8FE7 + INT64_ARB = 0x140E + INT64_NV = 0x140E + INT64_VEC2_ARB = 0x8FE9 + INT64_VEC2_NV = 0x8FE9 + INT64_VEC3_ARB = 0x8FEA + INT64_VEC3_NV = 0x8FEA + INT64_VEC4_ARB = 0x8FEB + INT64_VEC4_NV = 0x8FEB + INT8_NV = 0x8FE0 + INT8_VEC2_NV = 0x8FE1 + INT8_VEC3_NV = 0x8FE2 + INT8_VEC4_NV = 0x8FE3 + INTERLEAVED_ATTRIBS = 0x8C8C + INTERNALFORMAT_ALPHA_SIZE = 0x8274 + INTERNALFORMAT_ALPHA_TYPE = 0x827B + INTERNALFORMAT_BLUE_SIZE = 0x8273 + INTERNALFORMAT_BLUE_TYPE = 0x827A + INTERNALFORMAT_DEPTH_SIZE = 0x8275 + INTERNALFORMAT_DEPTH_TYPE = 0x827C + INTERNALFORMAT_GREEN_SIZE = 0x8272 + INTERNALFORMAT_GREEN_TYPE = 0x8279 + INTERNALFORMAT_PREFERRED = 0x8270 + INTERNALFORMAT_RED_SIZE = 0x8271 + INTERNALFORMAT_RED_TYPE = 0x8278 + INTERNALFORMAT_SHARED_SIZE = 0x8277 + INTERNALFORMAT_STENCIL_SIZE = 0x8276 + INTERNALFORMAT_STENCIL_TYPE = 0x827D + INTERNALFORMAT_SUPPORTED = 0x826F + INT_2_10_10_10_REV = 0x8D9F + INT_IMAGE_1D = 0x9057 + INT_IMAGE_1D_ARRAY = 0x905D + INT_IMAGE_2D = 0x9058 + INT_IMAGE_2D_ARRAY = 0x905E + INT_IMAGE_2D_MULTISAMPLE = 0x9060 + INT_IMAGE_2D_MULTISAMPLE_ARRAY = 0x9061 + INT_IMAGE_2D_RECT = 0x905A + INT_IMAGE_3D = 0x9059 + INT_IMAGE_BUFFER = 0x905C + INT_IMAGE_CUBE = 0x905B + INT_IMAGE_CUBE_MAP_ARRAY = 0x905F + INT_SAMPLER_1D = 0x8DC9 + INT_SAMPLER_1D_ARRAY = 0x8DCE + INT_SAMPLER_2D = 0x8DCA + INT_SAMPLER_2D_ARRAY = 0x8DCF + INT_SAMPLER_2D_MULTISAMPLE = 0x9109 + INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910C + INT_SAMPLER_2D_RECT = 0x8DCD + INT_SAMPLER_3D = 0x8DCB + INT_SAMPLER_BUFFER = 0x8DD0 + INT_SAMPLER_CUBE = 0x8DCC + INT_SAMPLER_CUBE_MAP_ARRAY = 0x900E + INT_SAMPLER_CUBE_MAP_ARRAY_ARB = 0x900E + INT_VEC2 = 0x8B53 + INT_VEC3 = 0x8B54 + INT_VEC4 = 0x8B55 + INVALID_ENUM = 0x0500 + INVALID_FRAMEBUFFER_OPERATION = 0x0506 + INVALID_INDEX = 0xFFFFFFFF + INVALID_OPERATION = 0x0502 + INVALID_VALUE = 0x0501 + INVERT = 0x150A + INVERT_OVG_NV = 0x92B4 + INVERT_RGB_NV = 0x92A3 + ISOLINES = 0x8E7A + IS_PER_PATCH = 0x92E7 + IS_ROW_MAJOR = 0x9300 + ITALIC_BIT_NV = 0x02 + KEEP = 0x1E00 + LARGE_CCW_ARC_TO_NV = 0x16 + LARGE_CW_ARC_TO_NV = 0x18 + LAST_VERTEX_CONVENTION = 0x8E4E + LAYER_PROVOKING_VERTEX = 0x825E + LEFT = 0x0406 + LEQUAL = 0x0203 + LESS = 0x0201 + LIGHTEN_KHR = 0x9298 + LIGHTEN_NV = 0x9298 + LINE = 0x1B01 + LINEAR = 0x2601 + LINEARBURN_NV = 0x92A5 + LINEARDODGE_NV = 0x92A4 + LINEARLIGHT_NV = 0x92A7 + LINEAR_MIPMAP_LINEAR = 0x2703 + LINEAR_MIPMAP_NEAREST = 0x2701 + LINES = 0x0001 + LINES_ADJACENCY = 0x000A + LINES_ADJACENCY_ARB = 0x000A + LINE_LOOP = 0x0002 + LINE_SMOOTH = 0x0B20 + LINE_SMOOTH_HINT = 0x0C52 + LINE_STRIP = 0x0003 + LINE_STRIP_ADJACENCY = 0x000B + LINE_STRIP_ADJACENCY_ARB = 0x000B + LINE_TO_NV = 0x04 + LINE_WIDTH = 0x0B21 + LINE_WIDTH_COMMAND_NV = 0x000D + LINE_WIDTH_GRANULARITY = 0x0B23 + LINE_WIDTH_RANGE = 0x0B22 + LINK_STATUS = 0x8B82 + LOCATION = 0x930E + LOCATION_COMPONENT = 0x934A + LOCATION_INDEX = 0x930F + LOGIC_OP_MODE = 0x0BF0 + LOSE_CONTEXT_ON_RESET = 0x8252 + LOSE_CONTEXT_ON_RESET_ARB = 0x8252 + LOSE_CONTEXT_ON_RESET_KHR = 0x8252 + LOWER_LEFT = 0x8CA1 + LOW_FLOAT = 0x8DF0 + LOW_INT = 0x8DF3 + MAJOR_VERSION = 0x821B + MANUAL_GENERATE_MIPMAP = 0x8294 + MAP_COHERENT_BIT = 0x0080 + MAP_FLUSH_EXPLICIT_BIT = 0x0010 + MAP_INVALIDATE_BUFFER_BIT = 0x0008 + MAP_INVALIDATE_RANGE_BIT = 0x0004 + MAP_PERSISTENT_BIT = 0x0040 + MAP_READ_BIT = 0x0001 + MAP_UNSYNCHRONIZED_BIT = 0x0020 + MAP_WRITE_BIT = 0x0002 + MATRIX_STRIDE = 0x92FF + MAX = 0x8008 + MAX_3D_TEXTURE_SIZE = 0x8073 + MAX_ARRAY_TEXTURE_LAYERS = 0x88FF + MAX_ATOMIC_COUNTER_BUFFER_BINDINGS = 0x92DC + MAX_ATOMIC_COUNTER_BUFFER_SIZE = 0x92D8 + MAX_CLIP_DISTANCES = 0x0D32 + MAX_COLOR_ATTACHMENTS = 0x8CDF + MAX_COLOR_TEXTURE_SAMPLES = 0x910E + MAX_COMBINED_ATOMIC_COUNTERS = 0x92D7 + MAX_COMBINED_ATOMIC_COUNTER_BUFFERS = 0x92D1 + MAX_COMBINED_CLIP_AND_CULL_DISTANCES = 0x82FA + MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS = 0x8266 + MAX_COMBINED_DIMENSIONS = 0x8282 + MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33 + MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS = 0x8A32 + MAX_COMBINED_IMAGE_UNIFORMS = 0x90CF + MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS = 0x8F39 + MAX_COMBINED_SHADER_OUTPUT_RESOURCES = 0x8F39 + MAX_COMBINED_SHADER_STORAGE_BLOCKS = 0x90DC + MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E1E + MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E1F + MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D + MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E + MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31 + MAX_COMPUTE_ATOMIC_COUNTERS = 0x8265 + MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS = 0x8264 + MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB = 0x90EB + MAX_COMPUTE_FIXED_GROUP_SIZE_ARB = 0x91BF + MAX_COMPUTE_IMAGE_UNIFORMS = 0x91BD + MAX_COMPUTE_SHADER_STORAGE_BLOCKS = 0x90DB + MAX_COMPUTE_SHARED_MEMORY_SIZE = 0x8262 + MAX_COMPUTE_TEXTURE_IMAGE_UNITS = 0x91BC + MAX_COMPUTE_UNIFORM_BLOCKS = 0x91BB + MAX_COMPUTE_UNIFORM_COMPONENTS = 0x8263 + MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB = 0x9344 + MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB = 0x9345 + MAX_COMPUTE_WORK_GROUP_COUNT = 0x91BE + MAX_COMPUTE_WORK_GROUP_INVOCATIONS = 0x90EB + MAX_COMPUTE_WORK_GROUP_SIZE = 0x91BF + MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C + MAX_CULL_DISTANCES = 0x82F9 + MAX_DEBUG_GROUP_STACK_DEPTH = 0x826C + MAX_DEBUG_GROUP_STACK_DEPTH_KHR = 0x826C + MAX_DEBUG_LOGGED_MESSAGES = 0x9144 + MAX_DEBUG_LOGGED_MESSAGES_ARB = 0x9144 + MAX_DEBUG_LOGGED_MESSAGES_KHR = 0x9144 + MAX_DEBUG_MESSAGE_LENGTH = 0x9143 + MAX_DEBUG_MESSAGE_LENGTH_ARB = 0x9143 + MAX_DEBUG_MESSAGE_LENGTH_KHR = 0x9143 + MAX_DEPTH = 0x8280 + MAX_DEPTH_TEXTURE_SAMPLES = 0x910F + MAX_DRAW_BUFFERS = 0x8824 + MAX_DUAL_SOURCE_DRAW_BUFFERS = 0x88FC + MAX_ELEMENTS_INDICES = 0x80E9 + MAX_ELEMENTS_VERTICES = 0x80E8 + MAX_ELEMENT_INDEX = 0x8D6B + MAX_FRAGMENT_ATOMIC_COUNTERS = 0x92D6 + MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS = 0x92D0 + MAX_FRAGMENT_IMAGE_UNIFORMS = 0x90CE + MAX_FRAGMENT_INPUT_COMPONENTS = 0x9125 + MAX_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5C + MAX_FRAGMENT_SHADER_STORAGE_BLOCKS = 0x90DA + MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D + MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49 + MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD + MAX_FRAMEBUFFER_HEIGHT = 0x9316 + MAX_FRAMEBUFFER_LAYERS = 0x9317 + MAX_FRAMEBUFFER_SAMPLES = 0x9318 + MAX_FRAMEBUFFER_WIDTH = 0x9315 + MAX_GEOMETRY_ATOMIC_COUNTERS = 0x92D5 + MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS = 0x92CF + MAX_GEOMETRY_IMAGE_UNIFORMS = 0x90CD + MAX_GEOMETRY_INPUT_COMPONENTS = 0x9123 + MAX_GEOMETRY_OUTPUT_COMPONENTS = 0x9124 + MAX_GEOMETRY_OUTPUT_VERTICES = 0x8DE0 + MAX_GEOMETRY_OUTPUT_VERTICES_ARB = 0x8DE0 + MAX_GEOMETRY_SHADER_INVOCATIONS = 0x8E5A + MAX_GEOMETRY_SHADER_STORAGE_BLOCKS = 0x90D7 + MAX_GEOMETRY_TEXTURE_IMAGE_UNITS = 0x8C29 + MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB = 0x8C29 + MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = 0x8DE1 + MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB = 0x8DE1 + MAX_GEOMETRY_UNIFORM_BLOCKS = 0x8A2C + MAX_GEOMETRY_UNIFORM_COMPONENTS = 0x8DDF + MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB = 0x8DDF + MAX_GEOMETRY_VARYING_COMPONENTS_ARB = 0x8DDD + MAX_HEIGHT = 0x827F + MAX_IMAGE_SAMPLES = 0x906D + MAX_IMAGE_UNITS = 0x8F38 + MAX_INTEGER_SAMPLES = 0x9110 + MAX_LABEL_LENGTH = 0x82E8 + MAX_LABEL_LENGTH_KHR = 0x82E8 + MAX_LAYERS = 0x8281 + MAX_MULTISAMPLE_COVERAGE_MODES_NV = 0x8E11 + MAX_NAME_LENGTH = 0x92F6 + MAX_NUM_ACTIVE_VARIABLES = 0x92F7 + MAX_NUM_COMPATIBLE_SUBROUTINES = 0x92F8 + MAX_PATCH_VERTICES = 0x8E7D + MAX_PROGRAM_TEXEL_OFFSET = 0x8905 + MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB = 0x8F9F + MAX_PROGRAM_TEXTURE_GATHER_OFFSET = 0x8E5F + MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = 0x8E5F + MAX_RASTER_SAMPLES_EXT = 0x9329 + MAX_RECTANGLE_TEXTURE_SIZE = 0x84F8 + MAX_RENDERBUFFER_SIZE = 0x84E8 + MAX_SAMPLES = 0x8D57 + MAX_SAMPLE_MASK_WORDS = 0x8E59 + MAX_SERVER_WAIT_TIMEOUT = 0x9111 + MAX_SHADER_BUFFER_ADDRESS_NV = 0x8F35 + MAX_SHADER_COMPILER_THREADS_ARB = 0x91B0 + MAX_SHADER_COMPILER_THREADS_KHR = 0x91B0 + MAX_SHADER_STORAGE_BLOCK_SIZE = 0x90DE + MAX_SHADER_STORAGE_BUFFER_BINDINGS = 0x90DD + MAX_SPARSE_3D_TEXTURE_SIZE_ARB = 0x9199 + MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB = 0x919A + MAX_SPARSE_TEXTURE_SIZE_ARB = 0x9198 + MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV = 0x9349 + MAX_SUBROUTINES = 0x8DE7 + MAX_SUBROUTINE_UNIFORM_LOCATIONS = 0x8DE8 + MAX_TESS_CONTROL_ATOMIC_COUNTERS = 0x92D3 + MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS = 0x92CD + MAX_TESS_CONTROL_IMAGE_UNIFORMS = 0x90CB + MAX_TESS_CONTROL_INPUT_COMPONENTS = 0x886C + MAX_TESS_CONTROL_OUTPUT_COMPONENTS = 0x8E83 + MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS = 0x90D8 + MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS = 0x8E81 + MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS = 0x8E85 + MAX_TESS_CONTROL_UNIFORM_BLOCKS = 0x8E89 + MAX_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E7F + MAX_TESS_EVALUATION_ATOMIC_COUNTERS = 0x92D4 + MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS = 0x92CE + MAX_TESS_EVALUATION_IMAGE_UNIFORMS = 0x90CC + MAX_TESS_EVALUATION_INPUT_COMPONENTS = 0x886D + MAX_TESS_EVALUATION_OUTPUT_COMPONENTS = 0x8E86 + MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS = 0x90D9 + MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS = 0x8E82 + MAX_TESS_EVALUATION_UNIFORM_BLOCKS = 0x8E8A + MAX_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E80 + MAX_TESS_GEN_LEVEL = 0x8E7E + MAX_TESS_PATCH_COMPONENTS = 0x8E84 + MAX_TEXTURE_BUFFER_SIZE = 0x8C2B + MAX_TEXTURE_BUFFER_SIZE_ARB = 0x8C2B + MAX_TEXTURE_IMAGE_UNITS = 0x8872 + MAX_TEXTURE_LOD_BIAS = 0x84FD + MAX_TEXTURE_MAX_ANISOTROPY = 0x84FF + MAX_TEXTURE_SIZE = 0x0D33 + MAX_TRANSFORM_FEEDBACK_BUFFERS = 0x8E70 + MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 0x8C8A + MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 0x8C8B + MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 0x8C80 + MAX_UNIFORM_BLOCK_SIZE = 0x8A30 + MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F + MAX_UNIFORM_LOCATIONS = 0x826E + MAX_VARYING_COMPONENTS = 0x8B4B + MAX_VARYING_FLOATS = 0x8B4B + MAX_VARYING_VECTORS = 0x8DFC + MAX_VERTEX_ATOMIC_COUNTERS = 0x92D2 + MAX_VERTEX_ATOMIC_COUNTER_BUFFERS = 0x92CC + MAX_VERTEX_ATTRIBS = 0x8869 + MAX_VERTEX_ATTRIB_BINDINGS = 0x82DA + MAX_VERTEX_ATTRIB_RELATIVE_OFFSET = 0x82D9 + MAX_VERTEX_IMAGE_UNIFORMS = 0x90CA + MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122 + MAX_VERTEX_SHADER_STORAGE_BLOCKS = 0x90D6 + MAX_VERTEX_STREAMS = 0x8E71 + MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C + MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B + MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A + MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB + MAX_VERTEX_VARYING_COMPONENTS_ARB = 0x8DDE + MAX_VIEWPORTS = 0x825B + MAX_VIEWPORT_DIMS = 0x0D3A + MAX_VIEWS_OVR = 0x9631 + MAX_WIDTH = 0x827E + MAX_WINDOW_RECTANGLES_EXT = 0x8F14 + MEDIUM_FLOAT = 0x8DF1 + MEDIUM_INT = 0x8DF4 + MIN = 0x8007 + MINOR_VERSION = 0x821C + MINUS_CLAMPED_NV = 0x92B3 + MINUS_NV = 0x929F + MIN_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5B + MIN_MAP_BUFFER_ALIGNMENT = 0x90BC + MIN_PROGRAM_TEXEL_OFFSET = 0x8904 + MIN_PROGRAM_TEXTURE_GATHER_OFFSET = 0x8E5E + MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = 0x8E5E + MIN_SAMPLE_SHADING_VALUE = 0x8C37 + MIN_SAMPLE_SHADING_VALUE_ARB = 0x8C37 + MIPMAP = 0x8293 + MIRRORED_REPEAT = 0x8370 + MIRRORED_REPEAT_ARB = 0x8370 + MIRROR_CLAMP_TO_EDGE = 0x8743 + MITER_REVERT_NV = 0x90A7 + MITER_TRUNCATE_NV = 0x90A8 + MIXED_DEPTH_SAMPLES_SUPPORTED_NV = 0x932F + MIXED_STENCIL_SAMPLES_SUPPORTED_NV = 0x9330 + MOVE_TO_CONTINUES_NV = 0x90B6 + MOVE_TO_NV = 0x02 + MOVE_TO_RESETS_NV = 0x90B5 + MULTIPLY_KHR = 0x9294 + MULTIPLY_NV = 0x9294 + MULTISAMPLE = 0x809D + MULTISAMPLES_NV = 0x9371 + MULTISAMPLE_COVERAGE_MODES_NV = 0x8E12 + MULTISAMPLE_LINE_WIDTH_GRANULARITY_ARB = 0x9382 + MULTISAMPLE_LINE_WIDTH_RANGE_ARB = 0x9381 + MULTISAMPLE_RASTERIZATION_ALLOWED_EXT = 0x932B + NAMED_STRING_LENGTH_ARB = 0x8DE9 + NAMED_STRING_TYPE_ARB = 0x8DEA + NAME_LENGTH = 0x92F9 + NAND = 0x150E + NEAREST = 0x2600 + NEAREST_MIPMAP_LINEAR = 0x2702 + NEAREST_MIPMAP_NEAREST = 0x2700 + NEGATIVE_ONE_TO_ONE = 0x935E + NEVER = 0x0200 + NICEST = 0x1102 + NONE = 0 + NOOP = 0x1505 + NOP_COMMAND_NV = 0x0001 + NOR = 0x1508 + NORMAL_ARRAY_ADDRESS_NV = 0x8F22 + NORMAL_ARRAY_LENGTH_NV = 0x8F2C + NOTEQUAL = 0x0205 + NO_ERROR = 0 + NO_RESET_NOTIFICATION = 0x8261 + NO_RESET_NOTIFICATION_ARB = 0x8261 + NO_RESET_NOTIFICATION_KHR = 0x8261 + NUM_ACTIVE_VARIABLES = 0x9304 + NUM_COMPATIBLE_SUBROUTINES = 0x8E4A + NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2 + NUM_EXTENSIONS = 0x821D + NUM_PROGRAM_BINARY_FORMATS = 0x87FE + NUM_SAMPLE_COUNTS = 0x9380 + NUM_SHADER_BINARY_FORMATS = 0x8DF9 + NUM_SPARSE_LEVELS_ARB = 0x91AA + NUM_SPIR_V_EXTENSIONS = 0x9554 + NUM_VIRTUAL_PAGE_SIZES_ARB = 0x91A8 + NUM_WINDOW_RECTANGLES_EXT = 0x8F15 + OBJECT_TYPE = 0x9112 + OFFSET = 0x92FC + ONE = 1 + ONE_MINUS_CONSTANT_ALPHA = 0x8004 + ONE_MINUS_CONSTANT_COLOR = 0x8002 + ONE_MINUS_DST_ALPHA = 0x0305 + ONE_MINUS_DST_COLOR = 0x0307 + ONE_MINUS_SRC1_ALPHA = 0x88FB + ONE_MINUS_SRC1_COLOR = 0x88FA + ONE_MINUS_SRC_ALPHA = 0x0303 + ONE_MINUS_SRC_COLOR = 0x0301 + OR = 0x1507 + OR_INVERTED = 0x150D + OR_REVERSE = 0x150B + OUT_OF_MEMORY = 0x0505 + OVERLAY_KHR = 0x9296 + OVERLAY_NV = 0x9296 + PACK_ALIGNMENT = 0x0D05 + PACK_COMPRESSED_BLOCK_DEPTH = 0x912D + PACK_COMPRESSED_BLOCK_HEIGHT = 0x912C + PACK_COMPRESSED_BLOCK_SIZE = 0x912E + PACK_COMPRESSED_BLOCK_WIDTH = 0x912B + PACK_IMAGE_HEIGHT = 0x806C + PACK_LSB_FIRST = 0x0D01 + PACK_ROW_LENGTH = 0x0D02 + PACK_SKIP_IMAGES = 0x806B + PACK_SKIP_PIXELS = 0x0D04 + PACK_SKIP_ROWS = 0x0D03 + PACK_SWAP_BYTES = 0x0D00 + PARAMETER_BUFFER_ARB = 0x80EE + PARAMETER_BUFFER_BINDING_ARB = 0x80EF + PATCHES = 0x000E + PATCH_DEFAULT_INNER_LEVEL = 0x8E73 + PATCH_DEFAULT_OUTER_LEVEL = 0x8E74 + PATCH_VERTICES = 0x8E72 + PATH_CLIENT_LENGTH_NV = 0x907F + PATH_COMMAND_COUNT_NV = 0x909D + PATH_COMPUTED_LENGTH_NV = 0x90A0 + PATH_COORD_COUNT_NV = 0x909E + PATH_COVER_DEPTH_FUNC_NV = 0x90BF + PATH_DASH_ARRAY_COUNT_NV = 0x909F + PATH_DASH_CAPS_NV = 0x907B + PATH_DASH_OFFSET_NV = 0x907E + PATH_DASH_OFFSET_RESET_NV = 0x90B4 + PATH_END_CAPS_NV = 0x9076 + PATH_ERROR_POSITION_NV = 0x90AB + PATH_FILL_BOUNDING_BOX_NV = 0x90A1 + PATH_FILL_COVER_MODE_NV = 0x9082 + PATH_FILL_MASK_NV = 0x9081 + PATH_FILL_MODE_NV = 0x9080 + PATH_FORMAT_PS_NV = 0x9071 + PATH_FORMAT_SVG_NV = 0x9070 + PATH_GEN_COEFF_NV = 0x90B1 + PATH_GEN_COMPONENTS_NV = 0x90B3 + PATH_GEN_MODE_NV = 0x90B0 + PATH_INITIAL_DASH_CAP_NV = 0x907C + PATH_INITIAL_END_CAP_NV = 0x9077 + PATH_JOIN_STYLE_NV = 0x9079 + PATH_MAX_MODELVIEW_STACK_DEPTH_NV = 0x0D36 + PATH_MAX_PROJECTION_STACK_DEPTH_NV = 0x0D38 + PATH_MITER_LIMIT_NV = 0x907A + PATH_MODELVIEW_MATRIX_NV = 0x0BA6 + PATH_MODELVIEW_NV = 0x1700 + PATH_MODELVIEW_STACK_DEPTH_NV = 0x0BA3 + PATH_OBJECT_BOUNDING_BOX_NV = 0x908A + PATH_PROJECTION_MATRIX_NV = 0x0BA7 + PATH_PROJECTION_NV = 0x1701 + PATH_PROJECTION_STACK_DEPTH_NV = 0x0BA4 + PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV = 0x90BD + PATH_STENCIL_DEPTH_OFFSET_UNITS_NV = 0x90BE + PATH_STENCIL_FUNC_NV = 0x90B7 + PATH_STENCIL_REF_NV = 0x90B8 + PATH_STENCIL_VALUE_MASK_NV = 0x90B9 + PATH_STROKE_BOUNDING_BOX_NV = 0x90A2 + PATH_STROKE_COVER_MODE_NV = 0x9083 + PATH_STROKE_MASK_NV = 0x9084 + PATH_STROKE_WIDTH_NV = 0x9075 + PATH_TERMINAL_DASH_CAP_NV = 0x907D + PATH_TERMINAL_END_CAP_NV = 0x9078 + PATH_TRANSPOSE_MODELVIEW_MATRIX_NV = 0x84E3 + PATH_TRANSPOSE_PROJECTION_MATRIX_NV = 0x84E4 + PERCENTAGE_AMD = 0x8BC3 + PERFMON_RESULT_AMD = 0x8BC6 + PERFMON_RESULT_AVAILABLE_AMD = 0x8BC4 + PERFMON_RESULT_SIZE_AMD = 0x8BC5 + PERFQUERY_COUNTER_DATA_BOOL32_INTEL = 0x94FC + PERFQUERY_COUNTER_DATA_DOUBLE_INTEL = 0x94FB + PERFQUERY_COUNTER_DATA_FLOAT_INTEL = 0x94FA + PERFQUERY_COUNTER_DATA_UINT32_INTEL = 0x94F8 + PERFQUERY_COUNTER_DATA_UINT64_INTEL = 0x94F9 + PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL = 0x94FF + PERFQUERY_COUNTER_DURATION_NORM_INTEL = 0x94F1 + PERFQUERY_COUNTER_DURATION_RAW_INTEL = 0x94F2 + PERFQUERY_COUNTER_EVENT_INTEL = 0x94F0 + PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL = 0x94FE + PERFQUERY_COUNTER_RAW_INTEL = 0x94F4 + PERFQUERY_COUNTER_THROUGHPUT_INTEL = 0x94F3 + PERFQUERY_COUNTER_TIMESTAMP_INTEL = 0x94F5 + PERFQUERY_DONOT_FLUSH_INTEL = 0x83F9 + PERFQUERY_FLUSH_INTEL = 0x83FA + PERFQUERY_GLOBAL_CONTEXT_INTEL = 0x00000001 + PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL = 0x9500 + PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL = 0x94FD + PERFQUERY_SINGLE_CONTEXT_INTEL = 0x00000000 + PERFQUERY_WAIT_INTEL = 0x83FB + PINLIGHT_NV = 0x92A8 + PIXEL_BUFFER_BARRIER_BIT = 0x00000080 + PIXEL_PACK_BUFFER = 0x88EB + PIXEL_PACK_BUFFER_ARB = 0x88EB + PIXEL_PACK_BUFFER_BINDING = 0x88ED + PIXEL_PACK_BUFFER_BINDING_ARB = 0x88ED + PIXEL_UNPACK_BUFFER = 0x88EC + PIXEL_UNPACK_BUFFER_ARB = 0x88EC + PIXEL_UNPACK_BUFFER_BINDING = 0x88EF + PIXEL_UNPACK_BUFFER_BINDING_ARB = 0x88EF + PLUS_CLAMPED_ALPHA_NV = 0x92B2 + PLUS_CLAMPED_NV = 0x92B1 + PLUS_DARKER_NV = 0x9292 + PLUS_NV = 0x9291 + POINT = 0x1B00 + POINTS = 0x0000 + POINT_FADE_THRESHOLD_SIZE = 0x8128 + POINT_SIZE = 0x0B11 + POINT_SIZE_GRANULARITY = 0x0B13 + POINT_SIZE_RANGE = 0x0B12 + POINT_SPRITE_COORD_ORIGIN = 0x8CA0 + POLYGON_MODE = 0x0B40 + POLYGON_OFFSET_CLAMP = 0x8E1B + POLYGON_OFFSET_CLAMP_EXT = 0x8E1B + POLYGON_OFFSET_COMMAND_NV = 0x000E + POLYGON_OFFSET_FACTOR = 0x8038 + POLYGON_OFFSET_FILL = 0x8037 + POLYGON_OFFSET_LINE = 0x2A02 + POLYGON_OFFSET_POINT = 0x2A01 + POLYGON_OFFSET_UNITS = 0x2A00 + POLYGON_SMOOTH = 0x0B41 + POLYGON_SMOOTH_HINT = 0x0C53 + PRIMITIVES_GENERATED = 0x8C87 + PRIMITIVES_SUBMITTED_ARB = 0x82EF + PRIMITIVE_BOUNDING_BOX_ARB = 0x92BE + PRIMITIVE_RESTART = 0x8F9D + PRIMITIVE_RESTART_FIXED_INDEX = 0x8D69 + PRIMITIVE_RESTART_INDEX = 0x8F9E + PROGRAM = 0x82E2 + PROGRAMMABLE_SAMPLE_LOCATION_ARB = 0x9341 + PROGRAMMABLE_SAMPLE_LOCATION_NV = 0x9341 + PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_ARB = 0x9340 + PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV = 0x9340 + PROGRAM_BINARY_FORMATS = 0x87FF + PROGRAM_BINARY_LENGTH = 0x8741 + PROGRAM_BINARY_RETRIEVABLE_HINT = 0x8257 + PROGRAM_INPUT = 0x92E3 + PROGRAM_KHR = 0x82E2 + PROGRAM_MATRIX_EXT = 0x8E2D + PROGRAM_MATRIX_STACK_DEPTH_EXT = 0x8E2F + PROGRAM_OBJECT_EXT = 0x8B40 + PROGRAM_OUTPUT = 0x92E4 + PROGRAM_PIPELINE = 0x82E4 + PROGRAM_PIPELINE_BINDING = 0x825A + PROGRAM_PIPELINE_BINDING_EXT = 0x825A + PROGRAM_PIPELINE_KHR = 0x82E4 + PROGRAM_PIPELINE_OBJECT_EXT = 0x8A4F + PROGRAM_POINT_SIZE = 0x8642 + PROGRAM_POINT_SIZE_ARB = 0x8642 + PROGRAM_SEPARABLE = 0x8258 + PROGRAM_SEPARABLE_EXT = 0x8258 + PROVOKING_VERTEX = 0x8E4F + PROXY_TEXTURE_1D = 0x8063 + PROXY_TEXTURE_1D_ARRAY = 0x8C19 + PROXY_TEXTURE_2D = 0x8064 + PROXY_TEXTURE_2D_ARRAY = 0x8C1B + PROXY_TEXTURE_2D_MULTISAMPLE = 0x9101 + PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9103 + PROXY_TEXTURE_3D = 0x8070 + PROXY_TEXTURE_CUBE_MAP = 0x851B + PROXY_TEXTURE_CUBE_MAP_ARRAY = 0x900B + PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB = 0x900B + PROXY_TEXTURE_RECTANGLE = 0x84F7 + QUADRATIC_CURVE_TO_NV = 0x0A + QUADS = 0x0007 + QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION = 0x8E4C + QUERY = 0x82E3 + QUERY_BUFFER = 0x9192 + QUERY_BUFFER_BARRIER_BIT = 0x00008000 + QUERY_BUFFER_BINDING = 0x9193 + QUERY_BY_REGION_NO_WAIT = 0x8E16 + QUERY_BY_REGION_NO_WAIT_INVERTED = 0x8E1A + QUERY_BY_REGION_NO_WAIT_NV = 0x8E16 + QUERY_BY_REGION_WAIT = 0x8E15 + QUERY_BY_REGION_WAIT_INVERTED = 0x8E19 + QUERY_BY_REGION_WAIT_NV = 0x8E15 + QUERY_COUNTER_BITS = 0x8864 + QUERY_KHR = 0x82E3 + QUERY_NO_WAIT = 0x8E14 + QUERY_NO_WAIT_INVERTED = 0x8E18 + QUERY_NO_WAIT_NV = 0x8E14 + QUERY_OBJECT_EXT = 0x9153 + QUERY_RESULT = 0x8866 + QUERY_RESULT_AVAILABLE = 0x8867 + QUERY_RESULT_NO_WAIT = 0x9194 + QUERY_TARGET = 0x82EA + QUERY_WAIT = 0x8E13 + QUERY_WAIT_INVERTED = 0x8E17 + QUERY_WAIT_NV = 0x8E13 + R11F_G11F_B10F = 0x8C3A + R16 = 0x822A + R16F = 0x822D + R16I = 0x8233 + R16UI = 0x8234 + R16_SNORM = 0x8F98 + R32F = 0x822E + R32I = 0x8235 + R32UI = 0x8236 + R3_G3_B2 = 0x2A10 + R8 = 0x8229 + R8I = 0x8231 + R8UI = 0x8232 + R8_SNORM = 0x8F94 + RASTERIZER_DISCARD = 0x8C89 + RASTER_FIXED_SAMPLE_LOCATIONS_EXT = 0x932A + RASTER_MULTISAMPLE_EXT = 0x9327 + RASTER_SAMPLES_EXT = 0x9328 + READ_BUFFER = 0x0C02 + READ_FRAMEBUFFER = 0x8CA8 + READ_FRAMEBUFFER_BINDING = 0x8CAA + READ_ONLY = 0x88B8 + READ_PIXELS = 0x828C + READ_PIXELS_FORMAT = 0x828D + READ_PIXELS_TYPE = 0x828E + READ_WRITE = 0x88BA + RECT_NV = 0xF6 + RED = 0x1903 + RED_INTEGER = 0x8D94 + RED_NV = 0x1903 + REFERENCED_BY_COMPUTE_SHADER = 0x930B + REFERENCED_BY_FRAGMENT_SHADER = 0x930A + REFERENCED_BY_GEOMETRY_SHADER = 0x9309 + REFERENCED_BY_TESS_CONTROL_SHADER = 0x9307 + REFERENCED_BY_TESS_EVALUATION_SHADER = 0x9308 + REFERENCED_BY_VERTEX_SHADER = 0x9306 + RELATIVE_ARC_TO_NV = 0xFF + RELATIVE_CONIC_CURVE_TO_NV = 0x1B + RELATIVE_CUBIC_CURVE_TO_NV = 0x0D + RELATIVE_HORIZONTAL_LINE_TO_NV = 0x07 + RELATIVE_LARGE_CCW_ARC_TO_NV = 0x17 + RELATIVE_LARGE_CW_ARC_TO_NV = 0x19 + RELATIVE_LINE_TO_NV = 0x05 + RELATIVE_MOVE_TO_NV = 0x03 + RELATIVE_QUADRATIC_CURVE_TO_NV = 0x0B + RELATIVE_RECT_NV = 0xF7 + RELATIVE_ROUNDED_RECT2_NV = 0xEB + RELATIVE_ROUNDED_RECT4_NV = 0xED + RELATIVE_ROUNDED_RECT8_NV = 0xEF + RELATIVE_ROUNDED_RECT_NV = 0xE9 + RELATIVE_SMALL_CCW_ARC_TO_NV = 0x13 + RELATIVE_SMALL_CW_ARC_TO_NV = 0x15 + RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV = 0x11 + RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV = 0x0F + RELATIVE_VERTICAL_LINE_TO_NV = 0x09 + RENDERBUFFER = 0x8D41 + RENDERBUFFER_ALPHA_SIZE = 0x8D53 + RENDERBUFFER_BINDING = 0x8CA7 + RENDERBUFFER_BLUE_SIZE = 0x8D52 + RENDERBUFFER_COLOR_SAMPLES_NV = 0x8E10 + RENDERBUFFER_COVERAGE_SAMPLES_NV = 0x8CAB + RENDERBUFFER_DEPTH_SIZE = 0x8D54 + RENDERBUFFER_GREEN_SIZE = 0x8D51 + RENDERBUFFER_HEIGHT = 0x8D43 + RENDERBUFFER_INTERNAL_FORMAT = 0x8D44 + RENDERBUFFER_RED_SIZE = 0x8D50 + RENDERBUFFER_SAMPLES = 0x8CAB + RENDERBUFFER_STENCIL_SIZE = 0x8D55 + RENDERBUFFER_WIDTH = 0x8D42 + RENDERER = 0x1F01 + REPEAT = 0x2901 + REPLACE = 0x1E01 + RESET_NOTIFICATION_STRATEGY = 0x8256 + RESET_NOTIFICATION_STRATEGY_ARB = 0x8256 + RESET_NOTIFICATION_STRATEGY_KHR = 0x8256 + RESTART_PATH_NV = 0xF0 + RG = 0x8227 + RG16 = 0x822C + RG16F = 0x822F + RG16I = 0x8239 + RG16UI = 0x823A + RG16_SNORM = 0x8F99 + RG32F = 0x8230 + RG32I = 0x823B + RG32UI = 0x823C + RG8 = 0x822B + RG8I = 0x8237 + RG8UI = 0x8238 + RG8_SNORM = 0x8F95 + RGB = 0x1907 + RGB10 = 0x8052 + RGB10_A2 = 0x8059 + RGB10_A2UI = 0x906F + RGB12 = 0x8053 + RGB16 = 0x8054 + RGB16F = 0x881B + RGB16I = 0x8D89 + RGB16UI = 0x8D77 + RGB16_SNORM = 0x8F9A + RGB32F = 0x8815 + RGB32I = 0x8D83 + RGB32UI = 0x8D71 + RGB4 = 0x804F + RGB5 = 0x8050 + RGB565 = 0x8D62 + RGB5_A1 = 0x8057 + RGB8 = 0x8051 + RGB8I = 0x8D8F + RGB8UI = 0x8D7D + RGB8_SNORM = 0x8F96 + RGB9_E5 = 0x8C3D + RGBA = 0x1908 + RGBA12 = 0x805A + RGBA16 = 0x805B + RGBA16F = 0x881A + RGBA16I = 0x8D88 + RGBA16UI = 0x8D76 + RGBA16_SNORM = 0x8F9B + RGBA2 = 0x8055 + RGBA32F = 0x8814 + RGBA32I = 0x8D82 + RGBA32UI = 0x8D70 + RGBA4 = 0x8056 + RGBA8 = 0x8058 + RGBA8I = 0x8D8E + RGBA8UI = 0x8D7C + RGBA8_SNORM = 0x8F97 + RGBA_INTEGER = 0x8D99 + RGB_422_APPLE = 0x8A1F + RGB_INTEGER = 0x8D98 + RGB_RAW_422_APPLE = 0x8A51 + RG_INTEGER = 0x8228 + RIGHT = 0x0407 + ROUNDED_RECT2_NV = 0xEA + ROUNDED_RECT4_NV = 0xEC + ROUNDED_RECT8_NV = 0xEE + ROUNDED_RECT_NV = 0xE8 + ROUND_NV = 0x90A4 + SAMPLER = 0x82E6 + SAMPLER_1D = 0x8B5D + SAMPLER_1D_ARRAY = 0x8DC0 + SAMPLER_1D_ARRAY_SHADOW = 0x8DC3 + SAMPLER_1D_SHADOW = 0x8B61 + SAMPLER_2D = 0x8B5E + SAMPLER_2D_ARRAY = 0x8DC1 + SAMPLER_2D_ARRAY_SHADOW = 0x8DC4 + SAMPLER_2D_MULTISAMPLE = 0x9108 + SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910B + SAMPLER_2D_RECT = 0x8B63 + SAMPLER_2D_RECT_SHADOW = 0x8B64 + SAMPLER_2D_SHADOW = 0x8B62 + SAMPLER_3D = 0x8B5F + SAMPLER_BINDING = 0x8919 + SAMPLER_BUFFER = 0x8DC2 + SAMPLER_CUBE = 0x8B60 + SAMPLER_CUBE_MAP_ARRAY = 0x900C + SAMPLER_CUBE_MAP_ARRAY_ARB = 0x900C + SAMPLER_CUBE_MAP_ARRAY_SHADOW = 0x900D + SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB = 0x900D + SAMPLER_CUBE_SHADOW = 0x8DC5 + SAMPLER_KHR = 0x82E6 + SAMPLES = 0x80A9 + SAMPLES_PASSED = 0x8914 + SAMPLE_ALPHA_TO_COVERAGE = 0x809E + SAMPLE_ALPHA_TO_ONE = 0x809F + SAMPLE_BUFFERS = 0x80A8 + SAMPLE_COVERAGE = 0x80A0 + SAMPLE_COVERAGE_INVERT = 0x80AB + SAMPLE_COVERAGE_VALUE = 0x80AA + SAMPLE_LOCATION_ARB = 0x8E50 + SAMPLE_LOCATION_NV = 0x8E50 + SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_ARB = 0x933F + SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV = 0x933F + SAMPLE_LOCATION_PIXEL_GRID_WIDTH_ARB = 0x933E + SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV = 0x933E + SAMPLE_LOCATION_SUBPIXEL_BITS_ARB = 0x933D + SAMPLE_LOCATION_SUBPIXEL_BITS_NV = 0x933D + SAMPLE_MASK = 0x8E51 + SAMPLE_MASK_VALUE = 0x8E52 + SAMPLE_POSITION = 0x8E50 + SAMPLE_SHADING = 0x8C36 + SAMPLE_SHADING_ARB = 0x8C36 + SCISSOR_BOX = 0x0C10 + SCISSOR_COMMAND_NV = 0x0011 + SCISSOR_TEST = 0x0C11 + SCREEN_KHR = 0x9295 + SCREEN_NV = 0x9295 + SECONDARY_COLOR_ARRAY_ADDRESS_NV = 0x8F27 + SECONDARY_COLOR_ARRAY_LENGTH_NV = 0x8F31 + SEPARATE_ATTRIBS = 0x8C8D + SET = 0x150F + SHADER = 0x82E1 + SHADER_BINARY_FORMATS = 0x8DF8 + SHADER_BINARY_FORMAT_SPIR_V_ARB = 0x9551 + SHADER_COMPILER = 0x8DFA + SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV = 0x00000010 + SHADER_IMAGE_ACCESS_BARRIER_BIT = 0x00000020 + SHADER_IMAGE_ATOMIC = 0x82A6 + SHADER_IMAGE_LOAD = 0x82A4 + SHADER_IMAGE_STORE = 0x82A5 + SHADER_INCLUDE_ARB = 0x8DAE + SHADER_KHR = 0x82E1 + SHADER_OBJECT_EXT = 0x8B48 + SHADER_SOURCE_LENGTH = 0x8B88 + SHADER_STORAGE_BARRIER_BIT = 0x00002000 + SHADER_STORAGE_BLOCK = 0x92E6 + SHADER_STORAGE_BUFFER = 0x90D2 + SHADER_STORAGE_BUFFER_BINDING = 0x90D3 + SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT = 0x90DF + SHADER_STORAGE_BUFFER_SIZE = 0x90D5 + SHADER_STORAGE_BUFFER_START = 0x90D4 + SHADER_TYPE = 0x8B4F + SHADING_LANGUAGE_VERSION = 0x8B8C + SHARED_EDGE_NV = 0xC0 + SHORT = 0x1402 + SIGNALED = 0x9119 + SIGNED_NORMALIZED = 0x8F9C + SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST = 0x82AC + SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE = 0x82AE + SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST = 0x82AD + SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE = 0x82AF + SKIP_DECODE_EXT = 0x8A4A + SKIP_MISSING_GLYPH_NV = 0x90A9 + SMALL_CCW_ARC_TO_NV = 0x12 + SMALL_CW_ARC_TO_NV = 0x14 + SMOOTH_CUBIC_CURVE_TO_NV = 0x10 + SMOOTH_LINE_WIDTH_GRANULARITY = 0x0B23 + SMOOTH_LINE_WIDTH_RANGE = 0x0B22 + SMOOTH_POINT_SIZE_GRANULARITY = 0x0B13 + SMOOTH_POINT_SIZE_RANGE = 0x0B12 + SMOOTH_QUADRATIC_CURVE_TO_NV = 0x0E + SM_COUNT_NV = 0x933B + SOFTLIGHT_KHR = 0x929C + SOFTLIGHT_NV = 0x929C + SPARSE_BUFFER_PAGE_SIZE_ARB = 0x82F8 + SPARSE_STORAGE_BIT_ARB = 0x0400 + SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB = 0x91A9 + SPIR_V_BINARY_ARB = 0x9552 + SPIR_V_EXTENSIONS = 0x9553 + SQUARE_NV = 0x90A3 + SRC1_ALPHA = 0x8589 + SRC1_COLOR = 0x88F9 + SRC_ALPHA = 0x0302 + SRC_ALPHA_SATURATE = 0x0308 + SRC_ATOP_NV = 0x928E + SRC_COLOR = 0x0300 + SRC_IN_NV = 0x928A + SRC_NV = 0x9286 + SRC_OUT_NV = 0x928C + SRC_OVER_NV = 0x9288 + SRGB = 0x8C40 + SRGB8 = 0x8C41 + SRGB8_ALPHA8 = 0x8C43 + SRGB_ALPHA = 0x8C42 + SRGB_DECODE_ARB = 0x8299 + SRGB_READ = 0x8297 + SRGB_WRITE = 0x8298 + STACK_OVERFLOW = 0x0503 + STACK_OVERFLOW_KHR = 0x0503 + STACK_UNDERFLOW = 0x0504 + STACK_UNDERFLOW_KHR = 0x0504 + STANDARD_FONT_FORMAT_NV = 0x936C + STANDARD_FONT_NAME_NV = 0x9072 + STATIC_COPY = 0x88E6 + STATIC_DRAW = 0x88E4 + STATIC_READ = 0x88E5 + STENCIL = 0x1802 + STENCIL_ATTACHMENT = 0x8D20 + STENCIL_BACK_FAIL = 0x8801 + STENCIL_BACK_FUNC = 0x8800 + STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802 + STENCIL_BACK_PASS_DEPTH_PASS = 0x8803 + STENCIL_BACK_REF = 0x8CA3 + STENCIL_BACK_VALUE_MASK = 0x8CA4 + STENCIL_BACK_WRITEMASK = 0x8CA5 + STENCIL_BUFFER_BIT = 0x00000400 + STENCIL_CLEAR_VALUE = 0x0B91 + STENCIL_COMPONENTS = 0x8285 + STENCIL_FAIL = 0x0B94 + STENCIL_FUNC = 0x0B92 + STENCIL_INDEX = 0x1901 + STENCIL_INDEX1 = 0x8D46 + STENCIL_INDEX16 = 0x8D49 + STENCIL_INDEX4 = 0x8D47 + STENCIL_INDEX8 = 0x8D48 + STENCIL_PASS_DEPTH_FAIL = 0x0B95 + STENCIL_PASS_DEPTH_PASS = 0x0B96 + STENCIL_REF = 0x0B97 + STENCIL_REF_COMMAND_NV = 0x000C + STENCIL_RENDERABLE = 0x8288 + STENCIL_SAMPLES_NV = 0x932E + STENCIL_TEST = 0x0B90 + STENCIL_VALUE_MASK = 0x0B93 + STENCIL_WRITEMASK = 0x0B98 + STEREO = 0x0C33 + STREAM_COPY = 0x88E2 + STREAM_DRAW = 0x88E0 + STREAM_READ = 0x88E1 + SUBPIXEL_BITS = 0x0D50 + SUBPIXEL_PRECISION_BIAS_X_BITS_NV = 0x9347 + SUBPIXEL_PRECISION_BIAS_Y_BITS_NV = 0x9348 + SUPERSAMPLE_SCALE_X_NV = 0x9372 + SUPERSAMPLE_SCALE_Y_NV = 0x9373 + SYNC_CL_EVENT_ARB = 0x8240 + SYNC_CL_EVENT_COMPLETE_ARB = 0x8241 + SYNC_CONDITION = 0x9113 + SYNC_FENCE = 0x9116 + SYNC_FLAGS = 0x9115 + SYNC_FLUSH_COMMANDS_BIT = 0x00000001 + SYNC_GPU_COMMANDS_COMPLETE = 0x9117 + SYNC_STATUS = 0x9114 + SYSTEM_FONT_NAME_NV = 0x9073 + TERMINATE_SEQUENCE_COMMAND_NV = 0x0000 + TESS_CONTROL_OUTPUT_VERTICES = 0x8E75 + TESS_CONTROL_SHADER = 0x8E88 + TESS_CONTROL_SHADER_BIT = 0x00000008 + TESS_CONTROL_SHADER_PATCHES_ARB = 0x82F1 + TESS_CONTROL_SUBROUTINE = 0x92E9 + TESS_CONTROL_SUBROUTINE_UNIFORM = 0x92EF + TESS_CONTROL_TEXTURE = 0x829C + TESS_EVALUATION_SHADER = 0x8E87 + TESS_EVALUATION_SHADER_BIT = 0x00000010 + TESS_EVALUATION_SHADER_INVOCATIONS_ARB = 0x82F2 + TESS_EVALUATION_SUBROUTINE = 0x92EA + TESS_EVALUATION_SUBROUTINE_UNIFORM = 0x92F0 + TESS_EVALUATION_TEXTURE = 0x829D + TESS_GEN_MODE = 0x8E76 + TESS_GEN_POINT_MODE = 0x8E79 + TESS_GEN_SPACING = 0x8E77 + TESS_GEN_VERTEX_ORDER = 0x8E78 + TEXTURE = 0x1702 + TEXTURE0 = 0x84C0 + TEXTURE1 = 0x84C1 + TEXTURE10 = 0x84CA + TEXTURE11 = 0x84CB + TEXTURE12 = 0x84CC + TEXTURE13 = 0x84CD + TEXTURE14 = 0x84CE + TEXTURE15 = 0x84CF + TEXTURE16 = 0x84D0 + TEXTURE17 = 0x84D1 + TEXTURE18 = 0x84D2 + TEXTURE19 = 0x84D3 + TEXTURE2 = 0x84C2 + TEXTURE20 = 0x84D4 + TEXTURE21 = 0x84D5 + TEXTURE22 = 0x84D6 + TEXTURE23 = 0x84D7 + TEXTURE24 = 0x84D8 + TEXTURE25 = 0x84D9 + TEXTURE26 = 0x84DA + TEXTURE27 = 0x84DB + TEXTURE28 = 0x84DC + TEXTURE29 = 0x84DD + TEXTURE3 = 0x84C3 + TEXTURE30 = 0x84DE + TEXTURE31 = 0x84DF + TEXTURE4 = 0x84C4 + TEXTURE5 = 0x84C5 + TEXTURE6 = 0x84C6 + TEXTURE7 = 0x84C7 + TEXTURE8 = 0x84C8 + TEXTURE9 = 0x84C9 + TEXTURE_1D = 0x0DE0 + TEXTURE_1D_ARRAY = 0x8C18 + TEXTURE_2D = 0x0DE1 + TEXTURE_2D_ARRAY = 0x8C1A + TEXTURE_2D_MULTISAMPLE = 0x9100 + TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9102 + TEXTURE_3D = 0x806F + TEXTURE_ALPHA_SIZE = 0x805F + TEXTURE_ALPHA_TYPE = 0x8C13 + TEXTURE_BASE_LEVEL = 0x813C + TEXTURE_BINDING_1D = 0x8068 + TEXTURE_BINDING_1D_ARRAY = 0x8C1C + TEXTURE_BINDING_2D = 0x8069 + TEXTURE_BINDING_2D_ARRAY = 0x8C1D + TEXTURE_BINDING_2D_MULTISAMPLE = 0x9104 + TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY = 0x9105 + TEXTURE_BINDING_3D = 0x806A + TEXTURE_BINDING_BUFFER = 0x8C2C + TEXTURE_BINDING_BUFFER_ARB = 0x8C2C + TEXTURE_BINDING_CUBE_MAP = 0x8514 + TEXTURE_BINDING_CUBE_MAP_ARRAY = 0x900A + TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB = 0x900A + TEXTURE_BINDING_RECTANGLE = 0x84F6 + TEXTURE_BLUE_SIZE = 0x805E + TEXTURE_BLUE_TYPE = 0x8C12 + TEXTURE_BORDER_COLOR = 0x1004 + TEXTURE_BUFFER = 0x8C2A + TEXTURE_BUFFER_ARB = 0x8C2A + TEXTURE_BUFFER_DATA_STORE_BINDING = 0x8C2D + TEXTURE_BUFFER_DATA_STORE_BINDING_ARB = 0x8C2D + TEXTURE_BUFFER_FORMAT_ARB = 0x8C2E + TEXTURE_BUFFER_OFFSET = 0x919D + TEXTURE_BUFFER_OFFSET_ALIGNMENT = 0x919F + TEXTURE_BUFFER_SIZE = 0x919E + TEXTURE_COMPARE_FUNC = 0x884D + TEXTURE_COMPARE_MODE = 0x884C + TEXTURE_COMPRESSED = 0x86A1 + TEXTURE_COMPRESSED_BLOCK_HEIGHT = 0x82B2 + TEXTURE_COMPRESSED_BLOCK_SIZE = 0x82B3 + TEXTURE_COMPRESSED_BLOCK_WIDTH = 0x82B1 + TEXTURE_COMPRESSED_IMAGE_SIZE = 0x86A0 + TEXTURE_COMPRESSION_HINT = 0x84EF + TEXTURE_COORD_ARRAY_ADDRESS_NV = 0x8F25 + TEXTURE_COORD_ARRAY_LENGTH_NV = 0x8F2F + TEXTURE_CUBE_MAP = 0x8513 + TEXTURE_CUBE_MAP_ARRAY = 0x9009 + TEXTURE_CUBE_MAP_ARRAY_ARB = 0x9009 + TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516 + TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518 + TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A + TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515 + TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517 + TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519 + TEXTURE_CUBE_MAP_SEAMLESS = 0x884F + TEXTURE_DEPTH = 0x8071 + TEXTURE_DEPTH_SIZE = 0x884A + TEXTURE_DEPTH_TYPE = 0x8C16 + TEXTURE_FETCH_BARRIER_BIT = 0x00000008 + TEXTURE_FIXED_SAMPLE_LOCATIONS = 0x9107 + TEXTURE_GATHER = 0x82A2 + TEXTURE_GATHER_SHADOW = 0x82A3 + TEXTURE_GREEN_SIZE = 0x805D + TEXTURE_GREEN_TYPE = 0x8C11 + TEXTURE_HEIGHT = 0x1001 + TEXTURE_IMAGE_FORMAT = 0x828F + TEXTURE_IMAGE_TYPE = 0x8290 + TEXTURE_IMMUTABLE_FORMAT = 0x912F + TEXTURE_IMMUTABLE_LEVELS = 0x82DF + TEXTURE_INTERNAL_FORMAT = 0x1003 + TEXTURE_LOD_BIAS = 0x8501 + TEXTURE_MAG_FILTER = 0x2800 + TEXTURE_MAX_ANISOTROPY = 0x84FE + TEXTURE_MAX_LEVEL = 0x813D + TEXTURE_MAX_LOD = 0x813B + TEXTURE_MIN_FILTER = 0x2801 + TEXTURE_MIN_LOD = 0x813A + TEXTURE_RECTANGLE = 0x84F5 + TEXTURE_REDUCTION_MODE_ARB = 0x9366 + TEXTURE_REDUCTION_MODE_EXT = 0x9366 + TEXTURE_RED_SIZE = 0x805C + TEXTURE_RED_TYPE = 0x8C10 + TEXTURE_SAMPLES = 0x9106 + TEXTURE_SHADOW = 0x82A1 + TEXTURE_SHARED_SIZE = 0x8C3F + TEXTURE_SPARSE_ARB = 0x91A6 + TEXTURE_SRGB_DECODE_EXT = 0x8A48 + TEXTURE_STENCIL_SIZE = 0x88F1 + TEXTURE_SWIZZLE_A = 0x8E45 + TEXTURE_SWIZZLE_B = 0x8E44 + TEXTURE_SWIZZLE_G = 0x8E43 + TEXTURE_SWIZZLE_R = 0x8E42 + TEXTURE_SWIZZLE_RGBA = 0x8E46 + TEXTURE_TARGET = 0x1006 + TEXTURE_UPDATE_BARRIER_BIT = 0x00000100 + TEXTURE_VIEW = 0x82B5 + TEXTURE_VIEW_MIN_LAYER = 0x82DD + TEXTURE_VIEW_MIN_LEVEL = 0x82DB + TEXTURE_VIEW_NUM_LAYERS = 0x82DE + TEXTURE_VIEW_NUM_LEVELS = 0x82DC + TEXTURE_WIDTH = 0x1000 + TEXTURE_WRAP_R = 0x8072 + TEXTURE_WRAP_S = 0x2802 + TEXTURE_WRAP_T = 0x2803 + TIMEOUT_EXPIRED = 0x911B + TIMEOUT_IGNORED = 0xFFFFFFFFFFFFFFFF + TIMESTAMP = 0x8E28 + TIME_ELAPSED = 0x88BF + TOP_LEVEL_ARRAY_SIZE = 0x930C + TOP_LEVEL_ARRAY_STRIDE = 0x930D + TRANSFORM_FEEDBACK = 0x8E22 + TRANSFORM_FEEDBACK_BARRIER_BIT = 0x00000800 + TRANSFORM_FEEDBACK_BINDING = 0x8E25 + TRANSFORM_FEEDBACK_BUFFER = 0x8C8E + TRANSFORM_FEEDBACK_BUFFER_ACTIVE = 0x8E24 + TRANSFORM_FEEDBACK_BUFFER_BINDING = 0x8C8F + TRANSFORM_FEEDBACK_BUFFER_INDEX = 0x934B + TRANSFORM_FEEDBACK_BUFFER_MODE = 0x8C7F + TRANSFORM_FEEDBACK_BUFFER_PAUSED = 0x8E23 + TRANSFORM_FEEDBACK_BUFFER_SIZE = 0x8C85 + TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84 + TRANSFORM_FEEDBACK_BUFFER_STRIDE = 0x934C + TRANSFORM_FEEDBACK_OVERFLOW_ARB = 0x82EC + TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 0x8C88 + TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB = 0x82ED + TRANSFORM_FEEDBACK_VARYING = 0x92F4 + TRANSFORM_FEEDBACK_VARYINGS = 0x8C83 + TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH = 0x8C76 + TRANSLATE_2D_NV = 0x9090 + TRANSLATE_3D_NV = 0x9091 + TRANSLATE_X_NV = 0x908E + TRANSLATE_Y_NV = 0x908F + TRANSPOSE_AFFINE_2D_NV = 0x9096 + TRANSPOSE_AFFINE_3D_NV = 0x9098 + TRANSPOSE_PROGRAM_MATRIX_EXT = 0x8E2E + TRIANGLES = 0x0004 + TRIANGLES_ADJACENCY = 0x000C + TRIANGLES_ADJACENCY_ARB = 0x000C + TRIANGLE_FAN = 0x0006 + TRIANGLE_STRIP = 0x0005 + TRIANGLE_STRIP_ADJACENCY = 0x000D + TRIANGLE_STRIP_ADJACENCY_ARB = 0x000D + TRIANGULAR_NV = 0x90A5 + TRUE = 1 + TYPE = 0x92FA + UNCORRELATED_NV = 0x9282 + UNDEFINED_VERTEX = 0x8260 + UNIFORM = 0x92E1 + UNIFORM_ADDRESS_COMMAND_NV = 0x000A + UNIFORM_ARRAY_STRIDE = 0x8A3C + UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX = 0x92DA + UNIFORM_BARRIER_BIT = 0x00000004 + UNIFORM_BLOCK = 0x92E2 + UNIFORM_BLOCK_ACTIVE_UNIFORMS = 0x8A42 + UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43 + UNIFORM_BLOCK_BINDING = 0x8A3F + UNIFORM_BLOCK_DATA_SIZE = 0x8A40 + UNIFORM_BLOCK_INDEX = 0x8A3A + UNIFORM_BLOCK_NAME_LENGTH = 0x8A41 + UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER = 0x90EC + UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 0x8A46 + UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER = 0x8A45 + UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER = 0x84F0 + UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x84F1 + UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 0x8A44 + UNIFORM_BUFFER = 0x8A11 + UNIFORM_BUFFER_ADDRESS_NV = 0x936F + UNIFORM_BUFFER_BINDING = 0x8A28 + UNIFORM_BUFFER_LENGTH_NV = 0x9370 + UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34 + UNIFORM_BUFFER_SIZE = 0x8A2A + UNIFORM_BUFFER_START = 0x8A29 + UNIFORM_BUFFER_UNIFIED_NV = 0x936E + UNIFORM_IS_ROW_MAJOR = 0x8A3E + UNIFORM_MATRIX_STRIDE = 0x8A3D + UNIFORM_NAME_LENGTH = 0x8A39 + UNIFORM_OFFSET = 0x8A3B + UNIFORM_SIZE = 0x8A38 + UNIFORM_TYPE = 0x8A37 + UNKNOWN_CONTEXT_RESET = 0x8255 + UNKNOWN_CONTEXT_RESET_ARB = 0x8255 + UNKNOWN_CONTEXT_RESET_KHR = 0x8255 + UNPACK_ALIGNMENT = 0x0CF5 + UNPACK_COMPRESSED_BLOCK_DEPTH = 0x9129 + UNPACK_COMPRESSED_BLOCK_HEIGHT = 0x9128 + UNPACK_COMPRESSED_BLOCK_SIZE = 0x912A + UNPACK_COMPRESSED_BLOCK_WIDTH = 0x9127 + UNPACK_IMAGE_HEIGHT = 0x806E + UNPACK_LSB_FIRST = 0x0CF1 + UNPACK_ROW_LENGTH = 0x0CF2 + UNPACK_SKIP_IMAGES = 0x806D + UNPACK_SKIP_PIXELS = 0x0CF4 + UNPACK_SKIP_ROWS = 0x0CF3 + UNPACK_SWAP_BYTES = 0x0CF0 + UNSIGNALED = 0x9118 + UNSIGNED_BYTE = 0x1401 + UNSIGNED_BYTE_2_3_3_REV = 0x8362 + UNSIGNED_BYTE_3_3_2 = 0x8032 + UNSIGNED_INT = 0x1405 + UNSIGNED_INT16_NV = 0x8FF0 + UNSIGNED_INT16_VEC2_NV = 0x8FF1 + UNSIGNED_INT16_VEC3_NV = 0x8FF2 + UNSIGNED_INT16_VEC4_NV = 0x8FF3 + UNSIGNED_INT64_AMD = 0x8BC2 + UNSIGNED_INT64_ARB = 0x140F + UNSIGNED_INT64_NV = 0x140F + UNSIGNED_INT64_VEC2_ARB = 0x8FF5 + UNSIGNED_INT64_VEC2_NV = 0x8FF5 + UNSIGNED_INT64_VEC3_ARB = 0x8FF6 + UNSIGNED_INT64_VEC3_NV = 0x8FF6 + UNSIGNED_INT64_VEC4_ARB = 0x8FF7 + UNSIGNED_INT64_VEC4_NV = 0x8FF7 + UNSIGNED_INT8_NV = 0x8FEC + UNSIGNED_INT8_VEC2_NV = 0x8FED + UNSIGNED_INT8_VEC3_NV = 0x8FEE + UNSIGNED_INT8_VEC4_NV = 0x8FEF + UNSIGNED_INT_10F_11F_11F_REV = 0x8C3B + UNSIGNED_INT_10_10_10_2 = 0x8036 + UNSIGNED_INT_24_8 = 0x84FA + UNSIGNED_INT_2_10_10_10_REV = 0x8368 + UNSIGNED_INT_5_9_9_9_REV = 0x8C3E + UNSIGNED_INT_8_8_8_8 = 0x8035 + UNSIGNED_INT_8_8_8_8_REV = 0x8367 + UNSIGNED_INT_ATOMIC_COUNTER = 0x92DB + UNSIGNED_INT_IMAGE_1D = 0x9062 + UNSIGNED_INT_IMAGE_1D_ARRAY = 0x9068 + UNSIGNED_INT_IMAGE_2D = 0x9063 + UNSIGNED_INT_IMAGE_2D_ARRAY = 0x9069 + UNSIGNED_INT_IMAGE_2D_MULTISAMPLE = 0x906B + UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY = 0x906C + UNSIGNED_INT_IMAGE_2D_RECT = 0x9065 + UNSIGNED_INT_IMAGE_3D = 0x9064 + UNSIGNED_INT_IMAGE_BUFFER = 0x9067 + UNSIGNED_INT_IMAGE_CUBE = 0x9066 + UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY = 0x906A + UNSIGNED_INT_SAMPLER_1D = 0x8DD1 + UNSIGNED_INT_SAMPLER_1D_ARRAY = 0x8DD6 + UNSIGNED_INT_SAMPLER_2D = 0x8DD2 + UNSIGNED_INT_SAMPLER_2D_ARRAY = 0x8DD7 + UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE = 0x910A + UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910D + UNSIGNED_INT_SAMPLER_2D_RECT = 0x8DD5 + UNSIGNED_INT_SAMPLER_3D = 0x8DD3 + UNSIGNED_INT_SAMPLER_BUFFER = 0x8DD8 + UNSIGNED_INT_SAMPLER_CUBE = 0x8DD4 + UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900F + UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB = 0x900F + UNSIGNED_INT_VEC2 = 0x8DC6 + UNSIGNED_INT_VEC3 = 0x8DC7 + UNSIGNED_INT_VEC4 = 0x8DC8 + UNSIGNED_NORMALIZED = 0x8C17 + UNSIGNED_SHORT = 0x1403 + UNSIGNED_SHORT_1_5_5_5_REV = 0x8366 + UNSIGNED_SHORT_4_4_4_4 = 0x8033 + UNSIGNED_SHORT_4_4_4_4_REV = 0x8365 + UNSIGNED_SHORT_5_5_5_1 = 0x8034 + UNSIGNED_SHORT_5_6_5 = 0x8363 + UNSIGNED_SHORT_5_6_5_REV = 0x8364 + UNSIGNED_SHORT_8_8_APPLE = 0x85BA + UNSIGNED_SHORT_8_8_REV_APPLE = 0x85BB + UPPER_LEFT = 0x8CA2 + USE_MISSING_GLYPH_NV = 0x90AA + UTF16_NV = 0x909B + UTF8_NV = 0x909A + VALIDATE_STATUS = 0x8B83 + VENDOR = 0x1F00 + VERSION = 0x1F02 + VERTEX_ARRAY = 0x8074 + VERTEX_ARRAY_ADDRESS_NV = 0x8F21 + VERTEX_ARRAY_BINDING = 0x85B5 + VERTEX_ARRAY_KHR = 0x8074 + VERTEX_ARRAY_LENGTH_NV = 0x8F2B + VERTEX_ARRAY_OBJECT_EXT = 0x9154 + VERTEX_ATTRIB_ARRAY_ADDRESS_NV = 0x8F20 + VERTEX_ATTRIB_ARRAY_BARRIER_BIT = 0x00000001 + VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F + VERTEX_ATTRIB_ARRAY_DIVISOR = 0x88FE + VERTEX_ATTRIB_ARRAY_DIVISOR_ARB = 0x88FE + VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622 + VERTEX_ATTRIB_ARRAY_INTEGER = 0x88FD + VERTEX_ATTRIB_ARRAY_LENGTH_NV = 0x8F2A + VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A + VERTEX_ATTRIB_ARRAY_POINTER = 0x8645 + VERTEX_ATTRIB_ARRAY_SIZE = 0x8623 + VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624 + VERTEX_ATTRIB_ARRAY_TYPE = 0x8625 + VERTEX_ATTRIB_ARRAY_UNIFIED_NV = 0x8F1E + VERTEX_ATTRIB_BINDING = 0x82D4 + VERTEX_ATTRIB_RELATIVE_OFFSET = 0x82D5 + VERTEX_BINDING_DIVISOR = 0x82D6 + VERTEX_BINDING_OFFSET = 0x82D7 + VERTEX_BINDING_STRIDE = 0x82D8 + VERTEX_PROGRAM_POINT_SIZE = 0x8642 + VERTEX_SHADER = 0x8B31 + VERTEX_SHADER_BIT = 0x00000001 + VERTEX_SHADER_BIT_EXT = 0x00000001 + VERTEX_SHADER_INVOCATIONS_ARB = 0x82F0 + VERTEX_SUBROUTINE = 0x92E8 + VERTEX_SUBROUTINE_UNIFORM = 0x92EE + VERTEX_TEXTURE = 0x829B + VERTICAL_LINE_TO_NV = 0x08 + VERTICES_SUBMITTED_ARB = 0x82EE + VIEWPORT = 0x0BA2 + VIEWPORT_BOUNDS_RANGE = 0x825D + VIEWPORT_COMMAND_NV = 0x0010 + VIEWPORT_INDEX_PROVOKING_VERTEX = 0x825F + VIEWPORT_POSITION_W_SCALE_NV = 0x937C + VIEWPORT_POSITION_W_SCALE_X_COEFF_NV = 0x937D + VIEWPORT_POSITION_W_SCALE_Y_COEFF_NV = 0x937E + VIEWPORT_SUBPIXEL_BITS = 0x825C + VIEWPORT_SWIZZLE_NEGATIVE_W_NV = 0x9357 + VIEWPORT_SWIZZLE_NEGATIVE_X_NV = 0x9351 + VIEWPORT_SWIZZLE_NEGATIVE_Y_NV = 0x9353 + VIEWPORT_SWIZZLE_NEGATIVE_Z_NV = 0x9355 + VIEWPORT_SWIZZLE_POSITIVE_W_NV = 0x9356 + VIEWPORT_SWIZZLE_POSITIVE_X_NV = 0x9350 + VIEWPORT_SWIZZLE_POSITIVE_Y_NV = 0x9352 + VIEWPORT_SWIZZLE_POSITIVE_Z_NV = 0x9354 + VIEWPORT_SWIZZLE_W_NV = 0x935B + VIEWPORT_SWIZZLE_X_NV = 0x9358 + VIEWPORT_SWIZZLE_Y_NV = 0x9359 + VIEWPORT_SWIZZLE_Z_NV = 0x935A + VIEW_CLASS_128_BITS = 0x82C4 + VIEW_CLASS_16_BITS = 0x82CA + VIEW_CLASS_24_BITS = 0x82C9 + VIEW_CLASS_32_BITS = 0x82C8 + VIEW_CLASS_48_BITS = 0x82C7 + VIEW_CLASS_64_BITS = 0x82C6 + VIEW_CLASS_8_BITS = 0x82CB + VIEW_CLASS_96_BITS = 0x82C5 + VIEW_CLASS_BPTC_FLOAT = 0x82D3 + VIEW_CLASS_BPTC_UNORM = 0x82D2 + VIEW_CLASS_RGTC1_RED = 0x82D0 + VIEW_CLASS_RGTC2_RG = 0x82D1 + VIEW_CLASS_S3TC_DXT1_RGB = 0x82CC + VIEW_CLASS_S3TC_DXT1_RGBA = 0x82CD + VIEW_CLASS_S3TC_DXT3_RGBA = 0x82CE + VIEW_CLASS_S3TC_DXT5_RGBA = 0x82CF + VIEW_COMPATIBILITY_CLASS = 0x82B6 + VIRTUAL_PAGE_SIZE_INDEX_ARB = 0x91A7 + VIRTUAL_PAGE_SIZE_X_ARB = 0x9195 + VIRTUAL_PAGE_SIZE_Y_ARB = 0x9196 + VIRTUAL_PAGE_SIZE_Z_ARB = 0x9197 + VIVIDLIGHT_NV = 0x92A6 + WAIT_FAILED = 0x911D + WARPS_PER_SM_NV = 0x933A + WARP_SIZE_NV = 0x9339 + WEIGHTED_AVERAGE_ARB = 0x9367 + WEIGHTED_AVERAGE_EXT = 0x9367 + WINDOW_RECTANGLE_EXT = 0x8F12 + WINDOW_RECTANGLE_MODE_EXT = 0x8F13 + WRITE_ONLY = 0x88B9 + XOR = 0x1506 + XOR_NV = 0x1506 + ZERO = 0 + ZERO_TO_ONE = 0x935F +) + +var ( + gpActiveProgramEXT C.GPACTIVEPROGRAMEXT + gpActiveShaderProgram C.GPACTIVESHADERPROGRAM + gpActiveShaderProgramEXT C.GPACTIVESHADERPROGRAMEXT + gpActiveTexture C.GPACTIVETEXTURE + gpApplyFramebufferAttachmentCMAAINTEL C.GPAPPLYFRAMEBUFFERATTACHMENTCMAAINTEL + gpAttachShader C.GPATTACHSHADER + gpBeginConditionalRender C.GPBEGINCONDITIONALRENDER + gpBeginConditionalRenderNV C.GPBEGINCONDITIONALRENDERNV + gpBeginPerfMonitorAMD C.GPBEGINPERFMONITORAMD + gpBeginPerfQueryINTEL C.GPBEGINPERFQUERYINTEL + gpBeginQuery C.GPBEGINQUERY + gpBeginQueryIndexed C.GPBEGINQUERYINDEXED + gpBeginTransformFeedback C.GPBEGINTRANSFORMFEEDBACK + gpBindAttribLocation C.GPBINDATTRIBLOCATION + gpBindBuffer C.GPBINDBUFFER + gpBindBufferBase C.GPBINDBUFFERBASE + gpBindBufferRange C.GPBINDBUFFERRANGE + gpBindBuffersBase C.GPBINDBUFFERSBASE + gpBindBuffersRange C.GPBINDBUFFERSRANGE + gpBindFragDataLocation C.GPBINDFRAGDATALOCATION + gpBindFragDataLocationIndexed C.GPBINDFRAGDATALOCATIONINDEXED + gpBindFramebuffer C.GPBINDFRAMEBUFFER + gpBindImageTexture C.GPBINDIMAGETEXTURE + gpBindImageTextures C.GPBINDIMAGETEXTURES + gpBindMultiTextureEXT C.GPBINDMULTITEXTUREEXT + gpBindProgramPipeline C.GPBINDPROGRAMPIPELINE + gpBindProgramPipelineEXT C.GPBINDPROGRAMPIPELINEEXT + gpBindRenderbuffer C.GPBINDRENDERBUFFER + gpBindSampler C.GPBINDSAMPLER + gpBindSamplers C.GPBINDSAMPLERS + gpBindTexture C.GPBINDTEXTURE + gpBindTextureUnit C.GPBINDTEXTUREUNIT + gpBindTextures C.GPBINDTEXTURES + gpBindTransformFeedback C.GPBINDTRANSFORMFEEDBACK + gpBindVertexArray C.GPBINDVERTEXARRAY + gpBindVertexBuffer C.GPBINDVERTEXBUFFER + gpBindVertexBuffers C.GPBINDVERTEXBUFFERS + gpBlendBarrierKHR C.GPBLENDBARRIERKHR + gpBlendBarrierNV C.GPBLENDBARRIERNV + gpBlendColor C.GPBLENDCOLOR + gpBlendEquation C.GPBLENDEQUATION + gpBlendEquationSeparate C.GPBLENDEQUATIONSEPARATE + gpBlendEquationSeparatei C.GPBLENDEQUATIONSEPARATEI + gpBlendEquationSeparateiARB C.GPBLENDEQUATIONSEPARATEIARB + gpBlendEquationi C.GPBLENDEQUATIONI + gpBlendEquationiARB C.GPBLENDEQUATIONIARB + gpBlendFunc C.GPBLENDFUNC + gpBlendFuncSeparate C.GPBLENDFUNCSEPARATE + gpBlendFuncSeparatei C.GPBLENDFUNCSEPARATEI + gpBlendFuncSeparateiARB C.GPBLENDFUNCSEPARATEIARB + gpBlendFunci C.GPBLENDFUNCI + gpBlendFunciARB C.GPBLENDFUNCIARB + gpBlendParameteriNV C.GPBLENDPARAMETERINV + gpBlitFramebuffer C.GPBLITFRAMEBUFFER + gpBlitNamedFramebuffer C.GPBLITNAMEDFRAMEBUFFER + gpBufferAddressRangeNV C.GPBUFFERADDRESSRANGENV + gpBufferData C.GPBUFFERDATA + gpBufferPageCommitmentARB C.GPBUFFERPAGECOMMITMENTARB + gpBufferStorage C.GPBUFFERSTORAGE + gpBufferSubData C.GPBUFFERSUBDATA + gpCallCommandListNV C.GPCALLCOMMANDLISTNV + gpCheckFramebufferStatus C.GPCHECKFRAMEBUFFERSTATUS + gpCheckNamedFramebufferStatus C.GPCHECKNAMEDFRAMEBUFFERSTATUS + gpCheckNamedFramebufferStatusEXT C.GPCHECKNAMEDFRAMEBUFFERSTATUSEXT + gpClampColor C.GPCLAMPCOLOR + gpClear C.GPCLEAR + gpClearBufferData C.GPCLEARBUFFERDATA + gpClearBufferSubData C.GPCLEARBUFFERSUBDATA + gpClearBufferfi C.GPCLEARBUFFERFI + gpClearBufferfv C.GPCLEARBUFFERFV + gpClearBufferiv C.GPCLEARBUFFERIV + gpClearBufferuiv C.GPCLEARBUFFERUIV + gpClearColor C.GPCLEARCOLOR + gpClearDepth C.GPCLEARDEPTH + gpClearDepthf C.GPCLEARDEPTHF + gpClearNamedBufferData C.GPCLEARNAMEDBUFFERDATA + gpClearNamedBufferDataEXT C.GPCLEARNAMEDBUFFERDATAEXT + gpClearNamedBufferSubData C.GPCLEARNAMEDBUFFERSUBDATA + gpClearNamedBufferSubDataEXT C.GPCLEARNAMEDBUFFERSUBDATAEXT + gpClearNamedFramebufferfi C.GPCLEARNAMEDFRAMEBUFFERFI + gpClearNamedFramebufferfv C.GPCLEARNAMEDFRAMEBUFFERFV + gpClearNamedFramebufferiv C.GPCLEARNAMEDFRAMEBUFFERIV + gpClearNamedFramebufferuiv C.GPCLEARNAMEDFRAMEBUFFERUIV + gpClearStencil C.GPCLEARSTENCIL + gpClearTexImage C.GPCLEARTEXIMAGE + gpClearTexSubImage C.GPCLEARTEXSUBIMAGE + gpClientAttribDefaultEXT C.GPCLIENTATTRIBDEFAULTEXT + gpClientWaitSync C.GPCLIENTWAITSYNC + gpClipControl C.GPCLIPCONTROL + gpColorFormatNV C.GPCOLORFORMATNV + gpColorMask C.GPCOLORMASK + gpColorMaski C.GPCOLORMASKI + gpCommandListSegmentsNV C.GPCOMMANDLISTSEGMENTSNV + gpCompileCommandListNV C.GPCOMPILECOMMANDLISTNV + gpCompileShader C.GPCOMPILESHADER + gpCompileShaderIncludeARB C.GPCOMPILESHADERINCLUDEARB + gpCompressedMultiTexImage1DEXT C.GPCOMPRESSEDMULTITEXIMAGE1DEXT + gpCompressedMultiTexImage2DEXT C.GPCOMPRESSEDMULTITEXIMAGE2DEXT + gpCompressedMultiTexImage3DEXT C.GPCOMPRESSEDMULTITEXIMAGE3DEXT + gpCompressedMultiTexSubImage1DEXT C.GPCOMPRESSEDMULTITEXSUBIMAGE1DEXT + gpCompressedMultiTexSubImage2DEXT C.GPCOMPRESSEDMULTITEXSUBIMAGE2DEXT + gpCompressedMultiTexSubImage3DEXT C.GPCOMPRESSEDMULTITEXSUBIMAGE3DEXT + gpCompressedTexImage1D C.GPCOMPRESSEDTEXIMAGE1D + gpCompressedTexImage2D C.GPCOMPRESSEDTEXIMAGE2D + gpCompressedTexImage3D C.GPCOMPRESSEDTEXIMAGE3D + gpCompressedTexSubImage1D C.GPCOMPRESSEDTEXSUBIMAGE1D + gpCompressedTexSubImage2D C.GPCOMPRESSEDTEXSUBIMAGE2D + gpCompressedTexSubImage3D C.GPCOMPRESSEDTEXSUBIMAGE3D + gpCompressedTextureImage1DEXT C.GPCOMPRESSEDTEXTUREIMAGE1DEXT + gpCompressedTextureImage2DEXT C.GPCOMPRESSEDTEXTUREIMAGE2DEXT + gpCompressedTextureImage3DEXT C.GPCOMPRESSEDTEXTUREIMAGE3DEXT + gpCompressedTextureSubImage1D C.GPCOMPRESSEDTEXTURESUBIMAGE1D + gpCompressedTextureSubImage1DEXT C.GPCOMPRESSEDTEXTURESUBIMAGE1DEXT + gpCompressedTextureSubImage2D C.GPCOMPRESSEDTEXTURESUBIMAGE2D + gpCompressedTextureSubImage2DEXT C.GPCOMPRESSEDTEXTURESUBIMAGE2DEXT + gpCompressedTextureSubImage3D C.GPCOMPRESSEDTEXTURESUBIMAGE3D + gpCompressedTextureSubImage3DEXT C.GPCOMPRESSEDTEXTURESUBIMAGE3DEXT + gpConservativeRasterParameterfNV C.GPCONSERVATIVERASTERPARAMETERFNV + gpConservativeRasterParameteriNV C.GPCONSERVATIVERASTERPARAMETERINV + gpCopyBufferSubData C.GPCOPYBUFFERSUBDATA + gpCopyImageSubData C.GPCOPYIMAGESUBDATA + gpCopyMultiTexImage1DEXT C.GPCOPYMULTITEXIMAGE1DEXT + gpCopyMultiTexImage2DEXT C.GPCOPYMULTITEXIMAGE2DEXT + gpCopyMultiTexSubImage1DEXT C.GPCOPYMULTITEXSUBIMAGE1DEXT + gpCopyMultiTexSubImage2DEXT C.GPCOPYMULTITEXSUBIMAGE2DEXT + gpCopyMultiTexSubImage3DEXT C.GPCOPYMULTITEXSUBIMAGE3DEXT + gpCopyNamedBufferSubData C.GPCOPYNAMEDBUFFERSUBDATA + gpCopyPathNV C.GPCOPYPATHNV + gpCopyTexImage1D C.GPCOPYTEXIMAGE1D + gpCopyTexImage2D C.GPCOPYTEXIMAGE2D + gpCopyTexSubImage1D C.GPCOPYTEXSUBIMAGE1D + gpCopyTexSubImage2D C.GPCOPYTEXSUBIMAGE2D + gpCopyTexSubImage3D C.GPCOPYTEXSUBIMAGE3D + gpCopyTextureImage1DEXT C.GPCOPYTEXTUREIMAGE1DEXT + gpCopyTextureImage2DEXT C.GPCOPYTEXTUREIMAGE2DEXT + gpCopyTextureSubImage1D C.GPCOPYTEXTURESUBIMAGE1D + gpCopyTextureSubImage1DEXT C.GPCOPYTEXTURESUBIMAGE1DEXT + gpCopyTextureSubImage2D C.GPCOPYTEXTURESUBIMAGE2D + gpCopyTextureSubImage2DEXT C.GPCOPYTEXTURESUBIMAGE2DEXT + gpCopyTextureSubImage3D C.GPCOPYTEXTURESUBIMAGE3D + gpCopyTextureSubImage3DEXT C.GPCOPYTEXTURESUBIMAGE3DEXT + gpCoverFillPathInstancedNV C.GPCOVERFILLPATHINSTANCEDNV + gpCoverFillPathNV C.GPCOVERFILLPATHNV + gpCoverStrokePathInstancedNV C.GPCOVERSTROKEPATHINSTANCEDNV + gpCoverStrokePathNV C.GPCOVERSTROKEPATHNV + gpCoverageModulationNV C.GPCOVERAGEMODULATIONNV + gpCoverageModulationTableNV C.GPCOVERAGEMODULATIONTABLENV + gpCreateBuffers C.GPCREATEBUFFERS + gpCreateCommandListsNV C.GPCREATECOMMANDLISTSNV + gpCreateFramebuffers C.GPCREATEFRAMEBUFFERS + gpCreatePerfQueryINTEL C.GPCREATEPERFQUERYINTEL + gpCreateProgram C.GPCREATEPROGRAM + gpCreateProgramPipelines C.GPCREATEPROGRAMPIPELINES + gpCreateQueries C.GPCREATEQUERIES + gpCreateRenderbuffers C.GPCREATERENDERBUFFERS + gpCreateSamplers C.GPCREATESAMPLERS + gpCreateShader C.GPCREATESHADER + gpCreateShaderProgramEXT C.GPCREATESHADERPROGRAMEXT + gpCreateShaderProgramv C.GPCREATESHADERPROGRAMV + gpCreateShaderProgramvEXT C.GPCREATESHADERPROGRAMVEXT + gpCreateStatesNV C.GPCREATESTATESNV + gpCreateSyncFromCLeventARB C.GPCREATESYNCFROMCLEVENTARB + gpCreateTextures C.GPCREATETEXTURES + gpCreateTransformFeedbacks C.GPCREATETRANSFORMFEEDBACKS + gpCreateVertexArrays C.GPCREATEVERTEXARRAYS + gpCullFace C.GPCULLFACE + gpDebugMessageCallback C.GPDEBUGMESSAGECALLBACK + gpDebugMessageCallbackARB C.GPDEBUGMESSAGECALLBACKARB + gpDebugMessageCallbackKHR C.GPDEBUGMESSAGECALLBACKKHR + gpDebugMessageControl C.GPDEBUGMESSAGECONTROL + gpDebugMessageControlARB C.GPDEBUGMESSAGECONTROLARB + gpDebugMessageControlKHR C.GPDEBUGMESSAGECONTROLKHR + gpDebugMessageInsert C.GPDEBUGMESSAGEINSERT + gpDebugMessageInsertARB C.GPDEBUGMESSAGEINSERTARB + gpDebugMessageInsertKHR C.GPDEBUGMESSAGEINSERTKHR + gpDeleteBuffers C.GPDELETEBUFFERS + gpDeleteCommandListsNV C.GPDELETECOMMANDLISTSNV + gpDeleteFramebuffers C.GPDELETEFRAMEBUFFERS + gpDeleteNamedStringARB C.GPDELETENAMEDSTRINGARB + gpDeletePathsNV C.GPDELETEPATHSNV + gpDeletePerfMonitorsAMD C.GPDELETEPERFMONITORSAMD + gpDeletePerfQueryINTEL C.GPDELETEPERFQUERYINTEL + gpDeleteProgram C.GPDELETEPROGRAM + gpDeleteProgramPipelines C.GPDELETEPROGRAMPIPELINES + gpDeleteProgramPipelinesEXT C.GPDELETEPROGRAMPIPELINESEXT + gpDeleteQueries C.GPDELETEQUERIES + gpDeleteRenderbuffers C.GPDELETERENDERBUFFERS + gpDeleteSamplers C.GPDELETESAMPLERS + gpDeleteShader C.GPDELETESHADER + gpDeleteStatesNV C.GPDELETESTATESNV + gpDeleteSync C.GPDELETESYNC + gpDeleteTextures C.GPDELETETEXTURES + gpDeleteTransformFeedbacks C.GPDELETETRANSFORMFEEDBACKS + gpDeleteVertexArrays C.GPDELETEVERTEXARRAYS + gpDepthFunc C.GPDEPTHFUNC + gpDepthMask C.GPDEPTHMASK + gpDepthRange C.GPDEPTHRANGE + gpDepthRangeArrayv C.GPDEPTHRANGEARRAYV + gpDepthRangeIndexed C.GPDEPTHRANGEINDEXED + gpDepthRangef C.GPDEPTHRANGEF + gpDetachShader C.GPDETACHSHADER + gpDisable C.GPDISABLE + gpDisableClientStateIndexedEXT C.GPDISABLECLIENTSTATEINDEXEDEXT + gpDisableClientStateiEXT C.GPDISABLECLIENTSTATEIEXT + gpDisableIndexedEXT C.GPDISABLEINDEXEDEXT + gpDisableVertexArrayAttrib C.GPDISABLEVERTEXARRAYATTRIB + gpDisableVertexArrayAttribEXT C.GPDISABLEVERTEXARRAYATTRIBEXT + gpDisableVertexArrayEXT C.GPDISABLEVERTEXARRAYEXT + gpDisableVertexAttribArray C.GPDISABLEVERTEXATTRIBARRAY + gpDisablei C.GPDISABLEI + gpDispatchCompute C.GPDISPATCHCOMPUTE + gpDispatchComputeGroupSizeARB C.GPDISPATCHCOMPUTEGROUPSIZEARB + gpDispatchComputeIndirect C.GPDISPATCHCOMPUTEINDIRECT + gpDrawArrays C.GPDRAWARRAYS + gpDrawArraysIndirect C.GPDRAWARRAYSINDIRECT + gpDrawArraysInstanced C.GPDRAWARRAYSINSTANCED + gpDrawArraysInstancedARB C.GPDRAWARRAYSINSTANCEDARB + gpDrawArraysInstancedBaseInstance C.GPDRAWARRAYSINSTANCEDBASEINSTANCE + gpDrawArraysInstancedEXT C.GPDRAWARRAYSINSTANCEDEXT + gpDrawBuffer C.GPDRAWBUFFER + gpDrawBuffers C.GPDRAWBUFFERS + gpDrawCommandsAddressNV C.GPDRAWCOMMANDSADDRESSNV + gpDrawCommandsNV C.GPDRAWCOMMANDSNV + gpDrawCommandsStatesAddressNV C.GPDRAWCOMMANDSSTATESADDRESSNV + gpDrawCommandsStatesNV C.GPDRAWCOMMANDSSTATESNV + gpDrawElements C.GPDRAWELEMENTS + gpDrawElementsBaseVertex C.GPDRAWELEMENTSBASEVERTEX + gpDrawElementsIndirect C.GPDRAWELEMENTSINDIRECT + gpDrawElementsInstanced C.GPDRAWELEMENTSINSTANCED + gpDrawElementsInstancedARB C.GPDRAWELEMENTSINSTANCEDARB + gpDrawElementsInstancedBaseInstance C.GPDRAWELEMENTSINSTANCEDBASEINSTANCE + gpDrawElementsInstancedBaseVertex C.GPDRAWELEMENTSINSTANCEDBASEVERTEX + gpDrawElementsInstancedBaseVertexBaseInstance C.GPDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCE + gpDrawElementsInstancedEXT C.GPDRAWELEMENTSINSTANCEDEXT + gpDrawRangeElements C.GPDRAWRANGEELEMENTS + gpDrawRangeElementsBaseVertex C.GPDRAWRANGEELEMENTSBASEVERTEX + gpDrawTransformFeedback C.GPDRAWTRANSFORMFEEDBACK + gpDrawTransformFeedbackInstanced C.GPDRAWTRANSFORMFEEDBACKINSTANCED + gpDrawTransformFeedbackStream C.GPDRAWTRANSFORMFEEDBACKSTREAM + gpDrawTransformFeedbackStreamInstanced C.GPDRAWTRANSFORMFEEDBACKSTREAMINSTANCED + gpDrawVkImageNV C.GPDRAWVKIMAGENV + gpEGLImageTargetTexStorageEXT C.GPEGLIMAGETARGETTEXSTORAGEEXT + gpEGLImageTargetTextureStorageEXT C.GPEGLIMAGETARGETTEXTURESTORAGEEXT + gpEdgeFlagFormatNV C.GPEDGEFLAGFORMATNV + gpEnable C.GPENABLE + gpEnableClientStateIndexedEXT C.GPENABLECLIENTSTATEINDEXEDEXT + gpEnableClientStateiEXT C.GPENABLECLIENTSTATEIEXT + gpEnableIndexedEXT C.GPENABLEINDEXEDEXT + gpEnableVertexArrayAttrib C.GPENABLEVERTEXARRAYATTRIB + gpEnableVertexArrayAttribEXT C.GPENABLEVERTEXARRAYATTRIBEXT + gpEnableVertexArrayEXT C.GPENABLEVERTEXARRAYEXT + gpEnableVertexAttribArray C.GPENABLEVERTEXATTRIBARRAY + gpEnablei C.GPENABLEI + gpEndConditionalRender C.GPENDCONDITIONALRENDER + gpEndConditionalRenderNV C.GPENDCONDITIONALRENDERNV + gpEndPerfMonitorAMD C.GPENDPERFMONITORAMD + gpEndPerfQueryINTEL C.GPENDPERFQUERYINTEL + gpEndQuery C.GPENDQUERY + gpEndQueryIndexed C.GPENDQUERYINDEXED + gpEndTransformFeedback C.GPENDTRANSFORMFEEDBACK + gpEvaluateDepthValuesARB C.GPEVALUATEDEPTHVALUESARB + gpFenceSync C.GPFENCESYNC + gpFinish C.GPFINISH + gpFlush C.GPFLUSH + gpFlushMappedBufferRange C.GPFLUSHMAPPEDBUFFERRANGE + gpFlushMappedNamedBufferRange C.GPFLUSHMAPPEDNAMEDBUFFERRANGE + gpFlushMappedNamedBufferRangeEXT C.GPFLUSHMAPPEDNAMEDBUFFERRANGEEXT + gpFogCoordFormatNV C.GPFOGCOORDFORMATNV + gpFragmentCoverageColorNV C.GPFRAGMENTCOVERAGECOLORNV + gpFramebufferDrawBufferEXT C.GPFRAMEBUFFERDRAWBUFFEREXT + gpFramebufferDrawBuffersEXT C.GPFRAMEBUFFERDRAWBUFFERSEXT + gpFramebufferFetchBarrierEXT C.GPFRAMEBUFFERFETCHBARRIEREXT + gpFramebufferParameteri C.GPFRAMEBUFFERPARAMETERI + gpFramebufferReadBufferEXT C.GPFRAMEBUFFERREADBUFFEREXT + gpFramebufferRenderbuffer C.GPFRAMEBUFFERRENDERBUFFER + gpFramebufferSampleLocationsfvARB C.GPFRAMEBUFFERSAMPLELOCATIONSFVARB + gpFramebufferSampleLocationsfvNV C.GPFRAMEBUFFERSAMPLELOCATIONSFVNV + gpFramebufferTexture C.GPFRAMEBUFFERTEXTURE + gpFramebufferTexture1D C.GPFRAMEBUFFERTEXTURE1D + gpFramebufferTexture2D C.GPFRAMEBUFFERTEXTURE2D + gpFramebufferTexture3D C.GPFRAMEBUFFERTEXTURE3D + gpFramebufferTextureARB C.GPFRAMEBUFFERTEXTUREARB + gpFramebufferTextureFaceARB C.GPFRAMEBUFFERTEXTUREFACEARB + gpFramebufferTextureLayer C.GPFRAMEBUFFERTEXTURELAYER + gpFramebufferTextureLayerARB C.GPFRAMEBUFFERTEXTURELAYERARB + gpFramebufferTextureMultiviewOVR C.GPFRAMEBUFFERTEXTUREMULTIVIEWOVR + gpFrontFace C.GPFRONTFACE + gpGenBuffers C.GPGENBUFFERS + gpGenFramebuffers C.GPGENFRAMEBUFFERS + gpGenPathsNV C.GPGENPATHSNV + gpGenPerfMonitorsAMD C.GPGENPERFMONITORSAMD + gpGenProgramPipelines C.GPGENPROGRAMPIPELINES + gpGenProgramPipelinesEXT C.GPGENPROGRAMPIPELINESEXT + gpGenQueries C.GPGENQUERIES + gpGenRenderbuffers C.GPGENRENDERBUFFERS + gpGenSamplers C.GPGENSAMPLERS + gpGenTextures C.GPGENTEXTURES + gpGenTransformFeedbacks C.GPGENTRANSFORMFEEDBACKS + gpGenVertexArrays C.GPGENVERTEXARRAYS + gpGenerateMipmap C.GPGENERATEMIPMAP + gpGenerateMultiTexMipmapEXT C.GPGENERATEMULTITEXMIPMAPEXT + gpGenerateTextureMipmap C.GPGENERATETEXTUREMIPMAP + gpGenerateTextureMipmapEXT C.GPGENERATETEXTUREMIPMAPEXT + gpGetActiveAtomicCounterBufferiv C.GPGETACTIVEATOMICCOUNTERBUFFERIV + gpGetActiveAttrib C.GPGETACTIVEATTRIB + gpGetActiveSubroutineName C.GPGETACTIVESUBROUTINENAME + gpGetActiveSubroutineUniformName C.GPGETACTIVESUBROUTINEUNIFORMNAME + gpGetActiveSubroutineUniformiv C.GPGETACTIVESUBROUTINEUNIFORMIV + gpGetActiveUniform C.GPGETACTIVEUNIFORM + gpGetActiveUniformBlockName C.GPGETACTIVEUNIFORMBLOCKNAME + gpGetActiveUniformBlockiv C.GPGETACTIVEUNIFORMBLOCKIV + gpGetActiveUniformName C.GPGETACTIVEUNIFORMNAME + gpGetActiveUniformsiv C.GPGETACTIVEUNIFORMSIV + gpGetAttachedShaders C.GPGETATTACHEDSHADERS + gpGetAttribLocation C.GPGETATTRIBLOCATION + gpGetBooleanIndexedvEXT C.GPGETBOOLEANINDEXEDVEXT + gpGetBooleani_v C.GPGETBOOLEANI_V + gpGetBooleanv C.GPGETBOOLEANV + gpGetBufferParameteri64v C.GPGETBUFFERPARAMETERI64V + gpGetBufferParameteriv C.GPGETBUFFERPARAMETERIV + gpGetBufferParameterui64vNV C.GPGETBUFFERPARAMETERUI64VNV + gpGetBufferPointerv C.GPGETBUFFERPOINTERV + gpGetBufferSubData C.GPGETBUFFERSUBDATA + gpGetCommandHeaderNV C.GPGETCOMMANDHEADERNV + gpGetCompressedMultiTexImageEXT C.GPGETCOMPRESSEDMULTITEXIMAGEEXT + gpGetCompressedTexImage C.GPGETCOMPRESSEDTEXIMAGE + gpGetCompressedTextureImage C.GPGETCOMPRESSEDTEXTUREIMAGE + gpGetCompressedTextureImageEXT C.GPGETCOMPRESSEDTEXTUREIMAGEEXT + gpGetCompressedTextureSubImage C.GPGETCOMPRESSEDTEXTURESUBIMAGE + gpGetCoverageModulationTableNV C.GPGETCOVERAGEMODULATIONTABLENV + gpGetDebugMessageLog C.GPGETDEBUGMESSAGELOG + gpGetDebugMessageLogARB C.GPGETDEBUGMESSAGELOGARB + gpGetDebugMessageLogKHR C.GPGETDEBUGMESSAGELOGKHR + gpGetDoubleIndexedvEXT C.GPGETDOUBLEINDEXEDVEXT + gpGetDoublei_v C.GPGETDOUBLEI_V + gpGetDoublei_vEXT C.GPGETDOUBLEI_VEXT + gpGetDoublev C.GPGETDOUBLEV + gpGetError C.GPGETERROR + gpGetFirstPerfQueryIdINTEL C.GPGETFIRSTPERFQUERYIDINTEL + gpGetFloatIndexedvEXT C.GPGETFLOATINDEXEDVEXT + gpGetFloati_v C.GPGETFLOATI_V + gpGetFloati_vEXT C.GPGETFLOATI_VEXT + gpGetFloatv C.GPGETFLOATV + gpGetFragDataIndex C.GPGETFRAGDATAINDEX + gpGetFragDataLocation C.GPGETFRAGDATALOCATION + gpGetFramebufferAttachmentParameteriv C.GPGETFRAMEBUFFERATTACHMENTPARAMETERIV + gpGetFramebufferParameteriv C.GPGETFRAMEBUFFERPARAMETERIV + gpGetFramebufferParameterivEXT C.GPGETFRAMEBUFFERPARAMETERIVEXT + gpGetGraphicsResetStatus C.GPGETGRAPHICSRESETSTATUS + gpGetGraphicsResetStatusARB C.GPGETGRAPHICSRESETSTATUSARB + gpGetGraphicsResetStatusKHR C.GPGETGRAPHICSRESETSTATUSKHR + gpGetImageHandleARB C.GPGETIMAGEHANDLEARB + gpGetImageHandleNV C.GPGETIMAGEHANDLENV + gpGetInteger64i_v C.GPGETINTEGER64I_V + gpGetInteger64v C.GPGETINTEGER64V + gpGetIntegerIndexedvEXT C.GPGETINTEGERINDEXEDVEXT + gpGetIntegeri_v C.GPGETINTEGERI_V + gpGetIntegerui64i_vNV C.GPGETINTEGERUI64I_VNV + gpGetIntegerui64vNV C.GPGETINTEGERUI64VNV + gpGetIntegerv C.GPGETINTEGERV + gpGetInternalformatSampleivNV C.GPGETINTERNALFORMATSAMPLEIVNV + gpGetInternalformati64v C.GPGETINTERNALFORMATI64V + gpGetInternalformativ C.GPGETINTERNALFORMATIV + gpGetMultiTexEnvfvEXT C.GPGETMULTITEXENVFVEXT + gpGetMultiTexEnvivEXT C.GPGETMULTITEXENVIVEXT + gpGetMultiTexGendvEXT C.GPGETMULTITEXGENDVEXT + gpGetMultiTexGenfvEXT C.GPGETMULTITEXGENFVEXT + gpGetMultiTexGenivEXT C.GPGETMULTITEXGENIVEXT + gpGetMultiTexImageEXT C.GPGETMULTITEXIMAGEEXT + gpGetMultiTexLevelParameterfvEXT C.GPGETMULTITEXLEVELPARAMETERFVEXT + gpGetMultiTexLevelParameterivEXT C.GPGETMULTITEXLEVELPARAMETERIVEXT + gpGetMultiTexParameterIivEXT C.GPGETMULTITEXPARAMETERIIVEXT + gpGetMultiTexParameterIuivEXT C.GPGETMULTITEXPARAMETERIUIVEXT + gpGetMultiTexParameterfvEXT C.GPGETMULTITEXPARAMETERFVEXT + gpGetMultiTexParameterivEXT C.GPGETMULTITEXPARAMETERIVEXT + gpGetMultisamplefv C.GPGETMULTISAMPLEFV + gpGetNamedBufferParameteri64v C.GPGETNAMEDBUFFERPARAMETERI64V + gpGetNamedBufferParameteriv C.GPGETNAMEDBUFFERPARAMETERIV + gpGetNamedBufferParameterivEXT C.GPGETNAMEDBUFFERPARAMETERIVEXT + gpGetNamedBufferParameterui64vNV C.GPGETNAMEDBUFFERPARAMETERUI64VNV + gpGetNamedBufferPointerv C.GPGETNAMEDBUFFERPOINTERV + gpGetNamedBufferPointervEXT C.GPGETNAMEDBUFFERPOINTERVEXT + gpGetNamedBufferSubData C.GPGETNAMEDBUFFERSUBDATA + gpGetNamedBufferSubDataEXT C.GPGETNAMEDBUFFERSUBDATAEXT + gpGetNamedFramebufferAttachmentParameteriv C.GPGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIV + gpGetNamedFramebufferAttachmentParameterivEXT C.GPGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXT + gpGetNamedFramebufferParameteriv C.GPGETNAMEDFRAMEBUFFERPARAMETERIV + gpGetNamedFramebufferParameterivEXT C.GPGETNAMEDFRAMEBUFFERPARAMETERIVEXT + gpGetNamedProgramLocalParameterIivEXT C.GPGETNAMEDPROGRAMLOCALPARAMETERIIVEXT + gpGetNamedProgramLocalParameterIuivEXT C.GPGETNAMEDPROGRAMLOCALPARAMETERIUIVEXT + gpGetNamedProgramLocalParameterdvEXT C.GPGETNAMEDPROGRAMLOCALPARAMETERDVEXT + gpGetNamedProgramLocalParameterfvEXT C.GPGETNAMEDPROGRAMLOCALPARAMETERFVEXT + gpGetNamedProgramStringEXT C.GPGETNAMEDPROGRAMSTRINGEXT + gpGetNamedProgramivEXT C.GPGETNAMEDPROGRAMIVEXT + gpGetNamedRenderbufferParameteriv C.GPGETNAMEDRENDERBUFFERPARAMETERIV + gpGetNamedRenderbufferParameterivEXT C.GPGETNAMEDRENDERBUFFERPARAMETERIVEXT + gpGetNamedStringARB C.GPGETNAMEDSTRINGARB + gpGetNamedStringivARB C.GPGETNAMEDSTRINGIVARB + gpGetNextPerfQueryIdINTEL C.GPGETNEXTPERFQUERYIDINTEL + gpGetObjectLabel C.GPGETOBJECTLABEL + gpGetObjectLabelEXT C.GPGETOBJECTLABELEXT + gpGetObjectLabelKHR C.GPGETOBJECTLABELKHR + gpGetObjectPtrLabel C.GPGETOBJECTPTRLABEL + gpGetObjectPtrLabelKHR C.GPGETOBJECTPTRLABELKHR + gpGetPathCommandsNV C.GPGETPATHCOMMANDSNV + gpGetPathCoordsNV C.GPGETPATHCOORDSNV + gpGetPathDashArrayNV C.GPGETPATHDASHARRAYNV + gpGetPathLengthNV C.GPGETPATHLENGTHNV + gpGetPathMetricRangeNV C.GPGETPATHMETRICRANGENV + gpGetPathMetricsNV C.GPGETPATHMETRICSNV + gpGetPathParameterfvNV C.GPGETPATHPARAMETERFVNV + gpGetPathParameterivNV C.GPGETPATHPARAMETERIVNV + gpGetPathSpacingNV C.GPGETPATHSPACINGNV + gpGetPerfCounterInfoINTEL C.GPGETPERFCOUNTERINFOINTEL + gpGetPerfMonitorCounterDataAMD C.GPGETPERFMONITORCOUNTERDATAAMD + gpGetPerfMonitorCounterInfoAMD C.GPGETPERFMONITORCOUNTERINFOAMD + gpGetPerfMonitorCounterStringAMD C.GPGETPERFMONITORCOUNTERSTRINGAMD + gpGetPerfMonitorCountersAMD C.GPGETPERFMONITORCOUNTERSAMD + gpGetPerfMonitorGroupStringAMD C.GPGETPERFMONITORGROUPSTRINGAMD + gpGetPerfMonitorGroupsAMD C.GPGETPERFMONITORGROUPSAMD + gpGetPerfQueryDataINTEL C.GPGETPERFQUERYDATAINTEL + gpGetPerfQueryIdByNameINTEL C.GPGETPERFQUERYIDBYNAMEINTEL + gpGetPerfQueryInfoINTEL C.GPGETPERFQUERYINFOINTEL + gpGetPointerIndexedvEXT C.GPGETPOINTERINDEXEDVEXT + gpGetPointeri_vEXT C.GPGETPOINTERI_VEXT + gpGetPointerv C.GPGETPOINTERV + gpGetPointervKHR C.GPGETPOINTERVKHR + gpGetProgramBinary C.GPGETPROGRAMBINARY + gpGetProgramInfoLog C.GPGETPROGRAMINFOLOG + gpGetProgramInterfaceiv C.GPGETPROGRAMINTERFACEIV + gpGetProgramPipelineInfoLog C.GPGETPROGRAMPIPELINEINFOLOG + gpGetProgramPipelineInfoLogEXT C.GPGETPROGRAMPIPELINEINFOLOGEXT + gpGetProgramPipelineiv C.GPGETPROGRAMPIPELINEIV + gpGetProgramPipelineivEXT C.GPGETPROGRAMPIPELINEIVEXT + gpGetProgramResourceIndex C.GPGETPROGRAMRESOURCEINDEX + gpGetProgramResourceLocation C.GPGETPROGRAMRESOURCELOCATION + gpGetProgramResourceLocationIndex C.GPGETPROGRAMRESOURCELOCATIONINDEX + gpGetProgramResourceName C.GPGETPROGRAMRESOURCENAME + gpGetProgramResourcefvNV C.GPGETPROGRAMRESOURCEFVNV + gpGetProgramResourceiv C.GPGETPROGRAMRESOURCEIV + gpGetProgramStageiv C.GPGETPROGRAMSTAGEIV + gpGetProgramiv C.GPGETPROGRAMIV + gpGetQueryBufferObjecti64v C.GPGETQUERYBUFFEROBJECTI64V + gpGetQueryBufferObjectiv C.GPGETQUERYBUFFEROBJECTIV + gpGetQueryBufferObjectui64v C.GPGETQUERYBUFFEROBJECTUI64V + gpGetQueryBufferObjectuiv C.GPGETQUERYBUFFEROBJECTUIV + gpGetQueryIndexediv C.GPGETQUERYINDEXEDIV + gpGetQueryObjecti64v C.GPGETQUERYOBJECTI64V + gpGetQueryObjectiv C.GPGETQUERYOBJECTIV + gpGetQueryObjectui64v C.GPGETQUERYOBJECTUI64V + gpGetQueryObjectuiv C.GPGETQUERYOBJECTUIV + gpGetQueryiv C.GPGETQUERYIV + gpGetRenderbufferParameteriv C.GPGETRENDERBUFFERPARAMETERIV + gpGetSamplerParameterIiv C.GPGETSAMPLERPARAMETERIIV + gpGetSamplerParameterIuiv C.GPGETSAMPLERPARAMETERIUIV + gpGetSamplerParameterfv C.GPGETSAMPLERPARAMETERFV + gpGetSamplerParameteriv C.GPGETSAMPLERPARAMETERIV + gpGetShaderInfoLog C.GPGETSHADERINFOLOG + gpGetShaderPrecisionFormat C.GPGETSHADERPRECISIONFORMAT + gpGetShaderSource C.GPGETSHADERSOURCE + gpGetShaderiv C.GPGETSHADERIV + gpGetStageIndexNV C.GPGETSTAGEINDEXNV + gpGetString C.GPGETSTRING + gpGetStringi C.GPGETSTRINGI + gpGetSubroutineIndex C.GPGETSUBROUTINEINDEX + gpGetSubroutineUniformLocation C.GPGETSUBROUTINEUNIFORMLOCATION + gpGetSynciv C.GPGETSYNCIV + gpGetTexImage C.GPGETTEXIMAGE + gpGetTexLevelParameterfv C.GPGETTEXLEVELPARAMETERFV + gpGetTexLevelParameteriv C.GPGETTEXLEVELPARAMETERIV + gpGetTexParameterIiv C.GPGETTEXPARAMETERIIV + gpGetTexParameterIuiv C.GPGETTEXPARAMETERIUIV + gpGetTexParameterfv C.GPGETTEXPARAMETERFV + gpGetTexParameteriv C.GPGETTEXPARAMETERIV + gpGetTextureHandleARB C.GPGETTEXTUREHANDLEARB + gpGetTextureHandleNV C.GPGETTEXTUREHANDLENV + gpGetTextureImage C.GPGETTEXTUREIMAGE + gpGetTextureImageEXT C.GPGETTEXTUREIMAGEEXT + gpGetTextureLevelParameterfv C.GPGETTEXTURELEVELPARAMETERFV + gpGetTextureLevelParameterfvEXT C.GPGETTEXTURELEVELPARAMETERFVEXT + gpGetTextureLevelParameteriv C.GPGETTEXTURELEVELPARAMETERIV + gpGetTextureLevelParameterivEXT C.GPGETTEXTURELEVELPARAMETERIVEXT + gpGetTextureParameterIiv C.GPGETTEXTUREPARAMETERIIV + gpGetTextureParameterIivEXT C.GPGETTEXTUREPARAMETERIIVEXT + gpGetTextureParameterIuiv C.GPGETTEXTUREPARAMETERIUIV + gpGetTextureParameterIuivEXT C.GPGETTEXTUREPARAMETERIUIVEXT + gpGetTextureParameterfv C.GPGETTEXTUREPARAMETERFV + gpGetTextureParameterfvEXT C.GPGETTEXTUREPARAMETERFVEXT + gpGetTextureParameteriv C.GPGETTEXTUREPARAMETERIV + gpGetTextureParameterivEXT C.GPGETTEXTUREPARAMETERIVEXT + gpGetTextureSamplerHandleARB C.GPGETTEXTURESAMPLERHANDLEARB + gpGetTextureSamplerHandleNV C.GPGETTEXTURESAMPLERHANDLENV + gpGetTextureSubImage C.GPGETTEXTURESUBIMAGE + gpGetTransformFeedbackVarying C.GPGETTRANSFORMFEEDBACKVARYING + gpGetTransformFeedbacki64_v C.GPGETTRANSFORMFEEDBACKI64_V + gpGetTransformFeedbacki_v C.GPGETTRANSFORMFEEDBACKI_V + gpGetTransformFeedbackiv C.GPGETTRANSFORMFEEDBACKIV + gpGetUniformBlockIndex C.GPGETUNIFORMBLOCKINDEX + gpGetUniformIndices C.GPGETUNIFORMINDICES + gpGetUniformLocation C.GPGETUNIFORMLOCATION + gpGetUniformSubroutineuiv C.GPGETUNIFORMSUBROUTINEUIV + gpGetUniformdv C.GPGETUNIFORMDV + gpGetUniformfv C.GPGETUNIFORMFV + gpGetUniformi64vARB C.GPGETUNIFORMI64VARB + gpGetUniformi64vNV C.GPGETUNIFORMI64VNV + gpGetUniformiv C.GPGETUNIFORMIV + gpGetUniformui64vARB C.GPGETUNIFORMUI64VARB + gpGetUniformui64vNV C.GPGETUNIFORMUI64VNV + gpGetUniformuiv C.GPGETUNIFORMUIV + gpGetVertexArrayIndexed64iv C.GPGETVERTEXARRAYINDEXED64IV + gpGetVertexArrayIndexediv C.GPGETVERTEXARRAYINDEXEDIV + gpGetVertexArrayIntegeri_vEXT C.GPGETVERTEXARRAYINTEGERI_VEXT + gpGetVertexArrayIntegervEXT C.GPGETVERTEXARRAYINTEGERVEXT + gpGetVertexArrayPointeri_vEXT C.GPGETVERTEXARRAYPOINTERI_VEXT + gpGetVertexArrayPointervEXT C.GPGETVERTEXARRAYPOINTERVEXT + gpGetVertexArrayiv C.GPGETVERTEXARRAYIV + gpGetVertexAttribIiv C.GPGETVERTEXATTRIBIIV + gpGetVertexAttribIuiv C.GPGETVERTEXATTRIBIUIV + gpGetVertexAttribLdv C.GPGETVERTEXATTRIBLDV + gpGetVertexAttribLi64vNV C.GPGETVERTEXATTRIBLI64VNV + gpGetVertexAttribLui64vARB C.GPGETVERTEXATTRIBLUI64VARB + gpGetVertexAttribLui64vNV C.GPGETVERTEXATTRIBLUI64VNV + gpGetVertexAttribPointerv C.GPGETVERTEXATTRIBPOINTERV + gpGetVertexAttribdv C.GPGETVERTEXATTRIBDV + gpGetVertexAttribfv C.GPGETVERTEXATTRIBFV + gpGetVertexAttribiv C.GPGETVERTEXATTRIBIV + gpGetVkProcAddrNV C.GPGETVKPROCADDRNV + gpGetnCompressedTexImageARB C.GPGETNCOMPRESSEDTEXIMAGEARB + gpGetnTexImageARB C.GPGETNTEXIMAGEARB + gpGetnUniformdvARB C.GPGETNUNIFORMDVARB + gpGetnUniformfv C.GPGETNUNIFORMFV + gpGetnUniformfvARB C.GPGETNUNIFORMFVARB + gpGetnUniformfvKHR C.GPGETNUNIFORMFVKHR + gpGetnUniformi64vARB C.GPGETNUNIFORMI64VARB + gpGetnUniformiv C.GPGETNUNIFORMIV + gpGetnUniformivARB C.GPGETNUNIFORMIVARB + gpGetnUniformivKHR C.GPGETNUNIFORMIVKHR + gpGetnUniformui64vARB C.GPGETNUNIFORMUI64VARB + gpGetnUniformuiv C.GPGETNUNIFORMUIV + gpGetnUniformuivARB C.GPGETNUNIFORMUIVARB + gpGetnUniformuivKHR C.GPGETNUNIFORMUIVKHR + gpHint C.GPHINT + gpIndexFormatNV C.GPINDEXFORMATNV + gpInsertEventMarkerEXT C.GPINSERTEVENTMARKEREXT + gpInterpolatePathsNV C.GPINTERPOLATEPATHSNV + gpInvalidateBufferData C.GPINVALIDATEBUFFERDATA + gpInvalidateBufferSubData C.GPINVALIDATEBUFFERSUBDATA + gpInvalidateFramebuffer C.GPINVALIDATEFRAMEBUFFER + gpInvalidateNamedFramebufferData C.GPINVALIDATENAMEDFRAMEBUFFERDATA + gpInvalidateNamedFramebufferSubData C.GPINVALIDATENAMEDFRAMEBUFFERSUBDATA + gpInvalidateSubFramebuffer C.GPINVALIDATESUBFRAMEBUFFER + gpInvalidateTexImage C.GPINVALIDATETEXIMAGE + gpInvalidateTexSubImage C.GPINVALIDATETEXSUBIMAGE + gpIsBuffer C.GPISBUFFER + gpIsBufferResidentNV C.GPISBUFFERRESIDENTNV + gpIsCommandListNV C.GPISCOMMANDLISTNV + gpIsEnabled C.GPISENABLED + gpIsEnabledIndexedEXT C.GPISENABLEDINDEXEDEXT + gpIsEnabledi C.GPISENABLEDI + gpIsFramebuffer C.GPISFRAMEBUFFER + gpIsImageHandleResidentARB C.GPISIMAGEHANDLERESIDENTARB + gpIsImageHandleResidentNV C.GPISIMAGEHANDLERESIDENTNV + gpIsNamedBufferResidentNV C.GPISNAMEDBUFFERRESIDENTNV + gpIsNamedStringARB C.GPISNAMEDSTRINGARB + gpIsPathNV C.GPISPATHNV + gpIsPointInFillPathNV C.GPISPOINTINFILLPATHNV + gpIsPointInStrokePathNV C.GPISPOINTINSTROKEPATHNV + gpIsProgram C.GPISPROGRAM + gpIsProgramPipeline C.GPISPROGRAMPIPELINE + gpIsProgramPipelineEXT C.GPISPROGRAMPIPELINEEXT + gpIsQuery C.GPISQUERY + gpIsRenderbuffer C.GPISRENDERBUFFER + gpIsSampler C.GPISSAMPLER + gpIsShader C.GPISSHADER + gpIsStateNV C.GPISSTATENV + gpIsSync C.GPISSYNC + gpIsTexture C.GPISTEXTURE + gpIsTextureHandleResidentARB C.GPISTEXTUREHANDLERESIDENTARB + gpIsTextureHandleResidentNV C.GPISTEXTUREHANDLERESIDENTNV + gpIsTransformFeedback C.GPISTRANSFORMFEEDBACK + gpIsVertexArray C.GPISVERTEXARRAY + gpLabelObjectEXT C.GPLABELOBJECTEXT + gpLineWidth C.GPLINEWIDTH + gpLinkProgram C.GPLINKPROGRAM + gpListDrawCommandsStatesClientNV C.GPLISTDRAWCOMMANDSSTATESCLIENTNV + gpLogicOp C.GPLOGICOP + gpMakeBufferNonResidentNV C.GPMAKEBUFFERNONRESIDENTNV + gpMakeBufferResidentNV C.GPMAKEBUFFERRESIDENTNV + gpMakeImageHandleNonResidentARB C.GPMAKEIMAGEHANDLENONRESIDENTARB + gpMakeImageHandleNonResidentNV C.GPMAKEIMAGEHANDLENONRESIDENTNV + gpMakeImageHandleResidentARB C.GPMAKEIMAGEHANDLERESIDENTARB + gpMakeImageHandleResidentNV C.GPMAKEIMAGEHANDLERESIDENTNV + gpMakeNamedBufferNonResidentNV C.GPMAKENAMEDBUFFERNONRESIDENTNV + gpMakeNamedBufferResidentNV C.GPMAKENAMEDBUFFERRESIDENTNV + gpMakeTextureHandleNonResidentARB C.GPMAKETEXTUREHANDLENONRESIDENTARB + gpMakeTextureHandleNonResidentNV C.GPMAKETEXTUREHANDLENONRESIDENTNV + gpMakeTextureHandleResidentARB C.GPMAKETEXTUREHANDLERESIDENTARB + gpMakeTextureHandleResidentNV C.GPMAKETEXTUREHANDLERESIDENTNV + gpMapBuffer C.GPMAPBUFFER + gpMapBufferRange C.GPMAPBUFFERRANGE + gpMapNamedBuffer C.GPMAPNAMEDBUFFER + gpMapNamedBufferEXT C.GPMAPNAMEDBUFFEREXT + gpMapNamedBufferRange C.GPMAPNAMEDBUFFERRANGE + gpMapNamedBufferRangeEXT C.GPMAPNAMEDBUFFERRANGEEXT + gpMatrixFrustumEXT C.GPMATRIXFRUSTUMEXT + gpMatrixLoad3x2fNV C.GPMATRIXLOAD3X2FNV + gpMatrixLoad3x3fNV C.GPMATRIXLOAD3X3FNV + gpMatrixLoadIdentityEXT C.GPMATRIXLOADIDENTITYEXT + gpMatrixLoadTranspose3x3fNV C.GPMATRIXLOADTRANSPOSE3X3FNV + gpMatrixLoadTransposedEXT C.GPMATRIXLOADTRANSPOSEDEXT + gpMatrixLoadTransposefEXT C.GPMATRIXLOADTRANSPOSEFEXT + gpMatrixLoaddEXT C.GPMATRIXLOADDEXT + gpMatrixLoadfEXT C.GPMATRIXLOADFEXT + gpMatrixMult3x2fNV C.GPMATRIXMULT3X2FNV + gpMatrixMult3x3fNV C.GPMATRIXMULT3X3FNV + gpMatrixMultTranspose3x3fNV C.GPMATRIXMULTTRANSPOSE3X3FNV + gpMatrixMultTransposedEXT C.GPMATRIXMULTTRANSPOSEDEXT + gpMatrixMultTransposefEXT C.GPMATRIXMULTTRANSPOSEFEXT + gpMatrixMultdEXT C.GPMATRIXMULTDEXT + gpMatrixMultfEXT C.GPMATRIXMULTFEXT + gpMatrixOrthoEXT C.GPMATRIXORTHOEXT + gpMatrixPopEXT C.GPMATRIXPOPEXT + gpMatrixPushEXT C.GPMATRIXPUSHEXT + gpMatrixRotatedEXT C.GPMATRIXROTATEDEXT + gpMatrixRotatefEXT C.GPMATRIXROTATEFEXT + gpMatrixScaledEXT C.GPMATRIXSCALEDEXT + gpMatrixScalefEXT C.GPMATRIXSCALEFEXT + gpMatrixTranslatedEXT C.GPMATRIXTRANSLATEDEXT + gpMatrixTranslatefEXT C.GPMATRIXTRANSLATEFEXT + gpMaxShaderCompilerThreadsARB C.GPMAXSHADERCOMPILERTHREADSARB + gpMaxShaderCompilerThreadsKHR C.GPMAXSHADERCOMPILERTHREADSKHR + gpMemoryBarrier C.GPMEMORYBARRIER + gpMemoryBarrierByRegion C.GPMEMORYBARRIERBYREGION + gpMinSampleShading C.GPMINSAMPLESHADING + gpMinSampleShadingARB C.GPMINSAMPLESHADINGARB + gpMultiDrawArrays C.GPMULTIDRAWARRAYS + gpMultiDrawArraysIndirect C.GPMULTIDRAWARRAYSINDIRECT + gpMultiDrawArraysIndirectBindlessCountNV C.GPMULTIDRAWARRAYSINDIRECTBINDLESSCOUNTNV + gpMultiDrawArraysIndirectBindlessNV C.GPMULTIDRAWARRAYSINDIRECTBINDLESSNV + gpMultiDrawArraysIndirectCountARB C.GPMULTIDRAWARRAYSINDIRECTCOUNTARB + gpMultiDrawElements C.GPMULTIDRAWELEMENTS + gpMultiDrawElementsBaseVertex C.GPMULTIDRAWELEMENTSBASEVERTEX + gpMultiDrawElementsIndirect C.GPMULTIDRAWELEMENTSINDIRECT + gpMultiDrawElementsIndirectBindlessCountNV C.GPMULTIDRAWELEMENTSINDIRECTBINDLESSCOUNTNV + gpMultiDrawElementsIndirectBindlessNV C.GPMULTIDRAWELEMENTSINDIRECTBINDLESSNV + gpMultiDrawElementsIndirectCountARB C.GPMULTIDRAWELEMENTSINDIRECTCOUNTARB + gpMultiTexBufferEXT C.GPMULTITEXBUFFEREXT + gpMultiTexCoordPointerEXT C.GPMULTITEXCOORDPOINTEREXT + gpMultiTexEnvfEXT C.GPMULTITEXENVFEXT + gpMultiTexEnvfvEXT C.GPMULTITEXENVFVEXT + gpMultiTexEnviEXT C.GPMULTITEXENVIEXT + gpMultiTexEnvivEXT C.GPMULTITEXENVIVEXT + gpMultiTexGendEXT C.GPMULTITEXGENDEXT + gpMultiTexGendvEXT C.GPMULTITEXGENDVEXT + gpMultiTexGenfEXT C.GPMULTITEXGENFEXT + gpMultiTexGenfvEXT C.GPMULTITEXGENFVEXT + gpMultiTexGeniEXT C.GPMULTITEXGENIEXT + gpMultiTexGenivEXT C.GPMULTITEXGENIVEXT + gpMultiTexImage1DEXT C.GPMULTITEXIMAGE1DEXT + gpMultiTexImage2DEXT C.GPMULTITEXIMAGE2DEXT + gpMultiTexImage3DEXT C.GPMULTITEXIMAGE3DEXT + gpMultiTexParameterIivEXT C.GPMULTITEXPARAMETERIIVEXT + gpMultiTexParameterIuivEXT C.GPMULTITEXPARAMETERIUIVEXT + gpMultiTexParameterfEXT C.GPMULTITEXPARAMETERFEXT + gpMultiTexParameterfvEXT C.GPMULTITEXPARAMETERFVEXT + gpMultiTexParameteriEXT C.GPMULTITEXPARAMETERIEXT + gpMultiTexParameterivEXT C.GPMULTITEXPARAMETERIVEXT + gpMultiTexRenderbufferEXT C.GPMULTITEXRENDERBUFFEREXT + gpMultiTexSubImage1DEXT C.GPMULTITEXSUBIMAGE1DEXT + gpMultiTexSubImage2DEXT C.GPMULTITEXSUBIMAGE2DEXT + gpMultiTexSubImage3DEXT C.GPMULTITEXSUBIMAGE3DEXT + gpNamedBufferData C.GPNAMEDBUFFERDATA + gpNamedBufferDataEXT C.GPNAMEDBUFFERDATAEXT + gpNamedBufferPageCommitmentARB C.GPNAMEDBUFFERPAGECOMMITMENTARB + gpNamedBufferPageCommitmentEXT C.GPNAMEDBUFFERPAGECOMMITMENTEXT + gpNamedBufferStorage C.GPNAMEDBUFFERSTORAGE + gpNamedBufferStorageEXT C.GPNAMEDBUFFERSTORAGEEXT + gpNamedBufferSubData C.GPNAMEDBUFFERSUBDATA + gpNamedBufferSubDataEXT C.GPNAMEDBUFFERSUBDATAEXT + gpNamedCopyBufferSubDataEXT C.GPNAMEDCOPYBUFFERSUBDATAEXT + gpNamedFramebufferDrawBuffer C.GPNAMEDFRAMEBUFFERDRAWBUFFER + gpNamedFramebufferDrawBuffers C.GPNAMEDFRAMEBUFFERDRAWBUFFERS + gpNamedFramebufferParameteri C.GPNAMEDFRAMEBUFFERPARAMETERI + gpNamedFramebufferParameteriEXT C.GPNAMEDFRAMEBUFFERPARAMETERIEXT + gpNamedFramebufferReadBuffer C.GPNAMEDFRAMEBUFFERREADBUFFER + gpNamedFramebufferRenderbuffer C.GPNAMEDFRAMEBUFFERRENDERBUFFER + gpNamedFramebufferRenderbufferEXT C.GPNAMEDFRAMEBUFFERRENDERBUFFEREXT + gpNamedFramebufferSampleLocationsfvARB C.GPNAMEDFRAMEBUFFERSAMPLELOCATIONSFVARB + gpNamedFramebufferSampleLocationsfvNV C.GPNAMEDFRAMEBUFFERSAMPLELOCATIONSFVNV + gpNamedFramebufferTexture C.GPNAMEDFRAMEBUFFERTEXTURE + gpNamedFramebufferTexture1DEXT C.GPNAMEDFRAMEBUFFERTEXTURE1DEXT + gpNamedFramebufferTexture2DEXT C.GPNAMEDFRAMEBUFFERTEXTURE2DEXT + gpNamedFramebufferTexture3DEXT C.GPNAMEDFRAMEBUFFERTEXTURE3DEXT + gpNamedFramebufferTextureEXT C.GPNAMEDFRAMEBUFFERTEXTUREEXT + gpNamedFramebufferTextureFaceEXT C.GPNAMEDFRAMEBUFFERTEXTUREFACEEXT + gpNamedFramebufferTextureLayer C.GPNAMEDFRAMEBUFFERTEXTURELAYER + gpNamedFramebufferTextureLayerEXT C.GPNAMEDFRAMEBUFFERTEXTURELAYEREXT + gpNamedProgramLocalParameter4dEXT C.GPNAMEDPROGRAMLOCALPARAMETER4DEXT + gpNamedProgramLocalParameter4dvEXT C.GPNAMEDPROGRAMLOCALPARAMETER4DVEXT + gpNamedProgramLocalParameter4fEXT C.GPNAMEDPROGRAMLOCALPARAMETER4FEXT + gpNamedProgramLocalParameter4fvEXT C.GPNAMEDPROGRAMLOCALPARAMETER4FVEXT + gpNamedProgramLocalParameterI4iEXT C.GPNAMEDPROGRAMLOCALPARAMETERI4IEXT + gpNamedProgramLocalParameterI4ivEXT C.GPNAMEDPROGRAMLOCALPARAMETERI4IVEXT + gpNamedProgramLocalParameterI4uiEXT C.GPNAMEDPROGRAMLOCALPARAMETERI4UIEXT + gpNamedProgramLocalParameterI4uivEXT C.GPNAMEDPROGRAMLOCALPARAMETERI4UIVEXT + gpNamedProgramLocalParameters4fvEXT C.GPNAMEDPROGRAMLOCALPARAMETERS4FVEXT + gpNamedProgramLocalParametersI4ivEXT C.GPNAMEDPROGRAMLOCALPARAMETERSI4IVEXT + gpNamedProgramLocalParametersI4uivEXT C.GPNAMEDPROGRAMLOCALPARAMETERSI4UIVEXT + gpNamedProgramStringEXT C.GPNAMEDPROGRAMSTRINGEXT + gpNamedRenderbufferStorage C.GPNAMEDRENDERBUFFERSTORAGE + gpNamedRenderbufferStorageEXT C.GPNAMEDRENDERBUFFERSTORAGEEXT + gpNamedRenderbufferStorageMultisample C.GPNAMEDRENDERBUFFERSTORAGEMULTISAMPLE + gpNamedRenderbufferStorageMultisampleCoverageEXT C.GPNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXT + gpNamedRenderbufferStorageMultisampleEXT C.GPNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXT + gpNamedStringARB C.GPNAMEDSTRINGARB + gpNormalFormatNV C.GPNORMALFORMATNV + gpObjectLabel C.GPOBJECTLABEL + gpObjectLabelKHR C.GPOBJECTLABELKHR + gpObjectPtrLabel C.GPOBJECTPTRLABEL + gpObjectPtrLabelKHR C.GPOBJECTPTRLABELKHR + gpPatchParameterfv C.GPPATCHPARAMETERFV + gpPatchParameteri C.GPPATCHPARAMETERI + gpPathCommandsNV C.GPPATHCOMMANDSNV + gpPathCoordsNV C.GPPATHCOORDSNV + gpPathCoverDepthFuncNV C.GPPATHCOVERDEPTHFUNCNV + gpPathDashArrayNV C.GPPATHDASHARRAYNV + gpPathGlyphIndexArrayNV C.GPPATHGLYPHINDEXARRAYNV + gpPathGlyphIndexRangeNV C.GPPATHGLYPHINDEXRANGENV + gpPathGlyphRangeNV C.GPPATHGLYPHRANGENV + gpPathGlyphsNV C.GPPATHGLYPHSNV + gpPathMemoryGlyphIndexArrayNV C.GPPATHMEMORYGLYPHINDEXARRAYNV + gpPathParameterfNV C.GPPATHPARAMETERFNV + gpPathParameterfvNV C.GPPATHPARAMETERFVNV + gpPathParameteriNV C.GPPATHPARAMETERINV + gpPathParameterivNV C.GPPATHPARAMETERIVNV + gpPathStencilDepthOffsetNV C.GPPATHSTENCILDEPTHOFFSETNV + gpPathStencilFuncNV C.GPPATHSTENCILFUNCNV + gpPathStringNV C.GPPATHSTRINGNV + gpPathSubCommandsNV C.GPPATHSUBCOMMANDSNV + gpPathSubCoordsNV C.GPPATHSUBCOORDSNV + gpPauseTransformFeedback C.GPPAUSETRANSFORMFEEDBACK + gpPixelStoref C.GPPIXELSTOREF + gpPixelStorei C.GPPIXELSTOREI + gpPointAlongPathNV C.GPPOINTALONGPATHNV + gpPointParameterf C.GPPOINTPARAMETERF + gpPointParameterfv C.GPPOINTPARAMETERFV + gpPointParameteri C.GPPOINTPARAMETERI + gpPointParameteriv C.GPPOINTPARAMETERIV + gpPointSize C.GPPOINTSIZE + gpPolygonMode C.GPPOLYGONMODE + gpPolygonOffset C.GPPOLYGONOFFSET + gpPolygonOffsetClamp C.GPPOLYGONOFFSETCLAMP + gpPolygonOffsetClampEXT C.GPPOLYGONOFFSETCLAMPEXT + gpPopDebugGroup C.GPPOPDEBUGGROUP + gpPopDebugGroupKHR C.GPPOPDEBUGGROUPKHR + gpPopGroupMarkerEXT C.GPPOPGROUPMARKEREXT + gpPrimitiveBoundingBoxARB C.GPPRIMITIVEBOUNDINGBOXARB + gpPrimitiveRestartIndex C.GPPRIMITIVERESTARTINDEX + gpProgramBinary C.GPPROGRAMBINARY + gpProgramParameteri C.GPPROGRAMPARAMETERI + gpProgramParameteriARB C.GPPROGRAMPARAMETERIARB + gpProgramParameteriEXT C.GPPROGRAMPARAMETERIEXT + gpProgramPathFragmentInputGenNV C.GPPROGRAMPATHFRAGMENTINPUTGENNV + gpProgramUniform1d C.GPPROGRAMUNIFORM1D + gpProgramUniform1dEXT C.GPPROGRAMUNIFORM1DEXT + gpProgramUniform1dv C.GPPROGRAMUNIFORM1DV + gpProgramUniform1dvEXT C.GPPROGRAMUNIFORM1DVEXT + gpProgramUniform1f C.GPPROGRAMUNIFORM1F + gpProgramUniform1fEXT C.GPPROGRAMUNIFORM1FEXT + gpProgramUniform1fv C.GPPROGRAMUNIFORM1FV + gpProgramUniform1fvEXT C.GPPROGRAMUNIFORM1FVEXT + gpProgramUniform1i C.GPPROGRAMUNIFORM1I + gpProgramUniform1i64ARB C.GPPROGRAMUNIFORM1I64ARB + gpProgramUniform1i64NV C.GPPROGRAMUNIFORM1I64NV + gpProgramUniform1i64vARB C.GPPROGRAMUNIFORM1I64VARB + gpProgramUniform1i64vNV C.GPPROGRAMUNIFORM1I64VNV + gpProgramUniform1iEXT C.GPPROGRAMUNIFORM1IEXT + gpProgramUniform1iv C.GPPROGRAMUNIFORM1IV + gpProgramUniform1ivEXT C.GPPROGRAMUNIFORM1IVEXT + gpProgramUniform1ui C.GPPROGRAMUNIFORM1UI + gpProgramUniform1ui64ARB C.GPPROGRAMUNIFORM1UI64ARB + gpProgramUniform1ui64NV C.GPPROGRAMUNIFORM1UI64NV + gpProgramUniform1ui64vARB C.GPPROGRAMUNIFORM1UI64VARB + gpProgramUniform1ui64vNV C.GPPROGRAMUNIFORM1UI64VNV + gpProgramUniform1uiEXT C.GPPROGRAMUNIFORM1UIEXT + gpProgramUniform1uiv C.GPPROGRAMUNIFORM1UIV + gpProgramUniform1uivEXT C.GPPROGRAMUNIFORM1UIVEXT + gpProgramUniform2d C.GPPROGRAMUNIFORM2D + gpProgramUniform2dEXT C.GPPROGRAMUNIFORM2DEXT + gpProgramUniform2dv C.GPPROGRAMUNIFORM2DV + gpProgramUniform2dvEXT C.GPPROGRAMUNIFORM2DVEXT + gpProgramUniform2f C.GPPROGRAMUNIFORM2F + gpProgramUniform2fEXT C.GPPROGRAMUNIFORM2FEXT + gpProgramUniform2fv C.GPPROGRAMUNIFORM2FV + gpProgramUniform2fvEXT C.GPPROGRAMUNIFORM2FVEXT + gpProgramUniform2i C.GPPROGRAMUNIFORM2I + gpProgramUniform2i64ARB C.GPPROGRAMUNIFORM2I64ARB + gpProgramUniform2i64NV C.GPPROGRAMUNIFORM2I64NV + gpProgramUniform2i64vARB C.GPPROGRAMUNIFORM2I64VARB + gpProgramUniform2i64vNV C.GPPROGRAMUNIFORM2I64VNV + gpProgramUniform2iEXT C.GPPROGRAMUNIFORM2IEXT + gpProgramUniform2iv C.GPPROGRAMUNIFORM2IV + gpProgramUniform2ivEXT C.GPPROGRAMUNIFORM2IVEXT + gpProgramUniform2ui C.GPPROGRAMUNIFORM2UI + gpProgramUniform2ui64ARB C.GPPROGRAMUNIFORM2UI64ARB + gpProgramUniform2ui64NV C.GPPROGRAMUNIFORM2UI64NV + gpProgramUniform2ui64vARB C.GPPROGRAMUNIFORM2UI64VARB + gpProgramUniform2ui64vNV C.GPPROGRAMUNIFORM2UI64VNV + gpProgramUniform2uiEXT C.GPPROGRAMUNIFORM2UIEXT + gpProgramUniform2uiv C.GPPROGRAMUNIFORM2UIV + gpProgramUniform2uivEXT C.GPPROGRAMUNIFORM2UIVEXT + gpProgramUniform3d C.GPPROGRAMUNIFORM3D + gpProgramUniform3dEXT C.GPPROGRAMUNIFORM3DEXT + gpProgramUniform3dv C.GPPROGRAMUNIFORM3DV + gpProgramUniform3dvEXT C.GPPROGRAMUNIFORM3DVEXT + gpProgramUniform3f C.GPPROGRAMUNIFORM3F + gpProgramUniform3fEXT C.GPPROGRAMUNIFORM3FEXT + gpProgramUniform3fv C.GPPROGRAMUNIFORM3FV + gpProgramUniform3fvEXT C.GPPROGRAMUNIFORM3FVEXT + gpProgramUniform3i C.GPPROGRAMUNIFORM3I + gpProgramUniform3i64ARB C.GPPROGRAMUNIFORM3I64ARB + gpProgramUniform3i64NV C.GPPROGRAMUNIFORM3I64NV + gpProgramUniform3i64vARB C.GPPROGRAMUNIFORM3I64VARB + gpProgramUniform3i64vNV C.GPPROGRAMUNIFORM3I64VNV + gpProgramUniform3iEXT C.GPPROGRAMUNIFORM3IEXT + gpProgramUniform3iv C.GPPROGRAMUNIFORM3IV + gpProgramUniform3ivEXT C.GPPROGRAMUNIFORM3IVEXT + gpProgramUniform3ui C.GPPROGRAMUNIFORM3UI + gpProgramUniform3ui64ARB C.GPPROGRAMUNIFORM3UI64ARB + gpProgramUniform3ui64NV C.GPPROGRAMUNIFORM3UI64NV + gpProgramUniform3ui64vARB C.GPPROGRAMUNIFORM3UI64VARB + gpProgramUniform3ui64vNV C.GPPROGRAMUNIFORM3UI64VNV + gpProgramUniform3uiEXT C.GPPROGRAMUNIFORM3UIEXT + gpProgramUniform3uiv C.GPPROGRAMUNIFORM3UIV + gpProgramUniform3uivEXT C.GPPROGRAMUNIFORM3UIVEXT + gpProgramUniform4d C.GPPROGRAMUNIFORM4D + gpProgramUniform4dEXT C.GPPROGRAMUNIFORM4DEXT + gpProgramUniform4dv C.GPPROGRAMUNIFORM4DV + gpProgramUniform4dvEXT C.GPPROGRAMUNIFORM4DVEXT + gpProgramUniform4f C.GPPROGRAMUNIFORM4F + gpProgramUniform4fEXT C.GPPROGRAMUNIFORM4FEXT + gpProgramUniform4fv C.GPPROGRAMUNIFORM4FV + gpProgramUniform4fvEXT C.GPPROGRAMUNIFORM4FVEXT + gpProgramUniform4i C.GPPROGRAMUNIFORM4I + gpProgramUniform4i64ARB C.GPPROGRAMUNIFORM4I64ARB + gpProgramUniform4i64NV C.GPPROGRAMUNIFORM4I64NV + gpProgramUniform4i64vARB C.GPPROGRAMUNIFORM4I64VARB + gpProgramUniform4i64vNV C.GPPROGRAMUNIFORM4I64VNV + gpProgramUniform4iEXT C.GPPROGRAMUNIFORM4IEXT + gpProgramUniform4iv C.GPPROGRAMUNIFORM4IV + gpProgramUniform4ivEXT C.GPPROGRAMUNIFORM4IVEXT + gpProgramUniform4ui C.GPPROGRAMUNIFORM4UI + gpProgramUniform4ui64ARB C.GPPROGRAMUNIFORM4UI64ARB + gpProgramUniform4ui64NV C.GPPROGRAMUNIFORM4UI64NV + gpProgramUniform4ui64vARB C.GPPROGRAMUNIFORM4UI64VARB + gpProgramUniform4ui64vNV C.GPPROGRAMUNIFORM4UI64VNV + gpProgramUniform4uiEXT C.GPPROGRAMUNIFORM4UIEXT + gpProgramUniform4uiv C.GPPROGRAMUNIFORM4UIV + gpProgramUniform4uivEXT C.GPPROGRAMUNIFORM4UIVEXT + gpProgramUniformHandleui64ARB C.GPPROGRAMUNIFORMHANDLEUI64ARB + gpProgramUniformHandleui64NV C.GPPROGRAMUNIFORMHANDLEUI64NV + gpProgramUniformHandleui64vARB C.GPPROGRAMUNIFORMHANDLEUI64VARB + gpProgramUniformHandleui64vNV C.GPPROGRAMUNIFORMHANDLEUI64VNV + gpProgramUniformMatrix2dv C.GPPROGRAMUNIFORMMATRIX2DV + gpProgramUniformMatrix2dvEXT C.GPPROGRAMUNIFORMMATRIX2DVEXT + gpProgramUniformMatrix2fv C.GPPROGRAMUNIFORMMATRIX2FV + gpProgramUniformMatrix2fvEXT C.GPPROGRAMUNIFORMMATRIX2FVEXT + gpProgramUniformMatrix2x3dv C.GPPROGRAMUNIFORMMATRIX2X3DV + gpProgramUniformMatrix2x3dvEXT C.GPPROGRAMUNIFORMMATRIX2X3DVEXT + gpProgramUniformMatrix2x3fv C.GPPROGRAMUNIFORMMATRIX2X3FV + gpProgramUniformMatrix2x3fvEXT C.GPPROGRAMUNIFORMMATRIX2X3FVEXT + gpProgramUniformMatrix2x4dv C.GPPROGRAMUNIFORMMATRIX2X4DV + gpProgramUniformMatrix2x4dvEXT C.GPPROGRAMUNIFORMMATRIX2X4DVEXT + gpProgramUniformMatrix2x4fv C.GPPROGRAMUNIFORMMATRIX2X4FV + gpProgramUniformMatrix2x4fvEXT C.GPPROGRAMUNIFORMMATRIX2X4FVEXT + gpProgramUniformMatrix3dv C.GPPROGRAMUNIFORMMATRIX3DV + gpProgramUniformMatrix3dvEXT C.GPPROGRAMUNIFORMMATRIX3DVEXT + gpProgramUniformMatrix3fv C.GPPROGRAMUNIFORMMATRIX3FV + gpProgramUniformMatrix3fvEXT C.GPPROGRAMUNIFORMMATRIX3FVEXT + gpProgramUniformMatrix3x2dv C.GPPROGRAMUNIFORMMATRIX3X2DV + gpProgramUniformMatrix3x2dvEXT C.GPPROGRAMUNIFORMMATRIX3X2DVEXT + gpProgramUniformMatrix3x2fv C.GPPROGRAMUNIFORMMATRIX3X2FV + gpProgramUniformMatrix3x2fvEXT C.GPPROGRAMUNIFORMMATRIX3X2FVEXT + gpProgramUniformMatrix3x4dv C.GPPROGRAMUNIFORMMATRIX3X4DV + gpProgramUniformMatrix3x4dvEXT C.GPPROGRAMUNIFORMMATRIX3X4DVEXT + gpProgramUniformMatrix3x4fv C.GPPROGRAMUNIFORMMATRIX3X4FV + gpProgramUniformMatrix3x4fvEXT C.GPPROGRAMUNIFORMMATRIX3X4FVEXT + gpProgramUniformMatrix4dv C.GPPROGRAMUNIFORMMATRIX4DV + gpProgramUniformMatrix4dvEXT C.GPPROGRAMUNIFORMMATRIX4DVEXT + gpProgramUniformMatrix4fv C.GPPROGRAMUNIFORMMATRIX4FV + gpProgramUniformMatrix4fvEXT C.GPPROGRAMUNIFORMMATRIX4FVEXT + gpProgramUniformMatrix4x2dv C.GPPROGRAMUNIFORMMATRIX4X2DV + gpProgramUniformMatrix4x2dvEXT C.GPPROGRAMUNIFORMMATRIX4X2DVEXT + gpProgramUniformMatrix4x2fv C.GPPROGRAMUNIFORMMATRIX4X2FV + gpProgramUniformMatrix4x2fvEXT C.GPPROGRAMUNIFORMMATRIX4X2FVEXT + gpProgramUniformMatrix4x3dv C.GPPROGRAMUNIFORMMATRIX4X3DV + gpProgramUniformMatrix4x3dvEXT C.GPPROGRAMUNIFORMMATRIX4X3DVEXT + gpProgramUniformMatrix4x3fv C.GPPROGRAMUNIFORMMATRIX4X3FV + gpProgramUniformMatrix4x3fvEXT C.GPPROGRAMUNIFORMMATRIX4X3FVEXT + gpProgramUniformui64NV C.GPPROGRAMUNIFORMUI64NV + gpProgramUniformui64vNV C.GPPROGRAMUNIFORMUI64VNV + gpProvokingVertex C.GPPROVOKINGVERTEX + gpPushClientAttribDefaultEXT C.GPPUSHCLIENTATTRIBDEFAULTEXT + gpPushDebugGroup C.GPPUSHDEBUGGROUP + gpPushDebugGroupKHR C.GPPUSHDEBUGGROUPKHR + gpPushGroupMarkerEXT C.GPPUSHGROUPMARKEREXT + gpQueryCounter C.GPQUERYCOUNTER + gpRasterSamplesEXT C.GPRASTERSAMPLESEXT + gpReadBuffer C.GPREADBUFFER + gpReadPixels C.GPREADPIXELS + gpReadnPixels C.GPREADNPIXELS + gpReadnPixelsARB C.GPREADNPIXELSARB + gpReadnPixelsKHR C.GPREADNPIXELSKHR + gpReleaseShaderCompiler C.GPRELEASESHADERCOMPILER + gpRenderbufferStorage C.GPRENDERBUFFERSTORAGE + gpRenderbufferStorageMultisample C.GPRENDERBUFFERSTORAGEMULTISAMPLE + gpRenderbufferStorageMultisampleCoverageNV C.GPRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENV + gpResolveDepthValuesNV C.GPRESOLVEDEPTHVALUESNV + gpResumeTransformFeedback C.GPRESUMETRANSFORMFEEDBACK + gpSampleCoverage C.GPSAMPLECOVERAGE + gpSampleMaski C.GPSAMPLEMASKI + gpSamplerParameterIiv C.GPSAMPLERPARAMETERIIV + gpSamplerParameterIuiv C.GPSAMPLERPARAMETERIUIV + gpSamplerParameterf C.GPSAMPLERPARAMETERF + gpSamplerParameterfv C.GPSAMPLERPARAMETERFV + gpSamplerParameteri C.GPSAMPLERPARAMETERI + gpSamplerParameteriv C.GPSAMPLERPARAMETERIV + gpScissor C.GPSCISSOR + gpScissorArrayv C.GPSCISSORARRAYV + gpScissorIndexed C.GPSCISSORINDEXED + gpScissorIndexedv C.GPSCISSORINDEXEDV + gpSecondaryColorFormatNV C.GPSECONDARYCOLORFORMATNV + gpSelectPerfMonitorCountersAMD C.GPSELECTPERFMONITORCOUNTERSAMD + gpShaderBinary C.GPSHADERBINARY + gpShaderSource C.GPSHADERSOURCE + gpShaderStorageBlockBinding C.GPSHADERSTORAGEBLOCKBINDING + gpSignalVkFenceNV C.GPSIGNALVKFENCENV + gpSignalVkSemaphoreNV C.GPSIGNALVKSEMAPHORENV + gpSpecializeShaderARB C.GPSPECIALIZESHADERARB + gpStateCaptureNV C.GPSTATECAPTURENV + gpStencilFillPathInstancedNV C.GPSTENCILFILLPATHINSTANCEDNV + gpStencilFillPathNV C.GPSTENCILFILLPATHNV + gpStencilFunc C.GPSTENCILFUNC + gpStencilFuncSeparate C.GPSTENCILFUNCSEPARATE + gpStencilMask C.GPSTENCILMASK + gpStencilMaskSeparate C.GPSTENCILMASKSEPARATE + gpStencilOp C.GPSTENCILOP + gpStencilOpSeparate C.GPSTENCILOPSEPARATE + gpStencilStrokePathInstancedNV C.GPSTENCILSTROKEPATHINSTANCEDNV + gpStencilStrokePathNV C.GPSTENCILSTROKEPATHNV + gpStencilThenCoverFillPathInstancedNV C.GPSTENCILTHENCOVERFILLPATHINSTANCEDNV + gpStencilThenCoverFillPathNV C.GPSTENCILTHENCOVERFILLPATHNV + gpStencilThenCoverStrokePathInstancedNV C.GPSTENCILTHENCOVERSTROKEPATHINSTANCEDNV + gpStencilThenCoverStrokePathNV C.GPSTENCILTHENCOVERSTROKEPATHNV + gpSubpixelPrecisionBiasNV C.GPSUBPIXELPRECISIONBIASNV + gpTexBuffer C.GPTEXBUFFER + gpTexBufferARB C.GPTEXBUFFERARB + gpTexBufferRange C.GPTEXBUFFERRANGE + gpTexCoordFormatNV C.GPTEXCOORDFORMATNV + gpTexImage1D C.GPTEXIMAGE1D + gpTexImage2D C.GPTEXIMAGE2D + gpTexImage2DMultisample C.GPTEXIMAGE2DMULTISAMPLE + gpTexImage3D C.GPTEXIMAGE3D + gpTexImage3DMultisample C.GPTEXIMAGE3DMULTISAMPLE + gpTexPageCommitmentARB C.GPTEXPAGECOMMITMENTARB + gpTexParameterIiv C.GPTEXPARAMETERIIV + gpTexParameterIuiv C.GPTEXPARAMETERIUIV + gpTexParameterf C.GPTEXPARAMETERF + gpTexParameterfv C.GPTEXPARAMETERFV + gpTexParameteri C.GPTEXPARAMETERI + gpTexParameteriv C.GPTEXPARAMETERIV + gpTexStorage1D C.GPTEXSTORAGE1D + gpTexStorage2D C.GPTEXSTORAGE2D + gpTexStorage2DMultisample C.GPTEXSTORAGE2DMULTISAMPLE + gpTexStorage3D C.GPTEXSTORAGE3D + gpTexStorage3DMultisample C.GPTEXSTORAGE3DMULTISAMPLE + gpTexSubImage1D C.GPTEXSUBIMAGE1D + gpTexSubImage2D C.GPTEXSUBIMAGE2D + gpTexSubImage3D C.GPTEXSUBIMAGE3D + gpTextureBarrier C.GPTEXTUREBARRIER + gpTextureBarrierNV C.GPTEXTUREBARRIERNV + gpTextureBuffer C.GPTEXTUREBUFFER + gpTextureBufferEXT C.GPTEXTUREBUFFEREXT + gpTextureBufferRange C.GPTEXTUREBUFFERRANGE + gpTextureBufferRangeEXT C.GPTEXTUREBUFFERRANGEEXT + gpTextureImage1DEXT C.GPTEXTUREIMAGE1DEXT + gpTextureImage2DEXT C.GPTEXTUREIMAGE2DEXT + gpTextureImage3DEXT C.GPTEXTUREIMAGE3DEXT + gpTexturePageCommitmentEXT C.GPTEXTUREPAGECOMMITMENTEXT + gpTextureParameterIiv C.GPTEXTUREPARAMETERIIV + gpTextureParameterIivEXT C.GPTEXTUREPARAMETERIIVEXT + gpTextureParameterIuiv C.GPTEXTUREPARAMETERIUIV + gpTextureParameterIuivEXT C.GPTEXTUREPARAMETERIUIVEXT + gpTextureParameterf C.GPTEXTUREPARAMETERF + gpTextureParameterfEXT C.GPTEXTUREPARAMETERFEXT + gpTextureParameterfv C.GPTEXTUREPARAMETERFV + gpTextureParameterfvEXT C.GPTEXTUREPARAMETERFVEXT + gpTextureParameteri C.GPTEXTUREPARAMETERI + gpTextureParameteriEXT C.GPTEXTUREPARAMETERIEXT + gpTextureParameteriv C.GPTEXTUREPARAMETERIV + gpTextureParameterivEXT C.GPTEXTUREPARAMETERIVEXT + gpTextureRenderbufferEXT C.GPTEXTURERENDERBUFFEREXT + gpTextureStorage1D C.GPTEXTURESTORAGE1D + gpTextureStorage1DEXT C.GPTEXTURESTORAGE1DEXT + gpTextureStorage2D C.GPTEXTURESTORAGE2D + gpTextureStorage2DEXT C.GPTEXTURESTORAGE2DEXT + gpTextureStorage2DMultisample C.GPTEXTURESTORAGE2DMULTISAMPLE + gpTextureStorage2DMultisampleEXT C.GPTEXTURESTORAGE2DMULTISAMPLEEXT + gpTextureStorage3D C.GPTEXTURESTORAGE3D + gpTextureStorage3DEXT C.GPTEXTURESTORAGE3DEXT + gpTextureStorage3DMultisample C.GPTEXTURESTORAGE3DMULTISAMPLE + gpTextureStorage3DMultisampleEXT C.GPTEXTURESTORAGE3DMULTISAMPLEEXT + gpTextureSubImage1D C.GPTEXTURESUBIMAGE1D + gpTextureSubImage1DEXT C.GPTEXTURESUBIMAGE1DEXT + gpTextureSubImage2D C.GPTEXTURESUBIMAGE2D + gpTextureSubImage2DEXT C.GPTEXTURESUBIMAGE2DEXT + gpTextureSubImage3D C.GPTEXTURESUBIMAGE3D + gpTextureSubImage3DEXT C.GPTEXTURESUBIMAGE3DEXT + gpTextureView C.GPTEXTUREVIEW + gpTransformFeedbackBufferBase C.GPTRANSFORMFEEDBACKBUFFERBASE + gpTransformFeedbackBufferRange C.GPTRANSFORMFEEDBACKBUFFERRANGE + gpTransformFeedbackVaryings C.GPTRANSFORMFEEDBACKVARYINGS + gpTransformPathNV C.GPTRANSFORMPATHNV + gpUniform1d C.GPUNIFORM1D + gpUniform1dv C.GPUNIFORM1DV + gpUniform1f C.GPUNIFORM1F + gpUniform1fv C.GPUNIFORM1FV + gpUniform1i C.GPUNIFORM1I + gpUniform1i64ARB C.GPUNIFORM1I64ARB + gpUniform1i64NV C.GPUNIFORM1I64NV + gpUniform1i64vARB C.GPUNIFORM1I64VARB + gpUniform1i64vNV C.GPUNIFORM1I64VNV + gpUniform1iv C.GPUNIFORM1IV + gpUniform1ui C.GPUNIFORM1UI + gpUniform1ui64ARB C.GPUNIFORM1UI64ARB + gpUniform1ui64NV C.GPUNIFORM1UI64NV + gpUniform1ui64vARB C.GPUNIFORM1UI64VARB + gpUniform1ui64vNV C.GPUNIFORM1UI64VNV + gpUniform1uiv C.GPUNIFORM1UIV + gpUniform2d C.GPUNIFORM2D + gpUniform2dv C.GPUNIFORM2DV + gpUniform2f C.GPUNIFORM2F + gpUniform2fv C.GPUNIFORM2FV + gpUniform2i C.GPUNIFORM2I + gpUniform2i64ARB C.GPUNIFORM2I64ARB + gpUniform2i64NV C.GPUNIFORM2I64NV + gpUniform2i64vARB C.GPUNIFORM2I64VARB + gpUniform2i64vNV C.GPUNIFORM2I64VNV + gpUniform2iv C.GPUNIFORM2IV + gpUniform2ui C.GPUNIFORM2UI + gpUniform2ui64ARB C.GPUNIFORM2UI64ARB + gpUniform2ui64NV C.GPUNIFORM2UI64NV + gpUniform2ui64vARB C.GPUNIFORM2UI64VARB + gpUniform2ui64vNV C.GPUNIFORM2UI64VNV + gpUniform2uiv C.GPUNIFORM2UIV + gpUniform3d C.GPUNIFORM3D + gpUniform3dv C.GPUNIFORM3DV + gpUniform3f C.GPUNIFORM3F + gpUniform3fv C.GPUNIFORM3FV + gpUniform3i C.GPUNIFORM3I + gpUniform3i64ARB C.GPUNIFORM3I64ARB + gpUniform3i64NV C.GPUNIFORM3I64NV + gpUniform3i64vARB C.GPUNIFORM3I64VARB + gpUniform3i64vNV C.GPUNIFORM3I64VNV + gpUniform3iv C.GPUNIFORM3IV + gpUniform3ui C.GPUNIFORM3UI + gpUniform3ui64ARB C.GPUNIFORM3UI64ARB + gpUniform3ui64NV C.GPUNIFORM3UI64NV + gpUniform3ui64vARB C.GPUNIFORM3UI64VARB + gpUniform3ui64vNV C.GPUNIFORM3UI64VNV + gpUniform3uiv C.GPUNIFORM3UIV + gpUniform4d C.GPUNIFORM4D + gpUniform4dv C.GPUNIFORM4DV + gpUniform4f C.GPUNIFORM4F + gpUniform4fv C.GPUNIFORM4FV + gpUniform4i C.GPUNIFORM4I + gpUniform4i64ARB C.GPUNIFORM4I64ARB + gpUniform4i64NV C.GPUNIFORM4I64NV + gpUniform4i64vARB C.GPUNIFORM4I64VARB + gpUniform4i64vNV C.GPUNIFORM4I64VNV + gpUniform4iv C.GPUNIFORM4IV + gpUniform4ui C.GPUNIFORM4UI + gpUniform4ui64ARB C.GPUNIFORM4UI64ARB + gpUniform4ui64NV C.GPUNIFORM4UI64NV + gpUniform4ui64vARB C.GPUNIFORM4UI64VARB + gpUniform4ui64vNV C.GPUNIFORM4UI64VNV + gpUniform4uiv C.GPUNIFORM4UIV + gpUniformBlockBinding C.GPUNIFORMBLOCKBINDING + gpUniformHandleui64ARB C.GPUNIFORMHANDLEUI64ARB + gpUniformHandleui64NV C.GPUNIFORMHANDLEUI64NV + gpUniformHandleui64vARB C.GPUNIFORMHANDLEUI64VARB + gpUniformHandleui64vNV C.GPUNIFORMHANDLEUI64VNV + gpUniformMatrix2dv C.GPUNIFORMMATRIX2DV + gpUniformMatrix2fv C.GPUNIFORMMATRIX2FV + gpUniformMatrix2x3dv C.GPUNIFORMMATRIX2X3DV + gpUniformMatrix2x3fv C.GPUNIFORMMATRIX2X3FV + gpUniformMatrix2x4dv C.GPUNIFORMMATRIX2X4DV + gpUniformMatrix2x4fv C.GPUNIFORMMATRIX2X4FV + gpUniformMatrix3dv C.GPUNIFORMMATRIX3DV + gpUniformMatrix3fv C.GPUNIFORMMATRIX3FV + gpUniformMatrix3x2dv C.GPUNIFORMMATRIX3X2DV + gpUniformMatrix3x2fv C.GPUNIFORMMATRIX3X2FV + gpUniformMatrix3x4dv C.GPUNIFORMMATRIX3X4DV + gpUniformMatrix3x4fv C.GPUNIFORMMATRIX3X4FV + gpUniformMatrix4dv C.GPUNIFORMMATRIX4DV + gpUniformMatrix4fv C.GPUNIFORMMATRIX4FV + gpUniformMatrix4x2dv C.GPUNIFORMMATRIX4X2DV + gpUniformMatrix4x2fv C.GPUNIFORMMATRIX4X2FV + gpUniformMatrix4x3dv C.GPUNIFORMMATRIX4X3DV + gpUniformMatrix4x3fv C.GPUNIFORMMATRIX4X3FV + gpUniformSubroutinesuiv C.GPUNIFORMSUBROUTINESUIV + gpUniformui64NV C.GPUNIFORMUI64NV + gpUniformui64vNV C.GPUNIFORMUI64VNV + gpUnmapBuffer C.GPUNMAPBUFFER + gpUnmapNamedBuffer C.GPUNMAPNAMEDBUFFER + gpUnmapNamedBufferEXT C.GPUNMAPNAMEDBUFFEREXT + gpUseProgram C.GPUSEPROGRAM + gpUseProgramStages C.GPUSEPROGRAMSTAGES + gpUseProgramStagesEXT C.GPUSEPROGRAMSTAGESEXT + gpUseShaderProgramEXT C.GPUSESHADERPROGRAMEXT + gpValidateProgram C.GPVALIDATEPROGRAM + gpValidateProgramPipeline C.GPVALIDATEPROGRAMPIPELINE + gpValidateProgramPipelineEXT C.GPVALIDATEPROGRAMPIPELINEEXT + gpVertexArrayAttribBinding C.GPVERTEXARRAYATTRIBBINDING + gpVertexArrayAttribFormat C.GPVERTEXARRAYATTRIBFORMAT + gpVertexArrayAttribIFormat C.GPVERTEXARRAYATTRIBIFORMAT + gpVertexArrayAttribLFormat C.GPVERTEXARRAYATTRIBLFORMAT + gpVertexArrayBindVertexBufferEXT C.GPVERTEXARRAYBINDVERTEXBUFFEREXT + gpVertexArrayBindingDivisor C.GPVERTEXARRAYBINDINGDIVISOR + gpVertexArrayColorOffsetEXT C.GPVERTEXARRAYCOLOROFFSETEXT + gpVertexArrayEdgeFlagOffsetEXT C.GPVERTEXARRAYEDGEFLAGOFFSETEXT + gpVertexArrayElementBuffer C.GPVERTEXARRAYELEMENTBUFFER + gpVertexArrayFogCoordOffsetEXT C.GPVERTEXARRAYFOGCOORDOFFSETEXT + gpVertexArrayIndexOffsetEXT C.GPVERTEXARRAYINDEXOFFSETEXT + gpVertexArrayMultiTexCoordOffsetEXT C.GPVERTEXARRAYMULTITEXCOORDOFFSETEXT + gpVertexArrayNormalOffsetEXT C.GPVERTEXARRAYNORMALOFFSETEXT + gpVertexArraySecondaryColorOffsetEXT C.GPVERTEXARRAYSECONDARYCOLOROFFSETEXT + gpVertexArrayTexCoordOffsetEXT C.GPVERTEXARRAYTEXCOORDOFFSETEXT + gpVertexArrayVertexAttribBindingEXT C.GPVERTEXARRAYVERTEXATTRIBBINDINGEXT + gpVertexArrayVertexAttribDivisorEXT C.GPVERTEXARRAYVERTEXATTRIBDIVISOREXT + gpVertexArrayVertexAttribFormatEXT C.GPVERTEXARRAYVERTEXATTRIBFORMATEXT + gpVertexArrayVertexAttribIFormatEXT C.GPVERTEXARRAYVERTEXATTRIBIFORMATEXT + gpVertexArrayVertexAttribIOffsetEXT C.GPVERTEXARRAYVERTEXATTRIBIOFFSETEXT + gpVertexArrayVertexAttribLFormatEXT C.GPVERTEXARRAYVERTEXATTRIBLFORMATEXT + gpVertexArrayVertexAttribLOffsetEXT C.GPVERTEXARRAYVERTEXATTRIBLOFFSETEXT + gpVertexArrayVertexAttribOffsetEXT C.GPVERTEXARRAYVERTEXATTRIBOFFSETEXT + gpVertexArrayVertexBindingDivisorEXT C.GPVERTEXARRAYVERTEXBINDINGDIVISOREXT + gpVertexArrayVertexBuffer C.GPVERTEXARRAYVERTEXBUFFER + gpVertexArrayVertexBuffers C.GPVERTEXARRAYVERTEXBUFFERS + gpVertexArrayVertexOffsetEXT C.GPVERTEXARRAYVERTEXOFFSETEXT + gpVertexAttrib1d C.GPVERTEXATTRIB1D + gpVertexAttrib1dv C.GPVERTEXATTRIB1DV + gpVertexAttrib1f C.GPVERTEXATTRIB1F + gpVertexAttrib1fv C.GPVERTEXATTRIB1FV + gpVertexAttrib1s C.GPVERTEXATTRIB1S + gpVertexAttrib1sv C.GPVERTEXATTRIB1SV + gpVertexAttrib2d C.GPVERTEXATTRIB2D + gpVertexAttrib2dv C.GPVERTEXATTRIB2DV + gpVertexAttrib2f C.GPVERTEXATTRIB2F + gpVertexAttrib2fv C.GPVERTEXATTRIB2FV + gpVertexAttrib2s C.GPVERTEXATTRIB2S + gpVertexAttrib2sv C.GPVERTEXATTRIB2SV + gpVertexAttrib3d C.GPVERTEXATTRIB3D + gpVertexAttrib3dv C.GPVERTEXATTRIB3DV + gpVertexAttrib3f C.GPVERTEXATTRIB3F + gpVertexAttrib3fv C.GPVERTEXATTRIB3FV + gpVertexAttrib3s C.GPVERTEXATTRIB3S + gpVertexAttrib3sv C.GPVERTEXATTRIB3SV + gpVertexAttrib4Nbv C.GPVERTEXATTRIB4NBV + gpVertexAttrib4Niv C.GPVERTEXATTRIB4NIV + gpVertexAttrib4Nsv C.GPVERTEXATTRIB4NSV + gpVertexAttrib4Nub C.GPVERTEXATTRIB4NUB + gpVertexAttrib4Nubv C.GPVERTEXATTRIB4NUBV + gpVertexAttrib4Nuiv C.GPVERTEXATTRIB4NUIV + gpVertexAttrib4Nusv C.GPVERTEXATTRIB4NUSV + gpVertexAttrib4bv C.GPVERTEXATTRIB4BV + gpVertexAttrib4d C.GPVERTEXATTRIB4D + gpVertexAttrib4dv C.GPVERTEXATTRIB4DV + gpVertexAttrib4f C.GPVERTEXATTRIB4F + gpVertexAttrib4fv C.GPVERTEXATTRIB4FV + gpVertexAttrib4iv C.GPVERTEXATTRIB4IV + gpVertexAttrib4s C.GPVERTEXATTRIB4S + gpVertexAttrib4sv C.GPVERTEXATTRIB4SV + gpVertexAttrib4ubv C.GPVERTEXATTRIB4UBV + gpVertexAttrib4uiv C.GPVERTEXATTRIB4UIV + gpVertexAttrib4usv C.GPVERTEXATTRIB4USV + gpVertexAttribBinding C.GPVERTEXATTRIBBINDING + gpVertexAttribDivisor C.GPVERTEXATTRIBDIVISOR + gpVertexAttribDivisorARB C.GPVERTEXATTRIBDIVISORARB + gpVertexAttribFormat C.GPVERTEXATTRIBFORMAT + gpVertexAttribFormatNV C.GPVERTEXATTRIBFORMATNV + gpVertexAttribI1i C.GPVERTEXATTRIBI1I + gpVertexAttribI1iv C.GPVERTEXATTRIBI1IV + gpVertexAttribI1ui C.GPVERTEXATTRIBI1UI + gpVertexAttribI1uiv C.GPVERTEXATTRIBI1UIV + gpVertexAttribI2i C.GPVERTEXATTRIBI2I + gpVertexAttribI2iv C.GPVERTEXATTRIBI2IV + gpVertexAttribI2ui C.GPVERTEXATTRIBI2UI + gpVertexAttribI2uiv C.GPVERTEXATTRIBI2UIV + gpVertexAttribI3i C.GPVERTEXATTRIBI3I + gpVertexAttribI3iv C.GPVERTEXATTRIBI3IV + gpVertexAttribI3ui C.GPVERTEXATTRIBI3UI + gpVertexAttribI3uiv C.GPVERTEXATTRIBI3UIV + gpVertexAttribI4bv C.GPVERTEXATTRIBI4BV + gpVertexAttribI4i C.GPVERTEXATTRIBI4I + gpVertexAttribI4iv C.GPVERTEXATTRIBI4IV + gpVertexAttribI4sv C.GPVERTEXATTRIBI4SV + gpVertexAttribI4ubv C.GPVERTEXATTRIBI4UBV + gpVertexAttribI4ui C.GPVERTEXATTRIBI4UI + gpVertexAttribI4uiv C.GPVERTEXATTRIBI4UIV + gpVertexAttribI4usv C.GPVERTEXATTRIBI4USV + gpVertexAttribIFormat C.GPVERTEXATTRIBIFORMAT + gpVertexAttribIFormatNV C.GPVERTEXATTRIBIFORMATNV + gpVertexAttribIPointer C.GPVERTEXATTRIBIPOINTER + gpVertexAttribL1d C.GPVERTEXATTRIBL1D + gpVertexAttribL1dv C.GPVERTEXATTRIBL1DV + gpVertexAttribL1i64NV C.GPVERTEXATTRIBL1I64NV + gpVertexAttribL1i64vNV C.GPVERTEXATTRIBL1I64VNV + gpVertexAttribL1ui64ARB C.GPVERTEXATTRIBL1UI64ARB + gpVertexAttribL1ui64NV C.GPVERTEXATTRIBL1UI64NV + gpVertexAttribL1ui64vARB C.GPVERTEXATTRIBL1UI64VARB + gpVertexAttribL1ui64vNV C.GPVERTEXATTRIBL1UI64VNV + gpVertexAttribL2d C.GPVERTEXATTRIBL2D + gpVertexAttribL2dv C.GPVERTEXATTRIBL2DV + gpVertexAttribL2i64NV C.GPVERTEXATTRIBL2I64NV + gpVertexAttribL2i64vNV C.GPVERTEXATTRIBL2I64VNV + gpVertexAttribL2ui64NV C.GPVERTEXATTRIBL2UI64NV + gpVertexAttribL2ui64vNV C.GPVERTEXATTRIBL2UI64VNV + gpVertexAttribL3d C.GPVERTEXATTRIBL3D + gpVertexAttribL3dv C.GPVERTEXATTRIBL3DV + gpVertexAttribL3i64NV C.GPVERTEXATTRIBL3I64NV + gpVertexAttribL3i64vNV C.GPVERTEXATTRIBL3I64VNV + gpVertexAttribL3ui64NV C.GPVERTEXATTRIBL3UI64NV + gpVertexAttribL3ui64vNV C.GPVERTEXATTRIBL3UI64VNV + gpVertexAttribL4d C.GPVERTEXATTRIBL4D + gpVertexAttribL4dv C.GPVERTEXATTRIBL4DV + gpVertexAttribL4i64NV C.GPVERTEXATTRIBL4I64NV + gpVertexAttribL4i64vNV C.GPVERTEXATTRIBL4I64VNV + gpVertexAttribL4ui64NV C.GPVERTEXATTRIBL4UI64NV + gpVertexAttribL4ui64vNV C.GPVERTEXATTRIBL4UI64VNV + gpVertexAttribLFormat C.GPVERTEXATTRIBLFORMAT + gpVertexAttribLFormatNV C.GPVERTEXATTRIBLFORMATNV + gpVertexAttribLPointer C.GPVERTEXATTRIBLPOINTER + gpVertexAttribP1ui C.GPVERTEXATTRIBP1UI + gpVertexAttribP1uiv C.GPVERTEXATTRIBP1UIV + gpVertexAttribP2ui C.GPVERTEXATTRIBP2UI + gpVertexAttribP2uiv C.GPVERTEXATTRIBP2UIV + gpVertexAttribP3ui C.GPVERTEXATTRIBP3UI + gpVertexAttribP3uiv C.GPVERTEXATTRIBP3UIV + gpVertexAttribP4ui C.GPVERTEXATTRIBP4UI + gpVertexAttribP4uiv C.GPVERTEXATTRIBP4UIV + gpVertexAttribPointer C.GPVERTEXATTRIBPOINTER + gpVertexBindingDivisor C.GPVERTEXBINDINGDIVISOR + gpVertexFormatNV C.GPVERTEXFORMATNV + gpViewport C.GPVIEWPORT + gpViewportArrayv C.GPVIEWPORTARRAYV + gpViewportIndexedf C.GPVIEWPORTINDEXEDF + gpViewportIndexedfv C.GPVIEWPORTINDEXEDFV + gpViewportPositionWScaleNV C.GPVIEWPORTPOSITIONWSCALENV + gpViewportSwizzleNV C.GPVIEWPORTSWIZZLENV + gpWaitSync C.GPWAITSYNC + gpWaitVkSemaphoreNV C.GPWAITVKSEMAPHORENV + gpWeightPathsNV C.GPWEIGHTPATHSNV + gpWindowRectanglesEXT C.GPWINDOWRECTANGLESEXT +) + +// Helper functions +func boolToInt(b bool) int { + if b { + return 1 + } + return 0 +} +func ActiveProgramEXT(program uint32) { + C.glowActiveProgramEXT(gpActiveProgramEXT, (C.GLuint)(program)) +} + +// set the active program object for a program pipeline object +func ActiveShaderProgram(pipeline uint32, program uint32) { + C.glowActiveShaderProgram(gpActiveShaderProgram, (C.GLuint)(pipeline), (C.GLuint)(program)) +} +func ActiveShaderProgramEXT(pipeline uint32, program uint32) { + C.glowActiveShaderProgramEXT(gpActiveShaderProgramEXT, (C.GLuint)(pipeline), (C.GLuint)(program)) +} + +// select active texture unit +func ActiveTexture(texture uint32) { + C.glowActiveTexture(gpActiveTexture, (C.GLenum)(texture)) +} +func ApplyFramebufferAttachmentCMAAINTEL() { + C.glowApplyFramebufferAttachmentCMAAINTEL(gpApplyFramebufferAttachmentCMAAINTEL) +} + +// Attaches a shader object to a program object +func AttachShader(program uint32, shader uint32) { + C.glowAttachShader(gpAttachShader, (C.GLuint)(program), (C.GLuint)(shader)) +} + +// start conditional rendering +func BeginConditionalRender(id uint32, mode uint32) { + C.glowBeginConditionalRender(gpBeginConditionalRender, (C.GLuint)(id), (C.GLenum)(mode)) +} +func BeginConditionalRenderNV(id uint32, mode uint32) { + C.glowBeginConditionalRenderNV(gpBeginConditionalRenderNV, (C.GLuint)(id), (C.GLenum)(mode)) +} +func BeginPerfMonitorAMD(monitor uint32) { + C.glowBeginPerfMonitorAMD(gpBeginPerfMonitorAMD, (C.GLuint)(monitor)) +} +func BeginPerfQueryINTEL(queryHandle uint32) { + C.glowBeginPerfQueryINTEL(gpBeginPerfQueryINTEL, (C.GLuint)(queryHandle)) +} + +// delimit the boundaries of a query object +func BeginQuery(target uint32, id uint32) { + C.glowBeginQuery(gpBeginQuery, (C.GLenum)(target), (C.GLuint)(id)) +} +func BeginQueryIndexed(target uint32, index uint32, id uint32) { + C.glowBeginQueryIndexed(gpBeginQueryIndexed, (C.GLenum)(target), (C.GLuint)(index), (C.GLuint)(id)) +} + +// start transform feedback operation +func BeginTransformFeedback(primitiveMode uint32) { + C.glowBeginTransformFeedback(gpBeginTransformFeedback, (C.GLenum)(primitiveMode)) +} + +// Associates a generic vertex attribute index with a named attribute variable +func BindAttribLocation(program uint32, index uint32, name *uint8) { + C.glowBindAttribLocation(gpBindAttribLocation, (C.GLuint)(program), (C.GLuint)(index), (*C.GLchar)(unsafe.Pointer(name))) +} + +// bind a named buffer object +func BindBuffer(target uint32, buffer uint32) { + C.glowBindBuffer(gpBindBuffer, (C.GLenum)(target), (C.GLuint)(buffer)) +} + +// bind a buffer object to an indexed buffer target +func BindBufferBase(target uint32, index uint32, buffer uint32) { + C.glowBindBufferBase(gpBindBufferBase, (C.GLenum)(target), (C.GLuint)(index), (C.GLuint)(buffer)) +} + +// bind a range within a buffer object to an indexed buffer target +func BindBufferRange(target uint32, index uint32, buffer uint32, offset int, size int) { + C.glowBindBufferRange(gpBindBufferRange, (C.GLenum)(target), (C.GLuint)(index), (C.GLuint)(buffer), (C.GLintptr)(offset), (C.GLsizeiptr)(size)) +} + +// bind one or more buffer objects to a sequence of indexed buffer targets +func BindBuffersBase(target uint32, first uint32, count int32, buffers *uint32) { + C.glowBindBuffersBase(gpBindBuffersBase, (C.GLenum)(target), (C.GLuint)(first), (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(buffers))) +} + +// bind ranges of one or more buffer objects to a sequence of indexed buffer targets +func BindBuffersRange(target uint32, first uint32, count int32, buffers *uint32, offsets *int, sizes *int) { + C.glowBindBuffersRange(gpBindBuffersRange, (C.GLenum)(target), (C.GLuint)(first), (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(buffers)), (*C.GLintptr)(unsafe.Pointer(offsets)), (*C.GLsizeiptr)(unsafe.Pointer(sizes))) +} + +// bind a user-defined varying out variable to a fragment shader color number +func BindFragDataLocation(program uint32, color uint32, name *uint8) { + C.glowBindFragDataLocation(gpBindFragDataLocation, (C.GLuint)(program), (C.GLuint)(color), (*C.GLchar)(unsafe.Pointer(name))) +} + +// bind a user-defined varying out variable to a fragment shader color number and index +func BindFragDataLocationIndexed(program uint32, colorNumber uint32, index uint32, name *uint8) { + C.glowBindFragDataLocationIndexed(gpBindFragDataLocationIndexed, (C.GLuint)(program), (C.GLuint)(colorNumber), (C.GLuint)(index), (*C.GLchar)(unsafe.Pointer(name))) +} + +// bind a framebuffer to a framebuffer target +func BindFramebuffer(target uint32, framebuffer uint32) { + C.glowBindFramebuffer(gpBindFramebuffer, (C.GLenum)(target), (C.GLuint)(framebuffer)) +} + +// bind a level of a texture to an image unit +func BindImageTexture(unit uint32, texture uint32, level int32, layered bool, layer int32, access uint32, format uint32) { + C.glowBindImageTexture(gpBindImageTexture, (C.GLuint)(unit), (C.GLuint)(texture), (C.GLint)(level), (C.GLboolean)(boolToInt(layered)), (C.GLint)(layer), (C.GLenum)(access), (C.GLenum)(format)) +} + +// bind one or more named texture images to a sequence of consecutive image units +func BindImageTextures(first uint32, count int32, textures *uint32) { + C.glowBindImageTextures(gpBindImageTextures, (C.GLuint)(first), (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(textures))) +} +func BindMultiTextureEXT(texunit uint32, target uint32, texture uint32) { + C.glowBindMultiTextureEXT(gpBindMultiTextureEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLuint)(texture)) +} + +// bind a program pipeline to the current context +func BindProgramPipeline(pipeline uint32) { + C.glowBindProgramPipeline(gpBindProgramPipeline, (C.GLuint)(pipeline)) +} +func BindProgramPipelineEXT(pipeline uint32) { + C.glowBindProgramPipelineEXT(gpBindProgramPipelineEXT, (C.GLuint)(pipeline)) +} + +// bind a renderbuffer to a renderbuffer target +func BindRenderbuffer(target uint32, renderbuffer uint32) { + C.glowBindRenderbuffer(gpBindRenderbuffer, (C.GLenum)(target), (C.GLuint)(renderbuffer)) +} + +// bind a named sampler to a texturing target +func BindSampler(unit uint32, sampler uint32) { + C.glowBindSampler(gpBindSampler, (C.GLuint)(unit), (C.GLuint)(sampler)) +} + +// bind one or more named sampler objects to a sequence of consecutive sampler units +func BindSamplers(first uint32, count int32, samplers *uint32) { + C.glowBindSamplers(gpBindSamplers, (C.GLuint)(first), (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(samplers))) +} + +// bind a named texture to a texturing target +func BindTexture(target uint32, texture uint32) { + C.glowBindTexture(gpBindTexture, (C.GLenum)(target), (C.GLuint)(texture)) +} + +// bind an existing texture object to the specified texture unit +func BindTextureUnit(unit uint32, texture uint32) { + C.glowBindTextureUnit(gpBindTextureUnit, (C.GLuint)(unit), (C.GLuint)(texture)) +} + +// bind one or more named textures to a sequence of consecutive texture units +func BindTextures(first uint32, count int32, textures *uint32) { + C.glowBindTextures(gpBindTextures, (C.GLuint)(first), (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(textures))) +} + +// bind a transform feedback object +func BindTransformFeedback(target uint32, id uint32) { + C.glowBindTransformFeedback(gpBindTransformFeedback, (C.GLenum)(target), (C.GLuint)(id)) +} + +// bind a vertex array object +func BindVertexArray(array uint32) { + C.glowBindVertexArray(gpBindVertexArray, (C.GLuint)(array)) +} + +// bind a buffer to a vertex buffer bind point +func BindVertexBuffer(bindingindex uint32, buffer uint32, offset int, stride int32) { + C.glowBindVertexBuffer(gpBindVertexBuffer, (C.GLuint)(bindingindex), (C.GLuint)(buffer), (C.GLintptr)(offset), (C.GLsizei)(stride)) +} + +// attach multiple buffer objects to a vertex array object +func BindVertexBuffers(first uint32, count int32, buffers *uint32, offsets *int, strides *int32) { + C.glowBindVertexBuffers(gpBindVertexBuffers, (C.GLuint)(first), (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(buffers)), (*C.GLintptr)(unsafe.Pointer(offsets)), (*C.GLsizei)(unsafe.Pointer(strides))) +} +func BlendBarrierKHR() { + C.glowBlendBarrierKHR(gpBlendBarrierKHR) +} +func BlendBarrierNV() { + C.glowBlendBarrierNV(gpBlendBarrierNV) +} + +// set the blend color +func BlendColor(red float32, green float32, blue float32, alpha float32) { + C.glowBlendColor(gpBlendColor, (C.GLfloat)(red), (C.GLfloat)(green), (C.GLfloat)(blue), (C.GLfloat)(alpha)) +} + +// specify the equation used for both the RGB blend equation and the Alpha blend equation +func BlendEquation(mode uint32) { + C.glowBlendEquation(gpBlendEquation, (C.GLenum)(mode)) +} + +// set the RGB blend equation and the alpha blend equation separately +func BlendEquationSeparate(modeRGB uint32, modeAlpha uint32) { + C.glowBlendEquationSeparate(gpBlendEquationSeparate, (C.GLenum)(modeRGB), (C.GLenum)(modeAlpha)) +} +func BlendEquationSeparatei(buf uint32, modeRGB uint32, modeAlpha uint32) { + C.glowBlendEquationSeparatei(gpBlendEquationSeparatei, (C.GLuint)(buf), (C.GLenum)(modeRGB), (C.GLenum)(modeAlpha)) +} +func BlendEquationSeparateiARB(buf uint32, modeRGB uint32, modeAlpha uint32) { + C.glowBlendEquationSeparateiARB(gpBlendEquationSeparateiARB, (C.GLuint)(buf), (C.GLenum)(modeRGB), (C.GLenum)(modeAlpha)) +} +func BlendEquationi(buf uint32, mode uint32) { + C.glowBlendEquationi(gpBlendEquationi, (C.GLuint)(buf), (C.GLenum)(mode)) +} +func BlendEquationiARB(buf uint32, mode uint32) { + C.glowBlendEquationiARB(gpBlendEquationiARB, (C.GLuint)(buf), (C.GLenum)(mode)) +} + +// specify pixel arithmetic +func BlendFunc(sfactor uint32, dfactor uint32) { + C.glowBlendFunc(gpBlendFunc, (C.GLenum)(sfactor), (C.GLenum)(dfactor)) +} + +// specify pixel arithmetic for RGB and alpha components separately +func BlendFuncSeparate(sfactorRGB uint32, dfactorRGB uint32, sfactorAlpha uint32, dfactorAlpha uint32) { + C.glowBlendFuncSeparate(gpBlendFuncSeparate, (C.GLenum)(sfactorRGB), (C.GLenum)(dfactorRGB), (C.GLenum)(sfactorAlpha), (C.GLenum)(dfactorAlpha)) +} +func BlendFuncSeparatei(buf uint32, srcRGB uint32, dstRGB uint32, srcAlpha uint32, dstAlpha uint32) { + C.glowBlendFuncSeparatei(gpBlendFuncSeparatei, (C.GLuint)(buf), (C.GLenum)(srcRGB), (C.GLenum)(dstRGB), (C.GLenum)(srcAlpha), (C.GLenum)(dstAlpha)) +} +func BlendFuncSeparateiARB(buf uint32, srcRGB uint32, dstRGB uint32, srcAlpha uint32, dstAlpha uint32) { + C.glowBlendFuncSeparateiARB(gpBlendFuncSeparateiARB, (C.GLuint)(buf), (C.GLenum)(srcRGB), (C.GLenum)(dstRGB), (C.GLenum)(srcAlpha), (C.GLenum)(dstAlpha)) +} +func BlendFunci(buf uint32, src uint32, dst uint32) { + C.glowBlendFunci(gpBlendFunci, (C.GLuint)(buf), (C.GLenum)(src), (C.GLenum)(dst)) +} +func BlendFunciARB(buf uint32, src uint32, dst uint32) { + C.glowBlendFunciARB(gpBlendFunciARB, (C.GLuint)(buf), (C.GLenum)(src), (C.GLenum)(dst)) +} +func BlendParameteriNV(pname uint32, value int32) { + C.glowBlendParameteriNV(gpBlendParameteriNV, (C.GLenum)(pname), (C.GLint)(value)) +} + +// copy a block of pixels from one framebuffer object to another +func BlitFramebuffer(srcX0 int32, srcY0 int32, srcX1 int32, srcY1 int32, dstX0 int32, dstY0 int32, dstX1 int32, dstY1 int32, mask uint32, filter uint32) { + C.glowBlitFramebuffer(gpBlitFramebuffer, (C.GLint)(srcX0), (C.GLint)(srcY0), (C.GLint)(srcX1), (C.GLint)(srcY1), (C.GLint)(dstX0), (C.GLint)(dstY0), (C.GLint)(dstX1), (C.GLint)(dstY1), (C.GLbitfield)(mask), (C.GLenum)(filter)) +} + +// copy a block of pixels from one framebuffer object to another +func BlitNamedFramebuffer(readFramebuffer uint32, drawFramebuffer uint32, srcX0 int32, srcY0 int32, srcX1 int32, srcY1 int32, dstX0 int32, dstY0 int32, dstX1 int32, dstY1 int32, mask uint32, filter uint32) { + C.glowBlitNamedFramebuffer(gpBlitNamedFramebuffer, (C.GLuint)(readFramebuffer), (C.GLuint)(drawFramebuffer), (C.GLint)(srcX0), (C.GLint)(srcY0), (C.GLint)(srcX1), (C.GLint)(srcY1), (C.GLint)(dstX0), (C.GLint)(dstY0), (C.GLint)(dstX1), (C.GLint)(dstY1), (C.GLbitfield)(mask), (C.GLenum)(filter)) +} +func BufferAddressRangeNV(pname uint32, index uint32, address uint64, length int) { + C.glowBufferAddressRangeNV(gpBufferAddressRangeNV, (C.GLenum)(pname), (C.GLuint)(index), (C.GLuint64EXT)(address), (C.GLsizeiptr)(length)) +} + +// creates and initializes a buffer object's data store +func BufferData(target uint32, size int, data unsafe.Pointer, usage uint32) { + C.glowBufferData(gpBufferData, (C.GLenum)(target), (C.GLsizeiptr)(size), data, (C.GLenum)(usage)) +} +func BufferPageCommitmentARB(target uint32, offset int, size int, commit bool) { + C.glowBufferPageCommitmentARB(gpBufferPageCommitmentARB, (C.GLenum)(target), (C.GLintptr)(offset), (C.GLsizeiptr)(size), (C.GLboolean)(boolToInt(commit))) +} + +// creates and initializes a buffer object's immutable data store +func BufferStorage(target uint32, size int, data unsafe.Pointer, flags uint32) { + C.glowBufferStorage(gpBufferStorage, (C.GLenum)(target), (C.GLsizeiptr)(size), data, (C.GLbitfield)(flags)) +} + +// updates a subset of a buffer object's data store +func BufferSubData(target uint32, offset int, size int, data unsafe.Pointer) { + C.glowBufferSubData(gpBufferSubData, (C.GLenum)(target), (C.GLintptr)(offset), (C.GLsizeiptr)(size), data) +} +func CallCommandListNV(list uint32) { + C.glowCallCommandListNV(gpCallCommandListNV, (C.GLuint)(list)) +} + +// check the completeness status of a framebuffer +func CheckFramebufferStatus(target uint32) uint32 { + ret := C.glowCheckFramebufferStatus(gpCheckFramebufferStatus, (C.GLenum)(target)) + return (uint32)(ret) +} + +// check the completeness status of a framebuffer +func CheckNamedFramebufferStatus(framebuffer uint32, target uint32) uint32 { + ret := C.glowCheckNamedFramebufferStatus(gpCheckNamedFramebufferStatus, (C.GLuint)(framebuffer), (C.GLenum)(target)) + return (uint32)(ret) +} +func CheckNamedFramebufferStatusEXT(framebuffer uint32, target uint32) uint32 { + ret := C.glowCheckNamedFramebufferStatusEXT(gpCheckNamedFramebufferStatusEXT, (C.GLuint)(framebuffer), (C.GLenum)(target)) + return (uint32)(ret) +} + +// specify whether data read via should be clamped +func ClampColor(target uint32, clamp uint32) { + C.glowClampColor(gpClampColor, (C.GLenum)(target), (C.GLenum)(clamp)) +} + +// clear buffers to preset values +func Clear(mask uint32) { + C.glowClear(gpClear, (C.GLbitfield)(mask)) +} + +// fill a buffer object's data store with a fixed value +func ClearBufferData(target uint32, internalformat uint32, format uint32, xtype uint32, data unsafe.Pointer) { + C.glowClearBufferData(gpClearBufferData, (C.GLenum)(target), (C.GLenum)(internalformat), (C.GLenum)(format), (C.GLenum)(xtype), data) +} + +// fill all or part of buffer object's data store with a fixed value +func ClearBufferSubData(target uint32, internalformat uint32, offset int, size int, format uint32, xtype uint32, data unsafe.Pointer) { + C.glowClearBufferSubData(gpClearBufferSubData, (C.GLenum)(target), (C.GLenum)(internalformat), (C.GLintptr)(offset), (C.GLsizeiptr)(size), (C.GLenum)(format), (C.GLenum)(xtype), data) +} +func ClearBufferfi(buffer uint32, drawbuffer int32, depth float32, stencil int32) { + C.glowClearBufferfi(gpClearBufferfi, (C.GLenum)(buffer), (C.GLint)(drawbuffer), (C.GLfloat)(depth), (C.GLint)(stencil)) +} +func ClearBufferfv(buffer uint32, drawbuffer int32, value *float32) { + C.glowClearBufferfv(gpClearBufferfv, (C.GLenum)(buffer), (C.GLint)(drawbuffer), (*C.GLfloat)(unsafe.Pointer(value))) +} +func ClearBufferiv(buffer uint32, drawbuffer int32, value *int32) { + C.glowClearBufferiv(gpClearBufferiv, (C.GLenum)(buffer), (C.GLint)(drawbuffer), (*C.GLint)(unsafe.Pointer(value))) +} +func ClearBufferuiv(buffer uint32, drawbuffer int32, value *uint32) { + C.glowClearBufferuiv(gpClearBufferuiv, (C.GLenum)(buffer), (C.GLint)(drawbuffer), (*C.GLuint)(unsafe.Pointer(value))) +} + +// specify clear values for the color buffers +func ClearColor(red float32, green float32, blue float32, alpha float32) { + C.glowClearColor(gpClearColor, (C.GLfloat)(red), (C.GLfloat)(green), (C.GLfloat)(blue), (C.GLfloat)(alpha)) +} + +// specify the clear value for the depth buffer +func ClearDepth(depth float64) { + C.glowClearDepth(gpClearDepth, (C.GLdouble)(depth)) +} + +// specify the clear value for the depth buffer +func ClearDepthf(d float32) { + C.glowClearDepthf(gpClearDepthf, (C.GLfloat)(d)) +} + +// fill a buffer object's data store with a fixed value +func ClearNamedBufferData(buffer uint32, internalformat uint32, format uint32, xtype uint32, data unsafe.Pointer) { + C.glowClearNamedBufferData(gpClearNamedBufferData, (C.GLuint)(buffer), (C.GLenum)(internalformat), (C.GLenum)(format), (C.GLenum)(xtype), data) +} +func ClearNamedBufferDataEXT(buffer uint32, internalformat uint32, format uint32, xtype uint32, data unsafe.Pointer) { + C.glowClearNamedBufferDataEXT(gpClearNamedBufferDataEXT, (C.GLuint)(buffer), (C.GLenum)(internalformat), (C.GLenum)(format), (C.GLenum)(xtype), data) +} + +// fill all or part of buffer object's data store with a fixed value +func ClearNamedBufferSubData(buffer uint32, internalformat uint32, offset int, size int, format uint32, xtype uint32, data unsafe.Pointer) { + C.glowClearNamedBufferSubData(gpClearNamedBufferSubData, (C.GLuint)(buffer), (C.GLenum)(internalformat), (C.GLintptr)(offset), (C.GLsizeiptr)(size), (C.GLenum)(format), (C.GLenum)(xtype), data) +} +func ClearNamedBufferSubDataEXT(buffer uint32, internalformat uint32, offset int, size int, format uint32, xtype uint32, data unsafe.Pointer) { + C.glowClearNamedBufferSubDataEXT(gpClearNamedBufferSubDataEXT, (C.GLuint)(buffer), (C.GLenum)(internalformat), (C.GLsizeiptr)(offset), (C.GLsizeiptr)(size), (C.GLenum)(format), (C.GLenum)(xtype), data) +} +func ClearNamedFramebufferfi(framebuffer uint32, buffer uint32, drawbuffer int32, depth float32, stencil int32) { + C.glowClearNamedFramebufferfi(gpClearNamedFramebufferfi, (C.GLuint)(framebuffer), (C.GLenum)(buffer), (C.GLint)(drawbuffer), (C.GLfloat)(depth), (C.GLint)(stencil)) +} +func ClearNamedFramebufferfv(framebuffer uint32, buffer uint32, drawbuffer int32, value *float32) { + C.glowClearNamedFramebufferfv(gpClearNamedFramebufferfv, (C.GLuint)(framebuffer), (C.GLenum)(buffer), (C.GLint)(drawbuffer), (*C.GLfloat)(unsafe.Pointer(value))) +} +func ClearNamedFramebufferiv(framebuffer uint32, buffer uint32, drawbuffer int32, value *int32) { + C.glowClearNamedFramebufferiv(gpClearNamedFramebufferiv, (C.GLuint)(framebuffer), (C.GLenum)(buffer), (C.GLint)(drawbuffer), (*C.GLint)(unsafe.Pointer(value))) +} +func ClearNamedFramebufferuiv(framebuffer uint32, buffer uint32, drawbuffer int32, value *uint32) { + C.glowClearNamedFramebufferuiv(gpClearNamedFramebufferuiv, (C.GLuint)(framebuffer), (C.GLenum)(buffer), (C.GLint)(drawbuffer), (*C.GLuint)(unsafe.Pointer(value))) +} + +// specify the clear value for the stencil buffer +func ClearStencil(s int32) { + C.glowClearStencil(gpClearStencil, (C.GLint)(s)) +} + +// fills all a texture image with a constant value +func ClearTexImage(texture uint32, level int32, format uint32, xtype uint32, data unsafe.Pointer) { + C.glowClearTexImage(gpClearTexImage, (C.GLuint)(texture), (C.GLint)(level), (C.GLenum)(format), (C.GLenum)(xtype), data) +} + +// fills all or part of a texture image with a constant value +func ClearTexSubImage(texture uint32, level int32, xoffset int32, yoffset int32, zoffset int32, width int32, height int32, depth int32, format uint32, xtype uint32, data unsafe.Pointer) { + C.glowClearTexSubImage(gpClearTexSubImage, (C.GLuint)(texture), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLint)(zoffset), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth), (C.GLenum)(format), (C.GLenum)(xtype), data) +} +func ClientAttribDefaultEXT(mask uint32) { + C.glowClientAttribDefaultEXT(gpClientAttribDefaultEXT, (C.GLbitfield)(mask)) +} + +// block and wait for a sync object to become signaled +func ClientWaitSync(sync uintptr, flags uint32, timeout uint64) uint32 { + ret := C.glowClientWaitSync(gpClientWaitSync, (C.GLsync)(sync), (C.GLbitfield)(flags), (C.GLuint64)(timeout)) + return (uint32)(ret) +} + +// control clip coordinate to window coordinate behavior +func ClipControl(origin uint32, depth uint32) { + C.glowClipControl(gpClipControl, (C.GLenum)(origin), (C.GLenum)(depth)) +} +func ColorFormatNV(size int32, xtype uint32, stride int32) { + C.glowColorFormatNV(gpColorFormatNV, (C.GLint)(size), (C.GLenum)(xtype), (C.GLsizei)(stride)) +} +func ColorMask(red bool, green bool, blue bool, alpha bool) { + C.glowColorMask(gpColorMask, (C.GLboolean)(boolToInt(red)), (C.GLboolean)(boolToInt(green)), (C.GLboolean)(boolToInt(blue)), (C.GLboolean)(boolToInt(alpha))) +} +func ColorMaski(index uint32, r bool, g bool, b bool, a bool) { + C.glowColorMaski(gpColorMaski, (C.GLuint)(index), (C.GLboolean)(boolToInt(r)), (C.GLboolean)(boolToInt(g)), (C.GLboolean)(boolToInt(b)), (C.GLboolean)(boolToInt(a))) +} +func CommandListSegmentsNV(list uint32, segments uint32) { + C.glowCommandListSegmentsNV(gpCommandListSegmentsNV, (C.GLuint)(list), (C.GLuint)(segments)) +} +func CompileCommandListNV(list uint32) { + C.glowCompileCommandListNV(gpCompileCommandListNV, (C.GLuint)(list)) +} + +// Compiles a shader object +func CompileShader(shader uint32) { + C.glowCompileShader(gpCompileShader, (C.GLuint)(shader)) +} +func CompileShaderIncludeARB(shader uint32, count int32, path **uint8, length *int32) { + C.glowCompileShaderIncludeARB(gpCompileShaderIncludeARB, (C.GLuint)(shader), (C.GLsizei)(count), (**C.GLchar)(unsafe.Pointer(path)), (*C.GLint)(unsafe.Pointer(length))) +} +func CompressedMultiTexImage1DEXT(texunit uint32, target uint32, level int32, internalformat uint32, width int32, border int32, imageSize int32, bits unsafe.Pointer) { + C.glowCompressedMultiTexImage1DEXT(gpCompressedMultiTexImage1DEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLint)(level), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLint)(border), (C.GLsizei)(imageSize), bits) +} +func CompressedMultiTexImage2DEXT(texunit uint32, target uint32, level int32, internalformat uint32, width int32, height int32, border int32, imageSize int32, bits unsafe.Pointer) { + C.glowCompressedMultiTexImage2DEXT(gpCompressedMultiTexImage2DEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLint)(level), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLint)(border), (C.GLsizei)(imageSize), bits) +} +func CompressedMultiTexImage3DEXT(texunit uint32, target uint32, level int32, internalformat uint32, width int32, height int32, depth int32, border int32, imageSize int32, bits unsafe.Pointer) { + C.glowCompressedMultiTexImage3DEXT(gpCompressedMultiTexImage3DEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLint)(level), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth), (C.GLint)(border), (C.GLsizei)(imageSize), bits) +} +func CompressedMultiTexSubImage1DEXT(texunit uint32, target uint32, level int32, xoffset int32, width int32, format uint32, imageSize int32, bits unsafe.Pointer) { + C.glowCompressedMultiTexSubImage1DEXT(gpCompressedMultiTexSubImage1DEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLsizei)(width), (C.GLenum)(format), (C.GLsizei)(imageSize), bits) +} +func CompressedMultiTexSubImage2DEXT(texunit uint32, target uint32, level int32, xoffset int32, yoffset int32, width int32, height int32, format uint32, imageSize int32, bits unsafe.Pointer) { + C.glowCompressedMultiTexSubImage2DEXT(gpCompressedMultiTexSubImage2DEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLenum)(format), (C.GLsizei)(imageSize), bits) +} +func CompressedMultiTexSubImage3DEXT(texunit uint32, target uint32, level int32, xoffset int32, yoffset int32, zoffset int32, width int32, height int32, depth int32, format uint32, imageSize int32, bits unsafe.Pointer) { + C.glowCompressedMultiTexSubImage3DEXT(gpCompressedMultiTexSubImage3DEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLint)(zoffset), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth), (C.GLenum)(format), (C.GLsizei)(imageSize), bits) +} + +// specify a one-dimensional texture image in a compressed format +func CompressedTexImage1D(target uint32, level int32, internalformat uint32, width int32, border int32, imageSize int32, data unsafe.Pointer) { + C.glowCompressedTexImage1D(gpCompressedTexImage1D, (C.GLenum)(target), (C.GLint)(level), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLint)(border), (C.GLsizei)(imageSize), data) +} + +// specify a two-dimensional texture image in a compressed format +func CompressedTexImage2D(target uint32, level int32, internalformat uint32, width int32, height int32, border int32, imageSize int32, data unsafe.Pointer) { + C.glowCompressedTexImage2D(gpCompressedTexImage2D, (C.GLenum)(target), (C.GLint)(level), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLint)(border), (C.GLsizei)(imageSize), data) +} + +// specify a three-dimensional texture image in a compressed format +func CompressedTexImage3D(target uint32, level int32, internalformat uint32, width int32, height int32, depth int32, border int32, imageSize int32, data unsafe.Pointer) { + C.glowCompressedTexImage3D(gpCompressedTexImage3D, (C.GLenum)(target), (C.GLint)(level), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth), (C.GLint)(border), (C.GLsizei)(imageSize), data) +} + +// specify a one-dimensional texture subimage in a compressed format +func CompressedTexSubImage1D(target uint32, level int32, xoffset int32, width int32, format uint32, imageSize int32, data unsafe.Pointer) { + C.glowCompressedTexSubImage1D(gpCompressedTexSubImage1D, (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLsizei)(width), (C.GLenum)(format), (C.GLsizei)(imageSize), data) +} + +// specify a two-dimensional texture subimage in a compressed format +func CompressedTexSubImage2D(target uint32, level int32, xoffset int32, yoffset int32, width int32, height int32, format uint32, imageSize int32, data unsafe.Pointer) { + C.glowCompressedTexSubImage2D(gpCompressedTexSubImage2D, (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLenum)(format), (C.GLsizei)(imageSize), data) +} + +// specify a three-dimensional texture subimage in a compressed format +func CompressedTexSubImage3D(target uint32, level int32, xoffset int32, yoffset int32, zoffset int32, width int32, height int32, depth int32, format uint32, imageSize int32, data unsafe.Pointer) { + C.glowCompressedTexSubImage3D(gpCompressedTexSubImage3D, (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLint)(zoffset), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth), (C.GLenum)(format), (C.GLsizei)(imageSize), data) +} +func CompressedTextureImage1DEXT(texture uint32, target uint32, level int32, internalformat uint32, width int32, border int32, imageSize int32, bits unsafe.Pointer) { + C.glowCompressedTextureImage1DEXT(gpCompressedTextureImage1DEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLint)(level), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLint)(border), (C.GLsizei)(imageSize), bits) +} +func CompressedTextureImage2DEXT(texture uint32, target uint32, level int32, internalformat uint32, width int32, height int32, border int32, imageSize int32, bits unsafe.Pointer) { + C.glowCompressedTextureImage2DEXT(gpCompressedTextureImage2DEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLint)(level), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLint)(border), (C.GLsizei)(imageSize), bits) +} +func CompressedTextureImage3DEXT(texture uint32, target uint32, level int32, internalformat uint32, width int32, height int32, depth int32, border int32, imageSize int32, bits unsafe.Pointer) { + C.glowCompressedTextureImage3DEXT(gpCompressedTextureImage3DEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLint)(level), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth), (C.GLint)(border), (C.GLsizei)(imageSize), bits) +} + +// specify a one-dimensional texture subimage in a compressed format +func CompressedTextureSubImage1D(texture uint32, level int32, xoffset int32, width int32, format uint32, imageSize int32, data unsafe.Pointer) { + C.glowCompressedTextureSubImage1D(gpCompressedTextureSubImage1D, (C.GLuint)(texture), (C.GLint)(level), (C.GLint)(xoffset), (C.GLsizei)(width), (C.GLenum)(format), (C.GLsizei)(imageSize), data) +} +func CompressedTextureSubImage1DEXT(texture uint32, target uint32, level int32, xoffset int32, width int32, format uint32, imageSize int32, bits unsafe.Pointer) { + C.glowCompressedTextureSubImage1DEXT(gpCompressedTextureSubImage1DEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLsizei)(width), (C.GLenum)(format), (C.GLsizei)(imageSize), bits) +} + +// specify a two-dimensional texture subimage in a compressed format +func CompressedTextureSubImage2D(texture uint32, level int32, xoffset int32, yoffset int32, width int32, height int32, format uint32, imageSize int32, data unsafe.Pointer) { + C.glowCompressedTextureSubImage2D(gpCompressedTextureSubImage2D, (C.GLuint)(texture), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLenum)(format), (C.GLsizei)(imageSize), data) +} +func CompressedTextureSubImage2DEXT(texture uint32, target uint32, level int32, xoffset int32, yoffset int32, width int32, height int32, format uint32, imageSize int32, bits unsafe.Pointer) { + C.glowCompressedTextureSubImage2DEXT(gpCompressedTextureSubImage2DEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLenum)(format), (C.GLsizei)(imageSize), bits) +} + +// specify a three-dimensional texture subimage in a compressed format +func CompressedTextureSubImage3D(texture uint32, level int32, xoffset int32, yoffset int32, zoffset int32, width int32, height int32, depth int32, format uint32, imageSize int32, data unsafe.Pointer) { + C.glowCompressedTextureSubImage3D(gpCompressedTextureSubImage3D, (C.GLuint)(texture), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLint)(zoffset), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth), (C.GLenum)(format), (C.GLsizei)(imageSize), data) +} +func CompressedTextureSubImage3DEXT(texture uint32, target uint32, level int32, xoffset int32, yoffset int32, zoffset int32, width int32, height int32, depth int32, format uint32, imageSize int32, bits unsafe.Pointer) { + C.glowCompressedTextureSubImage3DEXT(gpCompressedTextureSubImage3DEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLint)(zoffset), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth), (C.GLenum)(format), (C.GLsizei)(imageSize), bits) +} +func ConservativeRasterParameterfNV(pname uint32, value float32) { + C.glowConservativeRasterParameterfNV(gpConservativeRasterParameterfNV, (C.GLenum)(pname), (C.GLfloat)(value)) +} +func ConservativeRasterParameteriNV(pname uint32, param int32) { + C.glowConservativeRasterParameteriNV(gpConservativeRasterParameteriNV, (C.GLenum)(pname), (C.GLint)(param)) +} + +// copy all or part of the data store of a buffer object to the data store of another buffer object +func CopyBufferSubData(readTarget uint32, writeTarget uint32, readOffset int, writeOffset int, size int) { + C.glowCopyBufferSubData(gpCopyBufferSubData, (C.GLenum)(readTarget), (C.GLenum)(writeTarget), (C.GLintptr)(readOffset), (C.GLintptr)(writeOffset), (C.GLsizeiptr)(size)) +} + +// perform a raw data copy between two images +func CopyImageSubData(srcName uint32, srcTarget uint32, srcLevel int32, srcX int32, srcY int32, srcZ int32, dstName uint32, dstTarget uint32, dstLevel int32, dstX int32, dstY int32, dstZ int32, srcWidth int32, srcHeight int32, srcDepth int32) { + C.glowCopyImageSubData(gpCopyImageSubData, (C.GLuint)(srcName), (C.GLenum)(srcTarget), (C.GLint)(srcLevel), (C.GLint)(srcX), (C.GLint)(srcY), (C.GLint)(srcZ), (C.GLuint)(dstName), (C.GLenum)(dstTarget), (C.GLint)(dstLevel), (C.GLint)(dstX), (C.GLint)(dstY), (C.GLint)(dstZ), (C.GLsizei)(srcWidth), (C.GLsizei)(srcHeight), (C.GLsizei)(srcDepth)) +} +func CopyMultiTexImage1DEXT(texunit uint32, target uint32, level int32, internalformat uint32, x int32, y int32, width int32, border int32) { + C.glowCopyMultiTexImage1DEXT(gpCopyMultiTexImage1DEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLint)(level), (C.GLenum)(internalformat), (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width), (C.GLint)(border)) +} +func CopyMultiTexImage2DEXT(texunit uint32, target uint32, level int32, internalformat uint32, x int32, y int32, width int32, height int32, border int32) { + C.glowCopyMultiTexImage2DEXT(gpCopyMultiTexImage2DEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLint)(level), (C.GLenum)(internalformat), (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLint)(border)) +} +func CopyMultiTexSubImage1DEXT(texunit uint32, target uint32, level int32, xoffset int32, x int32, y int32, width int32) { + C.glowCopyMultiTexSubImage1DEXT(gpCopyMultiTexSubImage1DEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width)) +} +func CopyMultiTexSubImage2DEXT(texunit uint32, target uint32, level int32, xoffset int32, yoffset int32, x int32, y int32, width int32, height int32) { + C.glowCopyMultiTexSubImage2DEXT(gpCopyMultiTexSubImage2DEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width), (C.GLsizei)(height)) +} +func CopyMultiTexSubImage3DEXT(texunit uint32, target uint32, level int32, xoffset int32, yoffset int32, zoffset int32, x int32, y int32, width int32, height int32) { + C.glowCopyMultiTexSubImage3DEXT(gpCopyMultiTexSubImage3DEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLint)(zoffset), (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width), (C.GLsizei)(height)) +} + +// copy all or part of the data store of a buffer object to the data store of another buffer object +func CopyNamedBufferSubData(readBuffer uint32, writeBuffer uint32, readOffset int, writeOffset int, size int) { + C.glowCopyNamedBufferSubData(gpCopyNamedBufferSubData, (C.GLuint)(readBuffer), (C.GLuint)(writeBuffer), (C.GLintptr)(readOffset), (C.GLintptr)(writeOffset), (C.GLsizeiptr)(size)) +} +func CopyPathNV(resultPath uint32, srcPath uint32) { + C.glowCopyPathNV(gpCopyPathNV, (C.GLuint)(resultPath), (C.GLuint)(srcPath)) +} + +// copy pixels into a 1D texture image +func CopyTexImage1D(target uint32, level int32, internalformat uint32, x int32, y int32, width int32, border int32) { + C.glowCopyTexImage1D(gpCopyTexImage1D, (C.GLenum)(target), (C.GLint)(level), (C.GLenum)(internalformat), (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width), (C.GLint)(border)) +} + +// copy pixels into a 2D texture image +func CopyTexImage2D(target uint32, level int32, internalformat uint32, x int32, y int32, width int32, height int32, border int32) { + C.glowCopyTexImage2D(gpCopyTexImage2D, (C.GLenum)(target), (C.GLint)(level), (C.GLenum)(internalformat), (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLint)(border)) +} + +// copy a one-dimensional texture subimage +func CopyTexSubImage1D(target uint32, level int32, xoffset int32, x int32, y int32, width int32) { + C.glowCopyTexSubImage1D(gpCopyTexSubImage1D, (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width)) +} + +// copy a two-dimensional texture subimage +func CopyTexSubImage2D(target uint32, level int32, xoffset int32, yoffset int32, x int32, y int32, width int32, height int32) { + C.glowCopyTexSubImage2D(gpCopyTexSubImage2D, (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width), (C.GLsizei)(height)) +} + +// copy a three-dimensional texture subimage +func CopyTexSubImage3D(target uint32, level int32, xoffset int32, yoffset int32, zoffset int32, x int32, y int32, width int32, height int32) { + C.glowCopyTexSubImage3D(gpCopyTexSubImage3D, (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLint)(zoffset), (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width), (C.GLsizei)(height)) +} +func CopyTextureImage1DEXT(texture uint32, target uint32, level int32, internalformat uint32, x int32, y int32, width int32, border int32) { + C.glowCopyTextureImage1DEXT(gpCopyTextureImage1DEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLint)(level), (C.GLenum)(internalformat), (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width), (C.GLint)(border)) +} +func CopyTextureImage2DEXT(texture uint32, target uint32, level int32, internalformat uint32, x int32, y int32, width int32, height int32, border int32) { + C.glowCopyTextureImage2DEXT(gpCopyTextureImage2DEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLint)(level), (C.GLenum)(internalformat), (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLint)(border)) +} + +// copy a one-dimensional texture subimage +func CopyTextureSubImage1D(texture uint32, level int32, xoffset int32, x int32, y int32, width int32) { + C.glowCopyTextureSubImage1D(gpCopyTextureSubImage1D, (C.GLuint)(texture), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width)) +} +func CopyTextureSubImage1DEXT(texture uint32, target uint32, level int32, xoffset int32, x int32, y int32, width int32) { + C.glowCopyTextureSubImage1DEXT(gpCopyTextureSubImage1DEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width)) +} + +// copy a two-dimensional texture subimage +func CopyTextureSubImage2D(texture uint32, level int32, xoffset int32, yoffset int32, x int32, y int32, width int32, height int32) { + C.glowCopyTextureSubImage2D(gpCopyTextureSubImage2D, (C.GLuint)(texture), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width), (C.GLsizei)(height)) +} +func CopyTextureSubImage2DEXT(texture uint32, target uint32, level int32, xoffset int32, yoffset int32, x int32, y int32, width int32, height int32) { + C.glowCopyTextureSubImage2DEXT(gpCopyTextureSubImage2DEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width), (C.GLsizei)(height)) +} + +// copy a three-dimensional texture subimage +func CopyTextureSubImage3D(texture uint32, level int32, xoffset int32, yoffset int32, zoffset int32, x int32, y int32, width int32, height int32) { + C.glowCopyTextureSubImage3D(gpCopyTextureSubImage3D, (C.GLuint)(texture), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLint)(zoffset), (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width), (C.GLsizei)(height)) +} +func CopyTextureSubImage3DEXT(texture uint32, target uint32, level int32, xoffset int32, yoffset int32, zoffset int32, x int32, y int32, width int32, height int32) { + C.glowCopyTextureSubImage3DEXT(gpCopyTextureSubImage3DEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLint)(zoffset), (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width), (C.GLsizei)(height)) +} +func CoverFillPathInstancedNV(numPaths int32, pathNameType uint32, paths unsafe.Pointer, pathBase uint32, coverMode uint32, transformType uint32, transformValues *float32) { + C.glowCoverFillPathInstancedNV(gpCoverFillPathInstancedNV, (C.GLsizei)(numPaths), (C.GLenum)(pathNameType), paths, (C.GLuint)(pathBase), (C.GLenum)(coverMode), (C.GLenum)(transformType), (*C.GLfloat)(unsafe.Pointer(transformValues))) +} +func CoverFillPathNV(path uint32, coverMode uint32) { + C.glowCoverFillPathNV(gpCoverFillPathNV, (C.GLuint)(path), (C.GLenum)(coverMode)) +} +func CoverStrokePathInstancedNV(numPaths int32, pathNameType uint32, paths unsafe.Pointer, pathBase uint32, coverMode uint32, transformType uint32, transformValues *float32) { + C.glowCoverStrokePathInstancedNV(gpCoverStrokePathInstancedNV, (C.GLsizei)(numPaths), (C.GLenum)(pathNameType), paths, (C.GLuint)(pathBase), (C.GLenum)(coverMode), (C.GLenum)(transformType), (*C.GLfloat)(unsafe.Pointer(transformValues))) +} +func CoverStrokePathNV(path uint32, coverMode uint32) { + C.glowCoverStrokePathNV(gpCoverStrokePathNV, (C.GLuint)(path), (C.GLenum)(coverMode)) +} +func CoverageModulationNV(components uint32) { + C.glowCoverageModulationNV(gpCoverageModulationNV, (C.GLenum)(components)) +} +func CoverageModulationTableNV(n int32, v *float32) { + C.glowCoverageModulationTableNV(gpCoverageModulationTableNV, (C.GLsizei)(n), (*C.GLfloat)(unsafe.Pointer(v))) +} + +// create buffer objects +func CreateBuffers(n int32, buffers *uint32) { + C.glowCreateBuffers(gpCreateBuffers, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(buffers))) +} +func CreateCommandListsNV(n int32, lists *uint32) { + C.glowCreateCommandListsNV(gpCreateCommandListsNV, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(lists))) +} + +// create framebuffer objects +func CreateFramebuffers(n int32, framebuffers *uint32) { + C.glowCreateFramebuffers(gpCreateFramebuffers, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(framebuffers))) +} +func CreatePerfQueryINTEL(queryId uint32, queryHandle *uint32) { + C.glowCreatePerfQueryINTEL(gpCreatePerfQueryINTEL, (C.GLuint)(queryId), (*C.GLuint)(unsafe.Pointer(queryHandle))) +} + +// Creates a program object +func CreateProgram() uint32 { + ret := C.glowCreateProgram(gpCreateProgram) + return (uint32)(ret) +} + +// create program pipeline objects +func CreateProgramPipelines(n int32, pipelines *uint32) { + C.glowCreateProgramPipelines(gpCreateProgramPipelines, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(pipelines))) +} + +// create query objects +func CreateQueries(target uint32, n int32, ids *uint32) { + C.glowCreateQueries(gpCreateQueries, (C.GLenum)(target), (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(ids))) +} + +// create renderbuffer objects +func CreateRenderbuffers(n int32, renderbuffers *uint32) { + C.glowCreateRenderbuffers(gpCreateRenderbuffers, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(renderbuffers))) +} + +// create sampler objects +func CreateSamplers(n int32, samplers *uint32) { + C.glowCreateSamplers(gpCreateSamplers, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(samplers))) +} + +// Creates a shader object +func CreateShader(xtype uint32) uint32 { + ret := C.glowCreateShader(gpCreateShader, (C.GLenum)(xtype)) + return (uint32)(ret) +} +func CreateShaderProgramEXT(xtype uint32, xstring *uint8) uint32 { + ret := C.glowCreateShaderProgramEXT(gpCreateShaderProgramEXT, (C.GLenum)(xtype), (*C.GLchar)(unsafe.Pointer(xstring))) + return (uint32)(ret) +} + +// create a stand-alone program from an array of null-terminated source code strings +func CreateShaderProgramv(xtype uint32, count int32, strings **uint8) uint32 { + ret := C.glowCreateShaderProgramv(gpCreateShaderProgramv, (C.GLenum)(xtype), (C.GLsizei)(count), (**C.GLchar)(unsafe.Pointer(strings))) + return (uint32)(ret) +} +func CreateShaderProgramvEXT(xtype uint32, count int32, strings **uint8) uint32 { + ret := C.glowCreateShaderProgramvEXT(gpCreateShaderProgramvEXT, (C.GLenum)(xtype), (C.GLsizei)(count), (**C.GLchar)(unsafe.Pointer(strings))) + return (uint32)(ret) +} +func CreateStatesNV(n int32, states *uint32) { + C.glowCreateStatesNV(gpCreateStatesNV, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(states))) +} +func CreateSyncFromCLeventARB(context *C.struct__cl_context, event *C.struct__cl_event, flags uint32) uintptr { + ret := C.glowCreateSyncFromCLeventARB(gpCreateSyncFromCLeventARB, (*C.struct__cl_context)(unsafe.Pointer(context)), (*C.struct__cl_event)(unsafe.Pointer(event)), (C.GLbitfield)(flags)) + return (uintptr)(ret) +} + +// create texture objects +func CreateTextures(target uint32, n int32, textures *uint32) { + C.glowCreateTextures(gpCreateTextures, (C.GLenum)(target), (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(textures))) +} + +// create transform feedback objects +func CreateTransformFeedbacks(n int32, ids *uint32) { + C.glowCreateTransformFeedbacks(gpCreateTransformFeedbacks, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(ids))) +} + +// create vertex array objects +func CreateVertexArrays(n int32, arrays *uint32) { + C.glowCreateVertexArrays(gpCreateVertexArrays, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(arrays))) +} + +// specify whether front- or back-facing facets can be culled +func CullFace(mode uint32) { + C.glowCullFace(gpCullFace, (C.GLenum)(mode)) +} + +// specify a callback to receive debugging messages from the GL +func DebugMessageCallback(callback DebugProc, userParam unsafe.Pointer) { + userDebugCallback = callback + C.glowDebugMessageCallback(gpDebugMessageCallback, (C.GLDEBUGPROC)(unsafe.Pointer(&callback)), userParam) +} +func DebugMessageCallbackARB(callback DebugProc, userParam unsafe.Pointer) { + userDebugCallback = callback + C.glowDebugMessageCallbackARB(gpDebugMessageCallbackARB, (C.GLDEBUGPROCARB)(unsafe.Pointer(&callback)), userParam) +} +func DebugMessageCallbackKHR(callback DebugProc, userParam unsafe.Pointer) { + userDebugCallback = callback + C.glowDebugMessageCallbackKHR(gpDebugMessageCallbackKHR, (C.GLDEBUGPROCKHR)(unsafe.Pointer(&callback)), userParam) +} + +// control the reporting of debug messages in a debug context +func DebugMessageControl(source uint32, xtype uint32, severity uint32, count int32, ids *uint32, enabled bool) { + C.glowDebugMessageControl(gpDebugMessageControl, (C.GLenum)(source), (C.GLenum)(xtype), (C.GLenum)(severity), (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(ids)), (C.GLboolean)(boolToInt(enabled))) +} +func DebugMessageControlARB(source uint32, xtype uint32, severity uint32, count int32, ids *uint32, enabled bool) { + C.glowDebugMessageControlARB(gpDebugMessageControlARB, (C.GLenum)(source), (C.GLenum)(xtype), (C.GLenum)(severity), (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(ids)), (C.GLboolean)(boolToInt(enabled))) +} +func DebugMessageControlKHR(source uint32, xtype uint32, severity uint32, count int32, ids *uint32, enabled bool) { + C.glowDebugMessageControlKHR(gpDebugMessageControlKHR, (C.GLenum)(source), (C.GLenum)(xtype), (C.GLenum)(severity), (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(ids)), (C.GLboolean)(boolToInt(enabled))) +} + +// inject an application-supplied message into the debug message queue +func DebugMessageInsert(source uint32, xtype uint32, id uint32, severity uint32, length int32, buf *uint8) { + C.glowDebugMessageInsert(gpDebugMessageInsert, (C.GLenum)(source), (C.GLenum)(xtype), (C.GLuint)(id), (C.GLenum)(severity), (C.GLsizei)(length), (*C.GLchar)(unsafe.Pointer(buf))) +} +func DebugMessageInsertARB(source uint32, xtype uint32, id uint32, severity uint32, length int32, buf *uint8) { + C.glowDebugMessageInsertARB(gpDebugMessageInsertARB, (C.GLenum)(source), (C.GLenum)(xtype), (C.GLuint)(id), (C.GLenum)(severity), (C.GLsizei)(length), (*C.GLchar)(unsafe.Pointer(buf))) +} +func DebugMessageInsertKHR(source uint32, xtype uint32, id uint32, severity uint32, length int32, buf *uint8) { + C.glowDebugMessageInsertKHR(gpDebugMessageInsertKHR, (C.GLenum)(source), (C.GLenum)(xtype), (C.GLuint)(id), (C.GLenum)(severity), (C.GLsizei)(length), (*C.GLchar)(unsafe.Pointer(buf))) +} + +// delete named buffer objects +func DeleteBuffers(n int32, buffers *uint32) { + C.glowDeleteBuffers(gpDeleteBuffers, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(buffers))) +} +func DeleteCommandListsNV(n int32, lists *uint32) { + C.glowDeleteCommandListsNV(gpDeleteCommandListsNV, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(lists))) +} + +// delete framebuffer objects +func DeleteFramebuffers(n int32, framebuffers *uint32) { + C.glowDeleteFramebuffers(gpDeleteFramebuffers, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(framebuffers))) +} +func DeleteNamedStringARB(namelen int32, name *uint8) { + C.glowDeleteNamedStringARB(gpDeleteNamedStringARB, (C.GLint)(namelen), (*C.GLchar)(unsafe.Pointer(name))) +} +func DeletePathsNV(path uint32, xrange int32) { + C.glowDeletePathsNV(gpDeletePathsNV, (C.GLuint)(path), (C.GLsizei)(xrange)) +} +func DeletePerfMonitorsAMD(n int32, monitors *uint32) { + C.glowDeletePerfMonitorsAMD(gpDeletePerfMonitorsAMD, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(monitors))) +} +func DeletePerfQueryINTEL(queryHandle uint32) { + C.glowDeletePerfQueryINTEL(gpDeletePerfQueryINTEL, (C.GLuint)(queryHandle)) +} + +// Deletes a program object +func DeleteProgram(program uint32) { + C.glowDeleteProgram(gpDeleteProgram, (C.GLuint)(program)) +} + +// delete program pipeline objects +func DeleteProgramPipelines(n int32, pipelines *uint32) { + C.glowDeleteProgramPipelines(gpDeleteProgramPipelines, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(pipelines))) +} +func DeleteProgramPipelinesEXT(n int32, pipelines *uint32) { + C.glowDeleteProgramPipelinesEXT(gpDeleteProgramPipelinesEXT, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(pipelines))) +} + +// delete named query objects +func DeleteQueries(n int32, ids *uint32) { + C.glowDeleteQueries(gpDeleteQueries, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(ids))) +} + +// delete renderbuffer objects +func DeleteRenderbuffers(n int32, renderbuffers *uint32) { + C.glowDeleteRenderbuffers(gpDeleteRenderbuffers, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(renderbuffers))) +} + +// delete named sampler objects +func DeleteSamplers(count int32, samplers *uint32) { + C.glowDeleteSamplers(gpDeleteSamplers, (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(samplers))) +} + +// Deletes a shader object +func DeleteShader(shader uint32) { + C.glowDeleteShader(gpDeleteShader, (C.GLuint)(shader)) +} +func DeleteStatesNV(n int32, states *uint32) { + C.glowDeleteStatesNV(gpDeleteStatesNV, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(states))) +} + +// delete a sync object +func DeleteSync(sync uintptr) { + C.glowDeleteSync(gpDeleteSync, (C.GLsync)(sync)) +} + +// delete named textures +func DeleteTextures(n int32, textures *uint32) { + C.glowDeleteTextures(gpDeleteTextures, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(textures))) +} + +// delete transform feedback objects +func DeleteTransformFeedbacks(n int32, ids *uint32) { + C.glowDeleteTransformFeedbacks(gpDeleteTransformFeedbacks, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(ids))) +} + +// delete vertex array objects +func DeleteVertexArrays(n int32, arrays *uint32) { + C.glowDeleteVertexArrays(gpDeleteVertexArrays, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(arrays))) +} + +// specify the value used for depth buffer comparisons +func DepthFunc(xfunc uint32) { + C.glowDepthFunc(gpDepthFunc, (C.GLenum)(xfunc)) +} + +// enable or disable writing into the depth buffer +func DepthMask(flag bool) { + C.glowDepthMask(gpDepthMask, (C.GLboolean)(boolToInt(flag))) +} + +// specify mapping of depth values from normalized device coordinates to window coordinates +func DepthRange(n float64, f float64) { + C.glowDepthRange(gpDepthRange, (C.GLdouble)(n), (C.GLdouble)(f)) +} +func DepthRangeArrayv(first uint32, count int32, v *float64) { + C.glowDepthRangeArrayv(gpDepthRangeArrayv, (C.GLuint)(first), (C.GLsizei)(count), (*C.GLdouble)(unsafe.Pointer(v))) +} + +// specify mapping of depth values from normalized device coordinates to window coordinates for a specified viewport +func DepthRangeIndexed(index uint32, n float64, f float64) { + C.glowDepthRangeIndexed(gpDepthRangeIndexed, (C.GLuint)(index), (C.GLdouble)(n), (C.GLdouble)(f)) +} + +// specify mapping of depth values from normalized device coordinates to window coordinates +func DepthRangef(n float32, f float32) { + C.glowDepthRangef(gpDepthRangef, (C.GLfloat)(n), (C.GLfloat)(f)) +} + +// Detaches a shader object from a program object to which it is attached +func DetachShader(program uint32, shader uint32) { + C.glowDetachShader(gpDetachShader, (C.GLuint)(program), (C.GLuint)(shader)) +} +func Disable(cap uint32) { + C.glowDisable(gpDisable, (C.GLenum)(cap)) +} +func DisableClientStateIndexedEXT(array uint32, index uint32) { + C.glowDisableClientStateIndexedEXT(gpDisableClientStateIndexedEXT, (C.GLenum)(array), (C.GLuint)(index)) +} +func DisableClientStateiEXT(array uint32, index uint32) { + C.glowDisableClientStateiEXT(gpDisableClientStateiEXT, (C.GLenum)(array), (C.GLuint)(index)) +} +func DisableIndexedEXT(target uint32, index uint32) { + C.glowDisableIndexedEXT(gpDisableIndexedEXT, (C.GLenum)(target), (C.GLuint)(index)) +} + +// Enable or disable a generic vertex attribute array +func DisableVertexArrayAttrib(vaobj uint32, index uint32) { + C.glowDisableVertexArrayAttrib(gpDisableVertexArrayAttrib, (C.GLuint)(vaobj), (C.GLuint)(index)) +} +func DisableVertexArrayAttribEXT(vaobj uint32, index uint32) { + C.glowDisableVertexArrayAttribEXT(gpDisableVertexArrayAttribEXT, (C.GLuint)(vaobj), (C.GLuint)(index)) +} +func DisableVertexArrayEXT(vaobj uint32, array uint32) { + C.glowDisableVertexArrayEXT(gpDisableVertexArrayEXT, (C.GLuint)(vaobj), (C.GLenum)(array)) +} + +// Enable or disable a generic vertex attribute array +func DisableVertexAttribArray(index uint32) { + C.glowDisableVertexAttribArray(gpDisableVertexAttribArray, (C.GLuint)(index)) +} +func Disablei(target uint32, index uint32) { + C.glowDisablei(gpDisablei, (C.GLenum)(target), (C.GLuint)(index)) +} + +// launch one or more compute work groups +func DispatchCompute(num_groups_x uint32, num_groups_y uint32, num_groups_z uint32) { + C.glowDispatchCompute(gpDispatchCompute, (C.GLuint)(num_groups_x), (C.GLuint)(num_groups_y), (C.GLuint)(num_groups_z)) +} +func DispatchComputeGroupSizeARB(num_groups_x uint32, num_groups_y uint32, num_groups_z uint32, group_size_x uint32, group_size_y uint32, group_size_z uint32) { + C.glowDispatchComputeGroupSizeARB(gpDispatchComputeGroupSizeARB, (C.GLuint)(num_groups_x), (C.GLuint)(num_groups_y), (C.GLuint)(num_groups_z), (C.GLuint)(group_size_x), (C.GLuint)(group_size_y), (C.GLuint)(group_size_z)) +} + +// launch one or more compute work groups using parameters stored in a buffer +func DispatchComputeIndirect(indirect int) { + C.glowDispatchComputeIndirect(gpDispatchComputeIndirect, (C.GLintptr)(indirect)) +} + +// render primitives from array data +func DrawArrays(mode uint32, first int32, count int32) { + C.glowDrawArrays(gpDrawArrays, (C.GLenum)(mode), (C.GLint)(first), (C.GLsizei)(count)) +} + +// render primitives from array data, taking parameters from memory +func DrawArraysIndirect(mode uint32, indirect unsafe.Pointer) { + C.glowDrawArraysIndirect(gpDrawArraysIndirect, (C.GLenum)(mode), indirect) +} + +// draw multiple instances of a range of elements +func DrawArraysInstanced(mode uint32, first int32, count int32, instancecount int32) { + C.glowDrawArraysInstanced(gpDrawArraysInstanced, (C.GLenum)(mode), (C.GLint)(first), (C.GLsizei)(count), (C.GLsizei)(instancecount)) +} +func DrawArraysInstancedARB(mode uint32, first int32, count int32, primcount int32) { + C.glowDrawArraysInstancedARB(gpDrawArraysInstancedARB, (C.GLenum)(mode), (C.GLint)(first), (C.GLsizei)(count), (C.GLsizei)(primcount)) +} + +// draw multiple instances of a range of elements with offset applied to instanced attributes +func DrawArraysInstancedBaseInstance(mode uint32, first int32, count int32, instancecount int32, baseinstance uint32) { + C.glowDrawArraysInstancedBaseInstance(gpDrawArraysInstancedBaseInstance, (C.GLenum)(mode), (C.GLint)(first), (C.GLsizei)(count), (C.GLsizei)(instancecount), (C.GLuint)(baseinstance)) +} +func DrawArraysInstancedEXT(mode uint32, start int32, count int32, primcount int32) { + C.glowDrawArraysInstancedEXT(gpDrawArraysInstancedEXT, (C.GLenum)(mode), (C.GLint)(start), (C.GLsizei)(count), (C.GLsizei)(primcount)) +} + +// specify which color buffers are to be drawn into +func DrawBuffer(buf uint32) { + C.glowDrawBuffer(gpDrawBuffer, (C.GLenum)(buf)) +} + +// Specifies a list of color buffers to be drawn into +func DrawBuffers(n int32, bufs *uint32) { + C.glowDrawBuffers(gpDrawBuffers, (C.GLsizei)(n), (*C.GLenum)(unsafe.Pointer(bufs))) +} +func DrawCommandsAddressNV(primitiveMode uint32, indirects *uint64, sizes *int32, count uint32) { + C.glowDrawCommandsAddressNV(gpDrawCommandsAddressNV, (C.GLenum)(primitiveMode), (*C.GLuint64)(unsafe.Pointer(indirects)), (*C.GLsizei)(unsafe.Pointer(sizes)), (C.GLuint)(count)) +} +func DrawCommandsNV(primitiveMode uint32, buffer uint32, indirects *int, sizes *int32, count uint32) { + C.glowDrawCommandsNV(gpDrawCommandsNV, (C.GLenum)(primitiveMode), (C.GLuint)(buffer), (*C.GLintptr)(unsafe.Pointer(indirects)), (*C.GLsizei)(unsafe.Pointer(sizes)), (C.GLuint)(count)) +} +func DrawCommandsStatesAddressNV(indirects *uint64, sizes *int32, states *uint32, fbos *uint32, count uint32) { + C.glowDrawCommandsStatesAddressNV(gpDrawCommandsStatesAddressNV, (*C.GLuint64)(unsafe.Pointer(indirects)), (*C.GLsizei)(unsafe.Pointer(sizes)), (*C.GLuint)(unsafe.Pointer(states)), (*C.GLuint)(unsafe.Pointer(fbos)), (C.GLuint)(count)) +} +func DrawCommandsStatesNV(buffer uint32, indirects *int, sizes *int32, states *uint32, fbos *uint32, count uint32) { + C.glowDrawCommandsStatesNV(gpDrawCommandsStatesNV, (C.GLuint)(buffer), (*C.GLintptr)(unsafe.Pointer(indirects)), (*C.GLsizei)(unsafe.Pointer(sizes)), (*C.GLuint)(unsafe.Pointer(states)), (*C.GLuint)(unsafe.Pointer(fbos)), (C.GLuint)(count)) +} + +// render primitives from array data +func DrawElements(mode uint32, count int32, xtype uint32, indices unsafe.Pointer) { + C.glowDrawElements(gpDrawElements, (C.GLenum)(mode), (C.GLsizei)(count), (C.GLenum)(xtype), indices) +} + +// render primitives from array data with a per-element offset +func DrawElementsBaseVertex(mode uint32, count int32, xtype uint32, indices unsafe.Pointer, basevertex int32) { + C.glowDrawElementsBaseVertex(gpDrawElementsBaseVertex, (C.GLenum)(mode), (C.GLsizei)(count), (C.GLenum)(xtype), indices, (C.GLint)(basevertex)) +} + +// render indexed primitives from array data, taking parameters from memory +func DrawElementsIndirect(mode uint32, xtype uint32, indirect unsafe.Pointer) { + C.glowDrawElementsIndirect(gpDrawElementsIndirect, (C.GLenum)(mode), (C.GLenum)(xtype), indirect) +} + +// draw multiple instances of a set of elements +func DrawElementsInstanced(mode uint32, count int32, xtype uint32, indices unsafe.Pointer, instancecount int32) { + C.glowDrawElementsInstanced(gpDrawElementsInstanced, (C.GLenum)(mode), (C.GLsizei)(count), (C.GLenum)(xtype), indices, (C.GLsizei)(instancecount)) +} +func DrawElementsInstancedARB(mode uint32, count int32, xtype uint32, indices unsafe.Pointer, primcount int32) { + C.glowDrawElementsInstancedARB(gpDrawElementsInstancedARB, (C.GLenum)(mode), (C.GLsizei)(count), (C.GLenum)(xtype), indices, (C.GLsizei)(primcount)) +} + +// draw multiple instances of a set of elements with offset applied to instanced attributes +func DrawElementsInstancedBaseInstance(mode uint32, count int32, xtype uint32, indices unsafe.Pointer, instancecount int32, baseinstance uint32) { + C.glowDrawElementsInstancedBaseInstance(gpDrawElementsInstancedBaseInstance, (C.GLenum)(mode), (C.GLsizei)(count), (C.GLenum)(xtype), indices, (C.GLsizei)(instancecount), (C.GLuint)(baseinstance)) +} + +// render multiple instances of a set of primitives from array data with a per-element offset +func DrawElementsInstancedBaseVertex(mode uint32, count int32, xtype uint32, indices unsafe.Pointer, instancecount int32, basevertex int32) { + C.glowDrawElementsInstancedBaseVertex(gpDrawElementsInstancedBaseVertex, (C.GLenum)(mode), (C.GLsizei)(count), (C.GLenum)(xtype), indices, (C.GLsizei)(instancecount), (C.GLint)(basevertex)) +} + +// render multiple instances of a set of primitives from array data with a per-element offset +func DrawElementsInstancedBaseVertexBaseInstance(mode uint32, count int32, xtype uint32, indices unsafe.Pointer, instancecount int32, basevertex int32, baseinstance uint32) { + C.glowDrawElementsInstancedBaseVertexBaseInstance(gpDrawElementsInstancedBaseVertexBaseInstance, (C.GLenum)(mode), (C.GLsizei)(count), (C.GLenum)(xtype), indices, (C.GLsizei)(instancecount), (C.GLint)(basevertex), (C.GLuint)(baseinstance)) +} +func DrawElementsInstancedEXT(mode uint32, count int32, xtype uint32, indices unsafe.Pointer, primcount int32) { + C.glowDrawElementsInstancedEXT(gpDrawElementsInstancedEXT, (C.GLenum)(mode), (C.GLsizei)(count), (C.GLenum)(xtype), indices, (C.GLsizei)(primcount)) +} + +// render primitives from array data +func DrawRangeElements(mode uint32, start uint32, end uint32, count int32, xtype uint32, indices unsafe.Pointer) { + C.glowDrawRangeElements(gpDrawRangeElements, (C.GLenum)(mode), (C.GLuint)(start), (C.GLuint)(end), (C.GLsizei)(count), (C.GLenum)(xtype), indices) +} + +// render primitives from array data with a per-element offset +func DrawRangeElementsBaseVertex(mode uint32, start uint32, end uint32, count int32, xtype uint32, indices unsafe.Pointer, basevertex int32) { + C.glowDrawRangeElementsBaseVertex(gpDrawRangeElementsBaseVertex, (C.GLenum)(mode), (C.GLuint)(start), (C.GLuint)(end), (C.GLsizei)(count), (C.GLenum)(xtype), indices, (C.GLint)(basevertex)) +} + +// render primitives using a count derived from a transform feedback object +func DrawTransformFeedback(mode uint32, id uint32) { + C.glowDrawTransformFeedback(gpDrawTransformFeedback, (C.GLenum)(mode), (C.GLuint)(id)) +} + +// render multiple instances of primitives using a count derived from a transform feedback object +func DrawTransformFeedbackInstanced(mode uint32, id uint32, instancecount int32) { + C.glowDrawTransformFeedbackInstanced(gpDrawTransformFeedbackInstanced, (C.GLenum)(mode), (C.GLuint)(id), (C.GLsizei)(instancecount)) +} + +// render primitives using a count derived from a specifed stream of a transform feedback object +func DrawTransformFeedbackStream(mode uint32, id uint32, stream uint32) { + C.glowDrawTransformFeedbackStream(gpDrawTransformFeedbackStream, (C.GLenum)(mode), (C.GLuint)(id), (C.GLuint)(stream)) +} + +// render multiple instances of primitives using a count derived from a specifed stream of a transform feedback object +func DrawTransformFeedbackStreamInstanced(mode uint32, id uint32, stream uint32, instancecount int32) { + C.glowDrawTransformFeedbackStreamInstanced(gpDrawTransformFeedbackStreamInstanced, (C.GLenum)(mode), (C.GLuint)(id), (C.GLuint)(stream), (C.GLsizei)(instancecount)) +} +func DrawVkImageNV(vkImage uint64, sampler uint32, x0 float32, y0 float32, x1 float32, y1 float32, z float32, s0 float32, t0 float32, s1 float32, t1 float32) { + C.glowDrawVkImageNV(gpDrawVkImageNV, (C.GLuint64)(vkImage), (C.GLuint)(sampler), (C.GLfloat)(x0), (C.GLfloat)(y0), (C.GLfloat)(x1), (C.GLfloat)(y1), (C.GLfloat)(z), (C.GLfloat)(s0), (C.GLfloat)(t0), (C.GLfloat)(s1), (C.GLfloat)(t1)) +} +func EGLImageTargetTexStorageEXT(target uint32, image C.GLeglImageOES, attrib_list *int32) { + C.glowEGLImageTargetTexStorageEXT(gpEGLImageTargetTexStorageEXT, (C.GLenum)(target), (C.GLeglImageOES)(image), (*C.GLint)(unsafe.Pointer(attrib_list))) +} +func EGLImageTargetTextureStorageEXT(texture uint32, image C.GLeglImageOES, attrib_list *int32) { + C.glowEGLImageTargetTextureStorageEXT(gpEGLImageTargetTextureStorageEXT, (C.GLuint)(texture), (C.GLeglImageOES)(image), (*C.GLint)(unsafe.Pointer(attrib_list))) +} +func EdgeFlagFormatNV(stride int32) { + C.glowEdgeFlagFormatNV(gpEdgeFlagFormatNV, (C.GLsizei)(stride)) +} + +// enable or disable server-side GL capabilities +func Enable(cap uint32) { + C.glowEnable(gpEnable, (C.GLenum)(cap)) +} +func EnableClientStateIndexedEXT(array uint32, index uint32) { + C.glowEnableClientStateIndexedEXT(gpEnableClientStateIndexedEXT, (C.GLenum)(array), (C.GLuint)(index)) +} +func EnableClientStateiEXT(array uint32, index uint32) { + C.glowEnableClientStateiEXT(gpEnableClientStateiEXT, (C.GLenum)(array), (C.GLuint)(index)) +} +func EnableIndexedEXT(target uint32, index uint32) { + C.glowEnableIndexedEXT(gpEnableIndexedEXT, (C.GLenum)(target), (C.GLuint)(index)) +} + +// Enable or disable a generic vertex attribute array +func EnableVertexArrayAttrib(vaobj uint32, index uint32) { + C.glowEnableVertexArrayAttrib(gpEnableVertexArrayAttrib, (C.GLuint)(vaobj), (C.GLuint)(index)) +} +func EnableVertexArrayAttribEXT(vaobj uint32, index uint32) { + C.glowEnableVertexArrayAttribEXT(gpEnableVertexArrayAttribEXT, (C.GLuint)(vaobj), (C.GLuint)(index)) +} +func EnableVertexArrayEXT(vaobj uint32, array uint32) { + C.glowEnableVertexArrayEXT(gpEnableVertexArrayEXT, (C.GLuint)(vaobj), (C.GLenum)(array)) +} + +// Enable or disable a generic vertex attribute array +func EnableVertexAttribArray(index uint32) { + C.glowEnableVertexAttribArray(gpEnableVertexAttribArray, (C.GLuint)(index)) +} +func Enablei(target uint32, index uint32) { + C.glowEnablei(gpEnablei, (C.GLenum)(target), (C.GLuint)(index)) +} +func EndConditionalRender() { + C.glowEndConditionalRender(gpEndConditionalRender) +} +func EndConditionalRenderNV() { + C.glowEndConditionalRenderNV(gpEndConditionalRenderNV) +} +func EndPerfMonitorAMD(monitor uint32) { + C.glowEndPerfMonitorAMD(gpEndPerfMonitorAMD, (C.GLuint)(monitor)) +} +func EndPerfQueryINTEL(queryHandle uint32) { + C.glowEndPerfQueryINTEL(gpEndPerfQueryINTEL, (C.GLuint)(queryHandle)) +} +func EndQuery(target uint32) { + C.glowEndQuery(gpEndQuery, (C.GLenum)(target)) +} +func EndQueryIndexed(target uint32, index uint32) { + C.glowEndQueryIndexed(gpEndQueryIndexed, (C.GLenum)(target), (C.GLuint)(index)) +} +func EndTransformFeedback() { + C.glowEndTransformFeedback(gpEndTransformFeedback) +} +func EvaluateDepthValuesARB() { + C.glowEvaluateDepthValuesARB(gpEvaluateDepthValuesARB) +} + +// create a new sync object and insert it into the GL command stream +func FenceSync(condition uint32, flags uint32) uintptr { + ret := C.glowFenceSync(gpFenceSync, (C.GLenum)(condition), (C.GLbitfield)(flags)) + return (uintptr)(ret) +} + +// block until all GL execution is complete +func Finish() { + C.glowFinish(gpFinish) +} + +// force execution of GL commands in finite time +func Flush() { + C.glowFlush(gpFlush) +} + +// indicate modifications to a range of a mapped buffer +func FlushMappedBufferRange(target uint32, offset int, length int) { + C.glowFlushMappedBufferRange(gpFlushMappedBufferRange, (C.GLenum)(target), (C.GLintptr)(offset), (C.GLsizeiptr)(length)) +} + +// indicate modifications to a range of a mapped buffer +func FlushMappedNamedBufferRange(buffer uint32, offset int, length int) { + C.glowFlushMappedNamedBufferRange(gpFlushMappedNamedBufferRange, (C.GLuint)(buffer), (C.GLintptr)(offset), (C.GLsizeiptr)(length)) +} +func FlushMappedNamedBufferRangeEXT(buffer uint32, offset int, length int) { + C.glowFlushMappedNamedBufferRangeEXT(gpFlushMappedNamedBufferRangeEXT, (C.GLuint)(buffer), (C.GLintptr)(offset), (C.GLsizeiptr)(length)) +} +func FogCoordFormatNV(xtype uint32, stride int32) { + C.glowFogCoordFormatNV(gpFogCoordFormatNV, (C.GLenum)(xtype), (C.GLsizei)(stride)) +} +func FragmentCoverageColorNV(color uint32) { + C.glowFragmentCoverageColorNV(gpFragmentCoverageColorNV, (C.GLuint)(color)) +} +func FramebufferDrawBufferEXT(framebuffer uint32, mode uint32) { + C.glowFramebufferDrawBufferEXT(gpFramebufferDrawBufferEXT, (C.GLuint)(framebuffer), (C.GLenum)(mode)) +} +func FramebufferDrawBuffersEXT(framebuffer uint32, n int32, bufs *uint32) { + C.glowFramebufferDrawBuffersEXT(gpFramebufferDrawBuffersEXT, (C.GLuint)(framebuffer), (C.GLsizei)(n), (*C.GLenum)(unsafe.Pointer(bufs))) +} +func FramebufferFetchBarrierEXT() { + C.glowFramebufferFetchBarrierEXT(gpFramebufferFetchBarrierEXT) +} + +// set a named parameter of a framebuffer object +func FramebufferParameteri(target uint32, pname uint32, param int32) { + C.glowFramebufferParameteri(gpFramebufferParameteri, (C.GLenum)(target), (C.GLenum)(pname), (C.GLint)(param)) +} +func FramebufferReadBufferEXT(framebuffer uint32, mode uint32) { + C.glowFramebufferReadBufferEXT(gpFramebufferReadBufferEXT, (C.GLuint)(framebuffer), (C.GLenum)(mode)) +} + +// attach a renderbuffer as a logical buffer of a framebuffer object +func FramebufferRenderbuffer(target uint32, attachment uint32, renderbuffertarget uint32, renderbuffer uint32) { + C.glowFramebufferRenderbuffer(gpFramebufferRenderbuffer, (C.GLenum)(target), (C.GLenum)(attachment), (C.GLenum)(renderbuffertarget), (C.GLuint)(renderbuffer)) +} +func FramebufferSampleLocationsfvARB(target uint32, start uint32, count int32, v *float32) { + C.glowFramebufferSampleLocationsfvARB(gpFramebufferSampleLocationsfvARB, (C.GLenum)(target), (C.GLuint)(start), (C.GLsizei)(count), (*C.GLfloat)(unsafe.Pointer(v))) +} +func FramebufferSampleLocationsfvNV(target uint32, start uint32, count int32, v *float32) { + C.glowFramebufferSampleLocationsfvNV(gpFramebufferSampleLocationsfvNV, (C.GLenum)(target), (C.GLuint)(start), (C.GLsizei)(count), (*C.GLfloat)(unsafe.Pointer(v))) +} + +// attach a level of a texture object as a logical buffer of a framebuffer object +func FramebufferTexture(target uint32, attachment uint32, texture uint32, level int32) { + C.glowFramebufferTexture(gpFramebufferTexture, (C.GLenum)(target), (C.GLenum)(attachment), (C.GLuint)(texture), (C.GLint)(level)) +} +func FramebufferTexture1D(target uint32, attachment uint32, textarget uint32, texture uint32, level int32) { + C.glowFramebufferTexture1D(gpFramebufferTexture1D, (C.GLenum)(target), (C.GLenum)(attachment), (C.GLenum)(textarget), (C.GLuint)(texture), (C.GLint)(level)) +} + +// attach a level of a texture object as a logical buffer to the currently bound framebuffer object +func FramebufferTexture2D(target uint32, attachment uint32, textarget uint32, texture uint32, level int32) { + C.glowFramebufferTexture2D(gpFramebufferTexture2D, (C.GLenum)(target), (C.GLenum)(attachment), (C.GLenum)(textarget), (C.GLuint)(texture), (C.GLint)(level)) +} +func FramebufferTexture3D(target uint32, attachment uint32, textarget uint32, texture uint32, level int32, zoffset int32) { + C.glowFramebufferTexture3D(gpFramebufferTexture3D, (C.GLenum)(target), (C.GLenum)(attachment), (C.GLenum)(textarget), (C.GLuint)(texture), (C.GLint)(level), (C.GLint)(zoffset)) +} +func FramebufferTextureARB(target uint32, attachment uint32, texture uint32, level int32) { + C.glowFramebufferTextureARB(gpFramebufferTextureARB, (C.GLenum)(target), (C.GLenum)(attachment), (C.GLuint)(texture), (C.GLint)(level)) +} +func FramebufferTextureFaceARB(target uint32, attachment uint32, texture uint32, level int32, face uint32) { + C.glowFramebufferTextureFaceARB(gpFramebufferTextureFaceARB, (C.GLenum)(target), (C.GLenum)(attachment), (C.GLuint)(texture), (C.GLint)(level), (C.GLenum)(face)) +} + +// attach a single layer of a texture object as a logical buffer of a framebuffer object +func FramebufferTextureLayer(target uint32, attachment uint32, texture uint32, level int32, layer int32) { + C.glowFramebufferTextureLayer(gpFramebufferTextureLayer, (C.GLenum)(target), (C.GLenum)(attachment), (C.GLuint)(texture), (C.GLint)(level), (C.GLint)(layer)) +} +func FramebufferTextureLayerARB(target uint32, attachment uint32, texture uint32, level int32, layer int32) { + C.glowFramebufferTextureLayerARB(gpFramebufferTextureLayerARB, (C.GLenum)(target), (C.GLenum)(attachment), (C.GLuint)(texture), (C.GLint)(level), (C.GLint)(layer)) +} +func FramebufferTextureMultiviewOVR(target uint32, attachment uint32, texture uint32, level int32, baseViewIndex int32, numViews int32) { + C.glowFramebufferTextureMultiviewOVR(gpFramebufferTextureMultiviewOVR, (C.GLenum)(target), (C.GLenum)(attachment), (C.GLuint)(texture), (C.GLint)(level), (C.GLint)(baseViewIndex), (C.GLsizei)(numViews)) +} + +// define front- and back-facing polygons +func FrontFace(mode uint32) { + C.glowFrontFace(gpFrontFace, (C.GLenum)(mode)) +} + +// generate buffer object names +func GenBuffers(n int32, buffers *uint32) { + C.glowGenBuffers(gpGenBuffers, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(buffers))) +} + +// generate framebuffer object names +func GenFramebuffers(n int32, framebuffers *uint32) { + C.glowGenFramebuffers(gpGenFramebuffers, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(framebuffers))) +} +func GenPathsNV(xrange int32) uint32 { + ret := C.glowGenPathsNV(gpGenPathsNV, (C.GLsizei)(xrange)) + return (uint32)(ret) +} +func GenPerfMonitorsAMD(n int32, monitors *uint32) { + C.glowGenPerfMonitorsAMD(gpGenPerfMonitorsAMD, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(monitors))) +} + +// reserve program pipeline object names +func GenProgramPipelines(n int32, pipelines *uint32) { + C.glowGenProgramPipelines(gpGenProgramPipelines, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(pipelines))) +} +func GenProgramPipelinesEXT(n int32, pipelines *uint32) { + C.glowGenProgramPipelinesEXT(gpGenProgramPipelinesEXT, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(pipelines))) +} + +// generate query object names +func GenQueries(n int32, ids *uint32) { + C.glowGenQueries(gpGenQueries, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(ids))) +} + +// generate renderbuffer object names +func GenRenderbuffers(n int32, renderbuffers *uint32) { + C.glowGenRenderbuffers(gpGenRenderbuffers, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(renderbuffers))) +} + +// generate sampler object names +func GenSamplers(count int32, samplers *uint32) { + C.glowGenSamplers(gpGenSamplers, (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(samplers))) +} + +// generate texture names +func GenTextures(n int32, textures *uint32) { + C.glowGenTextures(gpGenTextures, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(textures))) +} + +// reserve transform feedback object names +func GenTransformFeedbacks(n int32, ids *uint32) { + C.glowGenTransformFeedbacks(gpGenTransformFeedbacks, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(ids))) +} + +// generate vertex array object names +func GenVertexArrays(n int32, arrays *uint32) { + C.glowGenVertexArrays(gpGenVertexArrays, (C.GLsizei)(n), (*C.GLuint)(unsafe.Pointer(arrays))) +} + +// generate mipmaps for a specified texture object +func GenerateMipmap(target uint32) { + C.glowGenerateMipmap(gpGenerateMipmap, (C.GLenum)(target)) +} +func GenerateMultiTexMipmapEXT(texunit uint32, target uint32) { + C.glowGenerateMultiTexMipmapEXT(gpGenerateMultiTexMipmapEXT, (C.GLenum)(texunit), (C.GLenum)(target)) +} + +// generate mipmaps for a specified texture object +func GenerateTextureMipmap(texture uint32) { + C.glowGenerateTextureMipmap(gpGenerateTextureMipmap, (C.GLuint)(texture)) +} +func GenerateTextureMipmapEXT(texture uint32, target uint32) { + C.glowGenerateTextureMipmapEXT(gpGenerateTextureMipmapEXT, (C.GLuint)(texture), (C.GLenum)(target)) +} + +// retrieve information about the set of active atomic counter buffers for a program +func GetActiveAtomicCounterBufferiv(program uint32, bufferIndex uint32, pname uint32, params *int32) { + C.glowGetActiveAtomicCounterBufferiv(gpGetActiveAtomicCounterBufferiv, (C.GLuint)(program), (C.GLuint)(bufferIndex), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} + +// Returns information about an active attribute variable for the specified program object +func GetActiveAttrib(program uint32, index uint32, bufSize int32, length *int32, size *int32, xtype *uint32, name *uint8) { + C.glowGetActiveAttrib(gpGetActiveAttrib, (C.GLuint)(program), (C.GLuint)(index), (C.GLsizei)(bufSize), (*C.GLsizei)(unsafe.Pointer(length)), (*C.GLint)(unsafe.Pointer(size)), (*C.GLenum)(unsafe.Pointer(xtype)), (*C.GLchar)(unsafe.Pointer(name))) +} + +// query the name of an active shader subroutine +func GetActiveSubroutineName(program uint32, shadertype uint32, index uint32, bufsize int32, length *int32, name *uint8) { + C.glowGetActiveSubroutineName(gpGetActiveSubroutineName, (C.GLuint)(program), (C.GLenum)(shadertype), (C.GLuint)(index), (C.GLsizei)(bufsize), (*C.GLsizei)(unsafe.Pointer(length)), (*C.GLchar)(unsafe.Pointer(name))) +} + +// query the name of an active shader subroutine uniform +func GetActiveSubroutineUniformName(program uint32, shadertype uint32, index uint32, bufsize int32, length *int32, name *uint8) { + C.glowGetActiveSubroutineUniformName(gpGetActiveSubroutineUniformName, (C.GLuint)(program), (C.GLenum)(shadertype), (C.GLuint)(index), (C.GLsizei)(bufsize), (*C.GLsizei)(unsafe.Pointer(length)), (*C.GLchar)(unsafe.Pointer(name))) +} +func GetActiveSubroutineUniformiv(program uint32, shadertype uint32, index uint32, pname uint32, values *int32) { + C.glowGetActiveSubroutineUniformiv(gpGetActiveSubroutineUniformiv, (C.GLuint)(program), (C.GLenum)(shadertype), (C.GLuint)(index), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(values))) +} + +// Returns information about an active uniform variable for the specified program object +func GetActiveUniform(program uint32, index uint32, bufSize int32, length *int32, size *int32, xtype *uint32, name *uint8) { + C.glowGetActiveUniform(gpGetActiveUniform, (C.GLuint)(program), (C.GLuint)(index), (C.GLsizei)(bufSize), (*C.GLsizei)(unsafe.Pointer(length)), (*C.GLint)(unsafe.Pointer(size)), (*C.GLenum)(unsafe.Pointer(xtype)), (*C.GLchar)(unsafe.Pointer(name))) +} + +// retrieve the name of an active uniform block +func GetActiveUniformBlockName(program uint32, uniformBlockIndex uint32, bufSize int32, length *int32, uniformBlockName *uint8) { + C.glowGetActiveUniformBlockName(gpGetActiveUniformBlockName, (C.GLuint)(program), (C.GLuint)(uniformBlockIndex), (C.GLsizei)(bufSize), (*C.GLsizei)(unsafe.Pointer(length)), (*C.GLchar)(unsafe.Pointer(uniformBlockName))) +} + +// query information about an active uniform block +func GetActiveUniformBlockiv(program uint32, uniformBlockIndex uint32, pname uint32, params *int32) { + C.glowGetActiveUniformBlockiv(gpGetActiveUniformBlockiv, (C.GLuint)(program), (C.GLuint)(uniformBlockIndex), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} + +// query the name of an active uniform +func GetActiveUniformName(program uint32, uniformIndex uint32, bufSize int32, length *int32, uniformName *uint8) { + C.glowGetActiveUniformName(gpGetActiveUniformName, (C.GLuint)(program), (C.GLuint)(uniformIndex), (C.GLsizei)(bufSize), (*C.GLsizei)(unsafe.Pointer(length)), (*C.GLchar)(unsafe.Pointer(uniformName))) +} + +// Returns information about several active uniform variables for the specified program object +func GetActiveUniformsiv(program uint32, uniformCount int32, uniformIndices *uint32, pname uint32, params *int32) { + C.glowGetActiveUniformsiv(gpGetActiveUniformsiv, (C.GLuint)(program), (C.GLsizei)(uniformCount), (*C.GLuint)(unsafe.Pointer(uniformIndices)), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} + +// Returns the handles of the shader objects attached to a program object +func GetAttachedShaders(program uint32, maxCount int32, count *int32, shaders *uint32) { + C.glowGetAttachedShaders(gpGetAttachedShaders, (C.GLuint)(program), (C.GLsizei)(maxCount), (*C.GLsizei)(unsafe.Pointer(count)), (*C.GLuint)(unsafe.Pointer(shaders))) +} + +// Returns the location of an attribute variable +func GetAttribLocation(program uint32, name *uint8) int32 { + ret := C.glowGetAttribLocation(gpGetAttribLocation, (C.GLuint)(program), (*C.GLchar)(unsafe.Pointer(name))) + return (int32)(ret) +} +func GetBooleanIndexedvEXT(target uint32, index uint32, data *bool) { + C.glowGetBooleanIndexedvEXT(gpGetBooleanIndexedvEXT, (C.GLenum)(target), (C.GLuint)(index), (*C.GLboolean)(unsafe.Pointer(data))) +} +func GetBooleani_v(target uint32, index uint32, data *bool) { + C.glowGetBooleani_v(gpGetBooleani_v, (C.GLenum)(target), (C.GLuint)(index), (*C.GLboolean)(unsafe.Pointer(data))) +} +func GetBooleanv(pname uint32, data *bool) { + C.glowGetBooleanv(gpGetBooleanv, (C.GLenum)(pname), (*C.GLboolean)(unsafe.Pointer(data))) +} + +// return parameters of a buffer object +func GetBufferParameteri64v(target uint32, pname uint32, params *int64) { + C.glowGetBufferParameteri64v(gpGetBufferParameteri64v, (C.GLenum)(target), (C.GLenum)(pname), (*C.GLint64)(unsafe.Pointer(params))) +} + +// return parameters of a buffer object +func GetBufferParameteriv(target uint32, pname uint32, params *int32) { + C.glowGetBufferParameteriv(gpGetBufferParameteriv, (C.GLenum)(target), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetBufferParameterui64vNV(target uint32, pname uint32, params *uint64) { + C.glowGetBufferParameterui64vNV(gpGetBufferParameterui64vNV, (C.GLenum)(target), (C.GLenum)(pname), (*C.GLuint64EXT)(unsafe.Pointer(params))) +} + +// return the pointer to a mapped buffer object's data store +func GetBufferPointerv(target uint32, pname uint32, params *unsafe.Pointer) { + C.glowGetBufferPointerv(gpGetBufferPointerv, (C.GLenum)(target), (C.GLenum)(pname), params) +} + +// returns a subset of a buffer object's data store +func GetBufferSubData(target uint32, offset int, size int, data unsafe.Pointer) { + C.glowGetBufferSubData(gpGetBufferSubData, (C.GLenum)(target), (C.GLintptr)(offset), (C.GLsizeiptr)(size), data) +} +func GetCommandHeaderNV(tokenID uint32, size uint32) uint32 { + ret := C.glowGetCommandHeaderNV(gpGetCommandHeaderNV, (C.GLenum)(tokenID), (C.GLuint)(size)) + return (uint32)(ret) +} +func GetCompressedMultiTexImageEXT(texunit uint32, target uint32, lod int32, img unsafe.Pointer) { + C.glowGetCompressedMultiTexImageEXT(gpGetCompressedMultiTexImageEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLint)(lod), img) +} + +// return a compressed texture image +func GetCompressedTexImage(target uint32, level int32, img unsafe.Pointer) { + C.glowGetCompressedTexImage(gpGetCompressedTexImage, (C.GLenum)(target), (C.GLint)(level), img) +} + +// return a compressed texture image +func GetCompressedTextureImage(texture uint32, level int32, bufSize int32, pixels unsafe.Pointer) { + C.glowGetCompressedTextureImage(gpGetCompressedTextureImage, (C.GLuint)(texture), (C.GLint)(level), (C.GLsizei)(bufSize), pixels) +} +func GetCompressedTextureImageEXT(texture uint32, target uint32, lod int32, img unsafe.Pointer) { + C.glowGetCompressedTextureImageEXT(gpGetCompressedTextureImageEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLint)(lod), img) +} + +// retrieve a sub-region of a compressed texture image from a compressed texture object +func GetCompressedTextureSubImage(texture uint32, level int32, xoffset int32, yoffset int32, zoffset int32, width int32, height int32, depth int32, bufSize int32, pixels unsafe.Pointer) { + C.glowGetCompressedTextureSubImage(gpGetCompressedTextureSubImage, (C.GLuint)(texture), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLint)(zoffset), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth), (C.GLsizei)(bufSize), pixels) +} +func GetCoverageModulationTableNV(bufsize int32, v *float32) { + C.glowGetCoverageModulationTableNV(gpGetCoverageModulationTableNV, (C.GLsizei)(bufsize), (*C.GLfloat)(unsafe.Pointer(v))) +} + +// retrieve messages from the debug message log +func GetDebugMessageLog(count uint32, bufSize int32, sources *uint32, types *uint32, ids *uint32, severities *uint32, lengths *int32, messageLog *uint8) uint32 { + ret := C.glowGetDebugMessageLog(gpGetDebugMessageLog, (C.GLuint)(count), (C.GLsizei)(bufSize), (*C.GLenum)(unsafe.Pointer(sources)), (*C.GLenum)(unsafe.Pointer(types)), (*C.GLuint)(unsafe.Pointer(ids)), (*C.GLenum)(unsafe.Pointer(severities)), (*C.GLsizei)(unsafe.Pointer(lengths)), (*C.GLchar)(unsafe.Pointer(messageLog))) + return (uint32)(ret) +} +func GetDebugMessageLogARB(count uint32, bufSize int32, sources *uint32, types *uint32, ids *uint32, severities *uint32, lengths *int32, messageLog *uint8) uint32 { + ret := C.glowGetDebugMessageLogARB(gpGetDebugMessageLogARB, (C.GLuint)(count), (C.GLsizei)(bufSize), (*C.GLenum)(unsafe.Pointer(sources)), (*C.GLenum)(unsafe.Pointer(types)), (*C.GLuint)(unsafe.Pointer(ids)), (*C.GLenum)(unsafe.Pointer(severities)), (*C.GLsizei)(unsafe.Pointer(lengths)), (*C.GLchar)(unsafe.Pointer(messageLog))) + return (uint32)(ret) +} +func GetDebugMessageLogKHR(count uint32, bufSize int32, sources *uint32, types *uint32, ids *uint32, severities *uint32, lengths *int32, messageLog *uint8) uint32 { + ret := C.glowGetDebugMessageLogKHR(gpGetDebugMessageLogKHR, (C.GLuint)(count), (C.GLsizei)(bufSize), (*C.GLenum)(unsafe.Pointer(sources)), (*C.GLenum)(unsafe.Pointer(types)), (*C.GLuint)(unsafe.Pointer(ids)), (*C.GLenum)(unsafe.Pointer(severities)), (*C.GLsizei)(unsafe.Pointer(lengths)), (*C.GLchar)(unsafe.Pointer(messageLog))) + return (uint32)(ret) +} +func GetDoubleIndexedvEXT(target uint32, index uint32, data *float64) { + C.glowGetDoubleIndexedvEXT(gpGetDoubleIndexedvEXT, (C.GLenum)(target), (C.GLuint)(index), (*C.GLdouble)(unsafe.Pointer(data))) +} +func GetDoublei_v(target uint32, index uint32, data *float64) { + C.glowGetDoublei_v(gpGetDoublei_v, (C.GLenum)(target), (C.GLuint)(index), (*C.GLdouble)(unsafe.Pointer(data))) +} +func GetDoublei_vEXT(pname uint32, index uint32, params *float64) { + C.glowGetDoublei_vEXT(gpGetDoublei_vEXT, (C.GLenum)(pname), (C.GLuint)(index), (*C.GLdouble)(unsafe.Pointer(params))) +} +func GetDoublev(pname uint32, data *float64) { + C.glowGetDoublev(gpGetDoublev, (C.GLenum)(pname), (*C.GLdouble)(unsafe.Pointer(data))) +} + +// return error information +func GetError() uint32 { + ret := C.glowGetError(gpGetError) + return (uint32)(ret) +} +func GetFirstPerfQueryIdINTEL(queryId *uint32) { + C.glowGetFirstPerfQueryIdINTEL(gpGetFirstPerfQueryIdINTEL, (*C.GLuint)(unsafe.Pointer(queryId))) +} +func GetFloatIndexedvEXT(target uint32, index uint32, data *float32) { + C.glowGetFloatIndexedvEXT(gpGetFloatIndexedvEXT, (C.GLenum)(target), (C.GLuint)(index), (*C.GLfloat)(unsafe.Pointer(data))) +} +func GetFloati_v(target uint32, index uint32, data *float32) { + C.glowGetFloati_v(gpGetFloati_v, (C.GLenum)(target), (C.GLuint)(index), (*C.GLfloat)(unsafe.Pointer(data))) +} +func GetFloati_vEXT(pname uint32, index uint32, params *float32) { + C.glowGetFloati_vEXT(gpGetFloati_vEXT, (C.GLenum)(pname), (C.GLuint)(index), (*C.GLfloat)(unsafe.Pointer(params))) +} +func GetFloatv(pname uint32, data *float32) { + C.glowGetFloatv(gpGetFloatv, (C.GLenum)(pname), (*C.GLfloat)(unsafe.Pointer(data))) +} + +// query the bindings of color indices to user-defined varying out variables +func GetFragDataIndex(program uint32, name *uint8) int32 { + ret := C.glowGetFragDataIndex(gpGetFragDataIndex, (C.GLuint)(program), (*C.GLchar)(unsafe.Pointer(name))) + return (int32)(ret) +} + +// query the bindings of color numbers to user-defined varying out variables +func GetFragDataLocation(program uint32, name *uint8) int32 { + ret := C.glowGetFragDataLocation(gpGetFragDataLocation, (C.GLuint)(program), (*C.GLchar)(unsafe.Pointer(name))) + return (int32)(ret) +} + +// retrieve information about attachments of a bound framebuffer object +func GetFramebufferAttachmentParameteriv(target uint32, attachment uint32, pname uint32, params *int32) { + C.glowGetFramebufferAttachmentParameteriv(gpGetFramebufferAttachmentParameteriv, (C.GLenum)(target), (C.GLenum)(attachment), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} + +// retrieve a named parameter from a framebuffer +func GetFramebufferParameteriv(target uint32, pname uint32, params *int32) { + C.glowGetFramebufferParameteriv(gpGetFramebufferParameteriv, (C.GLenum)(target), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetFramebufferParameterivEXT(framebuffer uint32, pname uint32, params *int32) { + C.glowGetFramebufferParameterivEXT(gpGetFramebufferParameterivEXT, (C.GLuint)(framebuffer), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} + +// check if the rendering context has not been lost due to software or hardware issues +func GetGraphicsResetStatus() uint32 { + ret := C.glowGetGraphicsResetStatus(gpGetGraphicsResetStatus) + return (uint32)(ret) +} +func GetGraphicsResetStatusARB() uint32 { + ret := C.glowGetGraphicsResetStatusARB(gpGetGraphicsResetStatusARB) + return (uint32)(ret) +} +func GetGraphicsResetStatusKHR() uint32 { + ret := C.glowGetGraphicsResetStatusKHR(gpGetGraphicsResetStatusKHR) + return (uint32)(ret) +} +func GetImageHandleARB(texture uint32, level int32, layered bool, layer int32, format uint32) uint64 { + ret := C.glowGetImageHandleARB(gpGetImageHandleARB, (C.GLuint)(texture), (C.GLint)(level), (C.GLboolean)(boolToInt(layered)), (C.GLint)(layer), (C.GLenum)(format)) + return (uint64)(ret) +} +func GetImageHandleNV(texture uint32, level int32, layered bool, layer int32, format uint32) uint64 { + ret := C.glowGetImageHandleNV(gpGetImageHandleNV, (C.GLuint)(texture), (C.GLint)(level), (C.GLboolean)(boolToInt(layered)), (C.GLint)(layer), (C.GLenum)(format)) + return (uint64)(ret) +} +func GetInteger64i_v(target uint32, index uint32, data *int64) { + C.glowGetInteger64i_v(gpGetInteger64i_v, (C.GLenum)(target), (C.GLuint)(index), (*C.GLint64)(unsafe.Pointer(data))) +} +func GetInteger64v(pname uint32, data *int64) { + C.glowGetInteger64v(gpGetInteger64v, (C.GLenum)(pname), (*C.GLint64)(unsafe.Pointer(data))) +} +func GetIntegerIndexedvEXT(target uint32, index uint32, data *int32) { + C.glowGetIntegerIndexedvEXT(gpGetIntegerIndexedvEXT, (C.GLenum)(target), (C.GLuint)(index), (*C.GLint)(unsafe.Pointer(data))) +} +func GetIntegeri_v(target uint32, index uint32, data *int32) { + C.glowGetIntegeri_v(gpGetIntegeri_v, (C.GLenum)(target), (C.GLuint)(index), (*C.GLint)(unsafe.Pointer(data))) +} +func GetIntegerui64i_vNV(value uint32, index uint32, result *uint64) { + C.glowGetIntegerui64i_vNV(gpGetIntegerui64i_vNV, (C.GLenum)(value), (C.GLuint)(index), (*C.GLuint64EXT)(unsafe.Pointer(result))) +} +func GetIntegerui64vNV(value uint32, result *uint64) { + C.glowGetIntegerui64vNV(gpGetIntegerui64vNV, (C.GLenum)(value), (*C.GLuint64EXT)(unsafe.Pointer(result))) +} +func GetIntegerv(pname uint32, data *int32) { + C.glowGetIntegerv(gpGetIntegerv, (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(data))) +} +func GetInternalformatSampleivNV(target uint32, internalformat uint32, samples int32, pname uint32, bufSize int32, params *int32) { + C.glowGetInternalformatSampleivNV(gpGetInternalformatSampleivNV, (C.GLenum)(target), (C.GLenum)(internalformat), (C.GLsizei)(samples), (C.GLenum)(pname), (C.GLsizei)(bufSize), (*C.GLint)(unsafe.Pointer(params))) +} +func GetInternalformati64v(target uint32, internalformat uint32, pname uint32, bufSize int32, params *int64) { + C.glowGetInternalformati64v(gpGetInternalformati64v, (C.GLenum)(target), (C.GLenum)(internalformat), (C.GLenum)(pname), (C.GLsizei)(bufSize), (*C.GLint64)(unsafe.Pointer(params))) +} + +// retrieve information about implementation-dependent support for internal formats +func GetInternalformativ(target uint32, internalformat uint32, pname uint32, bufSize int32, params *int32) { + C.glowGetInternalformativ(gpGetInternalformativ, (C.GLenum)(target), (C.GLenum)(internalformat), (C.GLenum)(pname), (C.GLsizei)(bufSize), (*C.GLint)(unsafe.Pointer(params))) +} +func GetMultiTexEnvfvEXT(texunit uint32, target uint32, pname uint32, params *float32) { + C.glowGetMultiTexEnvfvEXT(gpGetMultiTexEnvfvEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLenum)(pname), (*C.GLfloat)(unsafe.Pointer(params))) +} +func GetMultiTexEnvivEXT(texunit uint32, target uint32, pname uint32, params *int32) { + C.glowGetMultiTexEnvivEXT(gpGetMultiTexEnvivEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetMultiTexGendvEXT(texunit uint32, coord uint32, pname uint32, params *float64) { + C.glowGetMultiTexGendvEXT(gpGetMultiTexGendvEXT, (C.GLenum)(texunit), (C.GLenum)(coord), (C.GLenum)(pname), (*C.GLdouble)(unsafe.Pointer(params))) +} +func GetMultiTexGenfvEXT(texunit uint32, coord uint32, pname uint32, params *float32) { + C.glowGetMultiTexGenfvEXT(gpGetMultiTexGenfvEXT, (C.GLenum)(texunit), (C.GLenum)(coord), (C.GLenum)(pname), (*C.GLfloat)(unsafe.Pointer(params))) +} +func GetMultiTexGenivEXT(texunit uint32, coord uint32, pname uint32, params *int32) { + C.glowGetMultiTexGenivEXT(gpGetMultiTexGenivEXT, (C.GLenum)(texunit), (C.GLenum)(coord), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetMultiTexImageEXT(texunit uint32, target uint32, level int32, format uint32, xtype uint32, pixels unsafe.Pointer) { + C.glowGetMultiTexImageEXT(gpGetMultiTexImageEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLint)(level), (C.GLenum)(format), (C.GLenum)(xtype), pixels) +} +func GetMultiTexLevelParameterfvEXT(texunit uint32, target uint32, level int32, pname uint32, params *float32) { + C.glowGetMultiTexLevelParameterfvEXT(gpGetMultiTexLevelParameterfvEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLint)(level), (C.GLenum)(pname), (*C.GLfloat)(unsafe.Pointer(params))) +} +func GetMultiTexLevelParameterivEXT(texunit uint32, target uint32, level int32, pname uint32, params *int32) { + C.glowGetMultiTexLevelParameterivEXT(gpGetMultiTexLevelParameterivEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLint)(level), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetMultiTexParameterIivEXT(texunit uint32, target uint32, pname uint32, params *int32) { + C.glowGetMultiTexParameterIivEXT(gpGetMultiTexParameterIivEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetMultiTexParameterIuivEXT(texunit uint32, target uint32, pname uint32, params *uint32) { + C.glowGetMultiTexParameterIuivEXT(gpGetMultiTexParameterIuivEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLenum)(pname), (*C.GLuint)(unsafe.Pointer(params))) +} +func GetMultiTexParameterfvEXT(texunit uint32, target uint32, pname uint32, params *float32) { + C.glowGetMultiTexParameterfvEXT(gpGetMultiTexParameterfvEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLenum)(pname), (*C.GLfloat)(unsafe.Pointer(params))) +} +func GetMultiTexParameterivEXT(texunit uint32, target uint32, pname uint32, params *int32) { + C.glowGetMultiTexParameterivEXT(gpGetMultiTexParameterivEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} + +// retrieve the location of a sample +func GetMultisamplefv(pname uint32, index uint32, val *float32) { + C.glowGetMultisamplefv(gpGetMultisamplefv, (C.GLenum)(pname), (C.GLuint)(index), (*C.GLfloat)(unsafe.Pointer(val))) +} + +// return parameters of a buffer object +func GetNamedBufferParameteri64v(buffer uint32, pname uint32, params *int64) { + C.glowGetNamedBufferParameteri64v(gpGetNamedBufferParameteri64v, (C.GLuint)(buffer), (C.GLenum)(pname), (*C.GLint64)(unsafe.Pointer(params))) +} + +// return parameters of a buffer object +func GetNamedBufferParameteriv(buffer uint32, pname uint32, params *int32) { + C.glowGetNamedBufferParameteriv(gpGetNamedBufferParameteriv, (C.GLuint)(buffer), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetNamedBufferParameterivEXT(buffer uint32, pname uint32, params *int32) { + C.glowGetNamedBufferParameterivEXT(gpGetNamedBufferParameterivEXT, (C.GLuint)(buffer), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetNamedBufferParameterui64vNV(buffer uint32, pname uint32, params *uint64) { + C.glowGetNamedBufferParameterui64vNV(gpGetNamedBufferParameterui64vNV, (C.GLuint)(buffer), (C.GLenum)(pname), (*C.GLuint64EXT)(unsafe.Pointer(params))) +} + +// return the pointer to a mapped buffer object's data store +func GetNamedBufferPointerv(buffer uint32, pname uint32, params *unsafe.Pointer) { + C.glowGetNamedBufferPointerv(gpGetNamedBufferPointerv, (C.GLuint)(buffer), (C.GLenum)(pname), params) +} +func GetNamedBufferPointervEXT(buffer uint32, pname uint32, params *unsafe.Pointer) { + C.glowGetNamedBufferPointervEXT(gpGetNamedBufferPointervEXT, (C.GLuint)(buffer), (C.GLenum)(pname), params) +} + +// returns a subset of a buffer object's data store +func GetNamedBufferSubData(buffer uint32, offset int, size int, data unsafe.Pointer) { + C.glowGetNamedBufferSubData(gpGetNamedBufferSubData, (C.GLuint)(buffer), (C.GLintptr)(offset), (C.GLsizeiptr)(size), data) +} +func GetNamedBufferSubDataEXT(buffer uint32, offset int, size int, data unsafe.Pointer) { + C.glowGetNamedBufferSubDataEXT(gpGetNamedBufferSubDataEXT, (C.GLuint)(buffer), (C.GLintptr)(offset), (C.GLsizeiptr)(size), data) +} + +// retrieve information about attachments of a framebuffer object +func GetNamedFramebufferAttachmentParameteriv(framebuffer uint32, attachment uint32, pname uint32, params *int32) { + C.glowGetNamedFramebufferAttachmentParameteriv(gpGetNamedFramebufferAttachmentParameteriv, (C.GLuint)(framebuffer), (C.GLenum)(attachment), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetNamedFramebufferAttachmentParameterivEXT(framebuffer uint32, attachment uint32, pname uint32, params *int32) { + C.glowGetNamedFramebufferAttachmentParameterivEXT(gpGetNamedFramebufferAttachmentParameterivEXT, (C.GLuint)(framebuffer), (C.GLenum)(attachment), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} + +// query a named parameter of a framebuffer object +func GetNamedFramebufferParameteriv(framebuffer uint32, pname uint32, param *int32) { + C.glowGetNamedFramebufferParameteriv(gpGetNamedFramebufferParameteriv, (C.GLuint)(framebuffer), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(param))) +} +func GetNamedFramebufferParameterivEXT(framebuffer uint32, pname uint32, params *int32) { + C.glowGetNamedFramebufferParameterivEXT(gpGetNamedFramebufferParameterivEXT, (C.GLuint)(framebuffer), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetNamedProgramLocalParameterIivEXT(program uint32, target uint32, index uint32, params *int32) { + C.glowGetNamedProgramLocalParameterIivEXT(gpGetNamedProgramLocalParameterIivEXT, (C.GLuint)(program), (C.GLenum)(target), (C.GLuint)(index), (*C.GLint)(unsafe.Pointer(params))) +} +func GetNamedProgramLocalParameterIuivEXT(program uint32, target uint32, index uint32, params *uint32) { + C.glowGetNamedProgramLocalParameterIuivEXT(gpGetNamedProgramLocalParameterIuivEXT, (C.GLuint)(program), (C.GLenum)(target), (C.GLuint)(index), (*C.GLuint)(unsafe.Pointer(params))) +} +func GetNamedProgramLocalParameterdvEXT(program uint32, target uint32, index uint32, params *float64) { + C.glowGetNamedProgramLocalParameterdvEXT(gpGetNamedProgramLocalParameterdvEXT, (C.GLuint)(program), (C.GLenum)(target), (C.GLuint)(index), (*C.GLdouble)(unsafe.Pointer(params))) +} +func GetNamedProgramLocalParameterfvEXT(program uint32, target uint32, index uint32, params *float32) { + C.glowGetNamedProgramLocalParameterfvEXT(gpGetNamedProgramLocalParameterfvEXT, (C.GLuint)(program), (C.GLenum)(target), (C.GLuint)(index), (*C.GLfloat)(unsafe.Pointer(params))) +} +func GetNamedProgramStringEXT(program uint32, target uint32, pname uint32, xstring unsafe.Pointer) { + C.glowGetNamedProgramStringEXT(gpGetNamedProgramStringEXT, (C.GLuint)(program), (C.GLenum)(target), (C.GLenum)(pname), xstring) +} +func GetNamedProgramivEXT(program uint32, target uint32, pname uint32, params *int32) { + C.glowGetNamedProgramivEXT(gpGetNamedProgramivEXT, (C.GLuint)(program), (C.GLenum)(target), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} + +// query a named parameter of a renderbuffer object +func GetNamedRenderbufferParameteriv(renderbuffer uint32, pname uint32, params *int32) { + C.glowGetNamedRenderbufferParameteriv(gpGetNamedRenderbufferParameteriv, (C.GLuint)(renderbuffer), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetNamedRenderbufferParameterivEXT(renderbuffer uint32, pname uint32, params *int32) { + C.glowGetNamedRenderbufferParameterivEXT(gpGetNamedRenderbufferParameterivEXT, (C.GLuint)(renderbuffer), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetNamedStringARB(namelen int32, name *uint8, bufSize int32, stringlen *int32, xstring *uint8) { + C.glowGetNamedStringARB(gpGetNamedStringARB, (C.GLint)(namelen), (*C.GLchar)(unsafe.Pointer(name)), (C.GLsizei)(bufSize), (*C.GLint)(unsafe.Pointer(stringlen)), (*C.GLchar)(unsafe.Pointer(xstring))) +} +func GetNamedStringivARB(namelen int32, name *uint8, pname uint32, params *int32) { + C.glowGetNamedStringivARB(gpGetNamedStringivARB, (C.GLint)(namelen), (*C.GLchar)(unsafe.Pointer(name)), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetNextPerfQueryIdINTEL(queryId uint32, nextQueryId *uint32) { + C.glowGetNextPerfQueryIdINTEL(gpGetNextPerfQueryIdINTEL, (C.GLuint)(queryId), (*C.GLuint)(unsafe.Pointer(nextQueryId))) +} + +// retrieve the label of a named object identified within a namespace +func GetObjectLabel(identifier uint32, name uint32, bufSize int32, length *int32, label *uint8) { + C.glowGetObjectLabel(gpGetObjectLabel, (C.GLenum)(identifier), (C.GLuint)(name), (C.GLsizei)(bufSize), (*C.GLsizei)(unsafe.Pointer(length)), (*C.GLchar)(unsafe.Pointer(label))) +} +func GetObjectLabelEXT(xtype uint32, object uint32, bufSize int32, length *int32, label *uint8) { + C.glowGetObjectLabelEXT(gpGetObjectLabelEXT, (C.GLenum)(xtype), (C.GLuint)(object), (C.GLsizei)(bufSize), (*C.GLsizei)(unsafe.Pointer(length)), (*C.GLchar)(unsafe.Pointer(label))) +} +func GetObjectLabelKHR(identifier uint32, name uint32, bufSize int32, length *int32, label *uint8) { + C.glowGetObjectLabelKHR(gpGetObjectLabelKHR, (C.GLenum)(identifier), (C.GLuint)(name), (C.GLsizei)(bufSize), (*C.GLsizei)(unsafe.Pointer(length)), (*C.GLchar)(unsafe.Pointer(label))) +} + +// retrieve the label of a sync object identified by a pointer +func GetObjectPtrLabel(ptr unsafe.Pointer, bufSize int32, length *int32, label *uint8) { + C.glowGetObjectPtrLabel(gpGetObjectPtrLabel, ptr, (C.GLsizei)(bufSize), (*C.GLsizei)(unsafe.Pointer(length)), (*C.GLchar)(unsafe.Pointer(label))) +} +func GetObjectPtrLabelKHR(ptr unsafe.Pointer, bufSize int32, length *int32, label *uint8) { + C.glowGetObjectPtrLabelKHR(gpGetObjectPtrLabelKHR, ptr, (C.GLsizei)(bufSize), (*C.GLsizei)(unsafe.Pointer(length)), (*C.GLchar)(unsafe.Pointer(label))) +} +func GetPathCommandsNV(path uint32, commands *uint8) { + C.glowGetPathCommandsNV(gpGetPathCommandsNV, (C.GLuint)(path), (*C.GLubyte)(unsafe.Pointer(commands))) +} +func GetPathCoordsNV(path uint32, coords *float32) { + C.glowGetPathCoordsNV(gpGetPathCoordsNV, (C.GLuint)(path), (*C.GLfloat)(unsafe.Pointer(coords))) +} +func GetPathDashArrayNV(path uint32, dashArray *float32) { + C.glowGetPathDashArrayNV(gpGetPathDashArrayNV, (C.GLuint)(path), (*C.GLfloat)(unsafe.Pointer(dashArray))) +} +func GetPathLengthNV(path uint32, startSegment int32, numSegments int32) float32 { + ret := C.glowGetPathLengthNV(gpGetPathLengthNV, (C.GLuint)(path), (C.GLsizei)(startSegment), (C.GLsizei)(numSegments)) + return (float32)(ret) +} +func GetPathMetricRangeNV(metricQueryMask uint32, firstPathName uint32, numPaths int32, stride int32, metrics *float32) { + C.glowGetPathMetricRangeNV(gpGetPathMetricRangeNV, (C.GLbitfield)(metricQueryMask), (C.GLuint)(firstPathName), (C.GLsizei)(numPaths), (C.GLsizei)(stride), (*C.GLfloat)(unsafe.Pointer(metrics))) +} +func GetPathMetricsNV(metricQueryMask uint32, numPaths int32, pathNameType uint32, paths unsafe.Pointer, pathBase uint32, stride int32, metrics *float32) { + C.glowGetPathMetricsNV(gpGetPathMetricsNV, (C.GLbitfield)(metricQueryMask), (C.GLsizei)(numPaths), (C.GLenum)(pathNameType), paths, (C.GLuint)(pathBase), (C.GLsizei)(stride), (*C.GLfloat)(unsafe.Pointer(metrics))) +} +func GetPathParameterfvNV(path uint32, pname uint32, value *float32) { + C.glowGetPathParameterfvNV(gpGetPathParameterfvNV, (C.GLuint)(path), (C.GLenum)(pname), (*C.GLfloat)(unsafe.Pointer(value))) +} +func GetPathParameterivNV(path uint32, pname uint32, value *int32) { + C.glowGetPathParameterivNV(gpGetPathParameterivNV, (C.GLuint)(path), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(value))) +} +func GetPathSpacingNV(pathListMode uint32, numPaths int32, pathNameType uint32, paths unsafe.Pointer, pathBase uint32, advanceScale float32, kerningScale float32, transformType uint32, returnedSpacing *float32) { + C.glowGetPathSpacingNV(gpGetPathSpacingNV, (C.GLenum)(pathListMode), (C.GLsizei)(numPaths), (C.GLenum)(pathNameType), paths, (C.GLuint)(pathBase), (C.GLfloat)(advanceScale), (C.GLfloat)(kerningScale), (C.GLenum)(transformType), (*C.GLfloat)(unsafe.Pointer(returnedSpacing))) +} +func GetPerfCounterInfoINTEL(queryId uint32, counterId uint32, counterNameLength uint32, counterName *uint8, counterDescLength uint32, counterDesc *uint8, counterOffset *uint32, counterDataSize *uint32, counterTypeEnum *uint32, counterDataTypeEnum *uint32, rawCounterMaxValue *uint64) { + C.glowGetPerfCounterInfoINTEL(gpGetPerfCounterInfoINTEL, (C.GLuint)(queryId), (C.GLuint)(counterId), (C.GLuint)(counterNameLength), (*C.GLchar)(unsafe.Pointer(counterName)), (C.GLuint)(counterDescLength), (*C.GLchar)(unsafe.Pointer(counterDesc)), (*C.GLuint)(unsafe.Pointer(counterOffset)), (*C.GLuint)(unsafe.Pointer(counterDataSize)), (*C.GLuint)(unsafe.Pointer(counterTypeEnum)), (*C.GLuint)(unsafe.Pointer(counterDataTypeEnum)), (*C.GLuint64)(unsafe.Pointer(rawCounterMaxValue))) +} +func GetPerfMonitorCounterDataAMD(monitor uint32, pname uint32, dataSize int32, data *uint32, bytesWritten *int32) { + C.glowGetPerfMonitorCounterDataAMD(gpGetPerfMonitorCounterDataAMD, (C.GLuint)(monitor), (C.GLenum)(pname), (C.GLsizei)(dataSize), (*C.GLuint)(unsafe.Pointer(data)), (*C.GLint)(unsafe.Pointer(bytesWritten))) +} +func GetPerfMonitorCounterInfoAMD(group uint32, counter uint32, pname uint32, data unsafe.Pointer) { + C.glowGetPerfMonitorCounterInfoAMD(gpGetPerfMonitorCounterInfoAMD, (C.GLuint)(group), (C.GLuint)(counter), (C.GLenum)(pname), data) +} +func GetPerfMonitorCounterStringAMD(group uint32, counter uint32, bufSize int32, length *int32, counterString *uint8) { + C.glowGetPerfMonitorCounterStringAMD(gpGetPerfMonitorCounterStringAMD, (C.GLuint)(group), (C.GLuint)(counter), (C.GLsizei)(bufSize), (*C.GLsizei)(unsafe.Pointer(length)), (*C.GLchar)(unsafe.Pointer(counterString))) +} +func GetPerfMonitorCountersAMD(group uint32, numCounters *int32, maxActiveCounters *int32, counterSize int32, counters *uint32) { + C.glowGetPerfMonitorCountersAMD(gpGetPerfMonitorCountersAMD, (C.GLuint)(group), (*C.GLint)(unsafe.Pointer(numCounters)), (*C.GLint)(unsafe.Pointer(maxActiveCounters)), (C.GLsizei)(counterSize), (*C.GLuint)(unsafe.Pointer(counters))) +} +func GetPerfMonitorGroupStringAMD(group uint32, bufSize int32, length *int32, groupString *uint8) { + C.glowGetPerfMonitorGroupStringAMD(gpGetPerfMonitorGroupStringAMD, (C.GLuint)(group), (C.GLsizei)(bufSize), (*C.GLsizei)(unsafe.Pointer(length)), (*C.GLchar)(unsafe.Pointer(groupString))) +} +func GetPerfMonitorGroupsAMD(numGroups *int32, groupsSize int32, groups *uint32) { + C.glowGetPerfMonitorGroupsAMD(gpGetPerfMonitorGroupsAMD, (*C.GLint)(unsafe.Pointer(numGroups)), (C.GLsizei)(groupsSize), (*C.GLuint)(unsafe.Pointer(groups))) +} +func GetPerfQueryDataINTEL(queryHandle uint32, flags uint32, dataSize int32, data unsafe.Pointer, bytesWritten *uint32) { + C.glowGetPerfQueryDataINTEL(gpGetPerfQueryDataINTEL, (C.GLuint)(queryHandle), (C.GLuint)(flags), (C.GLsizei)(dataSize), data, (*C.GLuint)(unsafe.Pointer(bytesWritten))) +} +func GetPerfQueryIdByNameINTEL(queryName *uint8, queryId *uint32) { + C.glowGetPerfQueryIdByNameINTEL(gpGetPerfQueryIdByNameINTEL, (*C.GLchar)(unsafe.Pointer(queryName)), (*C.GLuint)(unsafe.Pointer(queryId))) +} +func GetPerfQueryInfoINTEL(queryId uint32, queryNameLength uint32, queryName *uint8, dataSize *uint32, noCounters *uint32, noInstances *uint32, capsMask *uint32) { + C.glowGetPerfQueryInfoINTEL(gpGetPerfQueryInfoINTEL, (C.GLuint)(queryId), (C.GLuint)(queryNameLength), (*C.GLchar)(unsafe.Pointer(queryName)), (*C.GLuint)(unsafe.Pointer(dataSize)), (*C.GLuint)(unsafe.Pointer(noCounters)), (*C.GLuint)(unsafe.Pointer(noInstances)), (*C.GLuint)(unsafe.Pointer(capsMask))) +} +func GetPointerIndexedvEXT(target uint32, index uint32, data *unsafe.Pointer) { + C.glowGetPointerIndexedvEXT(gpGetPointerIndexedvEXT, (C.GLenum)(target), (C.GLuint)(index), data) +} +func GetPointeri_vEXT(pname uint32, index uint32, params *unsafe.Pointer) { + C.glowGetPointeri_vEXT(gpGetPointeri_vEXT, (C.GLenum)(pname), (C.GLuint)(index), params) +} + +// return the address of the specified pointer +func GetPointerv(pname uint32, params *unsafe.Pointer) { + C.glowGetPointerv(gpGetPointerv, (C.GLenum)(pname), params) +} +func GetPointervKHR(pname uint32, params *unsafe.Pointer) { + C.glowGetPointervKHR(gpGetPointervKHR, (C.GLenum)(pname), params) +} + +// return a binary representation of a program object's compiled and linked executable source +func GetProgramBinary(program uint32, bufSize int32, length *int32, binaryFormat *uint32, binary unsafe.Pointer) { + C.glowGetProgramBinary(gpGetProgramBinary, (C.GLuint)(program), (C.GLsizei)(bufSize), (*C.GLsizei)(unsafe.Pointer(length)), (*C.GLenum)(unsafe.Pointer(binaryFormat)), binary) +} + +// Returns the information log for a program object +func GetProgramInfoLog(program uint32, bufSize int32, length *int32, infoLog *uint8) { + C.glowGetProgramInfoLog(gpGetProgramInfoLog, (C.GLuint)(program), (C.GLsizei)(bufSize), (*C.GLsizei)(unsafe.Pointer(length)), (*C.GLchar)(unsafe.Pointer(infoLog))) +} +func GetProgramInterfaceiv(program uint32, programInterface uint32, pname uint32, params *int32) { + C.glowGetProgramInterfaceiv(gpGetProgramInterfaceiv, (C.GLuint)(program), (C.GLenum)(programInterface), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} + +// retrieve the info log string from a program pipeline object +func GetProgramPipelineInfoLog(pipeline uint32, bufSize int32, length *int32, infoLog *uint8) { + C.glowGetProgramPipelineInfoLog(gpGetProgramPipelineInfoLog, (C.GLuint)(pipeline), (C.GLsizei)(bufSize), (*C.GLsizei)(unsafe.Pointer(length)), (*C.GLchar)(unsafe.Pointer(infoLog))) +} +func GetProgramPipelineInfoLogEXT(pipeline uint32, bufSize int32, length *int32, infoLog *uint8) { + C.glowGetProgramPipelineInfoLogEXT(gpGetProgramPipelineInfoLogEXT, (C.GLuint)(pipeline), (C.GLsizei)(bufSize), (*C.GLsizei)(unsafe.Pointer(length)), (*C.GLchar)(unsafe.Pointer(infoLog))) +} +func GetProgramPipelineiv(pipeline uint32, pname uint32, params *int32) { + C.glowGetProgramPipelineiv(gpGetProgramPipelineiv, (C.GLuint)(pipeline), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetProgramPipelineivEXT(pipeline uint32, pname uint32, params *int32) { + C.glowGetProgramPipelineivEXT(gpGetProgramPipelineivEXT, (C.GLuint)(pipeline), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} + +// query the index of a named resource within a program +func GetProgramResourceIndex(program uint32, programInterface uint32, name *uint8) uint32 { + ret := C.glowGetProgramResourceIndex(gpGetProgramResourceIndex, (C.GLuint)(program), (C.GLenum)(programInterface), (*C.GLchar)(unsafe.Pointer(name))) + return (uint32)(ret) +} + +// query the location of a named resource within a program +func GetProgramResourceLocation(program uint32, programInterface uint32, name *uint8) int32 { + ret := C.glowGetProgramResourceLocation(gpGetProgramResourceLocation, (C.GLuint)(program), (C.GLenum)(programInterface), (*C.GLchar)(unsafe.Pointer(name))) + return (int32)(ret) +} + +// query the fragment color index of a named variable within a program +func GetProgramResourceLocationIndex(program uint32, programInterface uint32, name *uint8) int32 { + ret := C.glowGetProgramResourceLocationIndex(gpGetProgramResourceLocationIndex, (C.GLuint)(program), (C.GLenum)(programInterface), (*C.GLchar)(unsafe.Pointer(name))) + return (int32)(ret) +} + +// query the name of an indexed resource within a program +func GetProgramResourceName(program uint32, programInterface uint32, index uint32, bufSize int32, length *int32, name *uint8) { + C.glowGetProgramResourceName(gpGetProgramResourceName, (C.GLuint)(program), (C.GLenum)(programInterface), (C.GLuint)(index), (C.GLsizei)(bufSize), (*C.GLsizei)(unsafe.Pointer(length)), (*C.GLchar)(unsafe.Pointer(name))) +} +func GetProgramResourcefvNV(program uint32, programInterface uint32, index uint32, propCount int32, props *uint32, bufSize int32, length *int32, params *float32) { + C.glowGetProgramResourcefvNV(gpGetProgramResourcefvNV, (C.GLuint)(program), (C.GLenum)(programInterface), (C.GLuint)(index), (C.GLsizei)(propCount), (*C.GLenum)(unsafe.Pointer(props)), (C.GLsizei)(bufSize), (*C.GLsizei)(unsafe.Pointer(length)), (*C.GLfloat)(unsafe.Pointer(params))) +} +func GetProgramResourceiv(program uint32, programInterface uint32, index uint32, propCount int32, props *uint32, bufSize int32, length *int32, params *int32) { + C.glowGetProgramResourceiv(gpGetProgramResourceiv, (C.GLuint)(program), (C.GLenum)(programInterface), (C.GLuint)(index), (C.GLsizei)(propCount), (*C.GLenum)(unsafe.Pointer(props)), (C.GLsizei)(bufSize), (*C.GLsizei)(unsafe.Pointer(length)), (*C.GLint)(unsafe.Pointer(params))) +} +func GetProgramStageiv(program uint32, shadertype uint32, pname uint32, values *int32) { + C.glowGetProgramStageiv(gpGetProgramStageiv, (C.GLuint)(program), (C.GLenum)(shadertype), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(values))) +} + +// Returns a parameter from a program object +func GetProgramiv(program uint32, pname uint32, params *int32) { + C.glowGetProgramiv(gpGetProgramiv, (C.GLuint)(program), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetQueryBufferObjecti64v(id uint32, buffer uint32, pname uint32, offset int) { + C.glowGetQueryBufferObjecti64v(gpGetQueryBufferObjecti64v, (C.GLuint)(id), (C.GLuint)(buffer), (C.GLenum)(pname), (C.GLintptr)(offset)) +} +func GetQueryBufferObjectiv(id uint32, buffer uint32, pname uint32, offset int) { + C.glowGetQueryBufferObjectiv(gpGetQueryBufferObjectiv, (C.GLuint)(id), (C.GLuint)(buffer), (C.GLenum)(pname), (C.GLintptr)(offset)) +} +func GetQueryBufferObjectui64v(id uint32, buffer uint32, pname uint32, offset int) { + C.glowGetQueryBufferObjectui64v(gpGetQueryBufferObjectui64v, (C.GLuint)(id), (C.GLuint)(buffer), (C.GLenum)(pname), (C.GLintptr)(offset)) +} +func GetQueryBufferObjectuiv(id uint32, buffer uint32, pname uint32, offset int) { + C.glowGetQueryBufferObjectuiv(gpGetQueryBufferObjectuiv, (C.GLuint)(id), (C.GLuint)(buffer), (C.GLenum)(pname), (C.GLintptr)(offset)) +} + +// return parameters of an indexed query object target +func GetQueryIndexediv(target uint32, index uint32, pname uint32, params *int32) { + C.glowGetQueryIndexediv(gpGetQueryIndexediv, (C.GLenum)(target), (C.GLuint)(index), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetQueryObjecti64v(id uint32, pname uint32, params *int64) { + C.glowGetQueryObjecti64v(gpGetQueryObjecti64v, (C.GLuint)(id), (C.GLenum)(pname), (*C.GLint64)(unsafe.Pointer(params))) +} +func GetQueryObjectiv(id uint32, pname uint32, params *int32) { + C.glowGetQueryObjectiv(gpGetQueryObjectiv, (C.GLuint)(id), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetQueryObjectui64v(id uint32, pname uint32, params *uint64) { + C.glowGetQueryObjectui64v(gpGetQueryObjectui64v, (C.GLuint)(id), (C.GLenum)(pname), (*C.GLuint64)(unsafe.Pointer(params))) +} + +// return parameters of a query object +func GetQueryObjectuiv(id uint32, pname uint32, params *uint32) { + C.glowGetQueryObjectuiv(gpGetQueryObjectuiv, (C.GLuint)(id), (C.GLenum)(pname), (*C.GLuint)(unsafe.Pointer(params))) +} + +// return parameters of a query object target +func GetQueryiv(target uint32, pname uint32, params *int32) { + C.glowGetQueryiv(gpGetQueryiv, (C.GLenum)(target), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} + +// retrieve information about a bound renderbuffer object +func GetRenderbufferParameteriv(target uint32, pname uint32, params *int32) { + C.glowGetRenderbufferParameteriv(gpGetRenderbufferParameteriv, (C.GLenum)(target), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetSamplerParameterIiv(sampler uint32, pname uint32, params *int32) { + C.glowGetSamplerParameterIiv(gpGetSamplerParameterIiv, (C.GLuint)(sampler), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetSamplerParameterIuiv(sampler uint32, pname uint32, params *uint32) { + C.glowGetSamplerParameterIuiv(gpGetSamplerParameterIuiv, (C.GLuint)(sampler), (C.GLenum)(pname), (*C.GLuint)(unsafe.Pointer(params))) +} +func GetSamplerParameterfv(sampler uint32, pname uint32, params *float32) { + C.glowGetSamplerParameterfv(gpGetSamplerParameterfv, (C.GLuint)(sampler), (C.GLenum)(pname), (*C.GLfloat)(unsafe.Pointer(params))) +} +func GetSamplerParameteriv(sampler uint32, pname uint32, params *int32) { + C.glowGetSamplerParameteriv(gpGetSamplerParameteriv, (C.GLuint)(sampler), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} + +// Returns the information log for a shader object +func GetShaderInfoLog(shader uint32, bufSize int32, length *int32, infoLog *uint8) { + C.glowGetShaderInfoLog(gpGetShaderInfoLog, (C.GLuint)(shader), (C.GLsizei)(bufSize), (*C.GLsizei)(unsafe.Pointer(length)), (*C.GLchar)(unsafe.Pointer(infoLog))) +} + +// retrieve the range and precision for numeric formats supported by the shader compiler +func GetShaderPrecisionFormat(shadertype uint32, precisiontype uint32, xrange *int32, precision *int32) { + C.glowGetShaderPrecisionFormat(gpGetShaderPrecisionFormat, (C.GLenum)(shadertype), (C.GLenum)(precisiontype), (*C.GLint)(unsafe.Pointer(xrange)), (*C.GLint)(unsafe.Pointer(precision))) +} + +// Returns the source code string from a shader object +func GetShaderSource(shader uint32, bufSize int32, length *int32, source *uint8) { + C.glowGetShaderSource(gpGetShaderSource, (C.GLuint)(shader), (C.GLsizei)(bufSize), (*C.GLsizei)(unsafe.Pointer(length)), (*C.GLchar)(unsafe.Pointer(source))) +} + +// Returns a parameter from a shader object +func GetShaderiv(shader uint32, pname uint32, params *int32) { + C.glowGetShaderiv(gpGetShaderiv, (C.GLuint)(shader), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetStageIndexNV(shadertype uint32) uint16 { + ret := C.glowGetStageIndexNV(gpGetStageIndexNV, (C.GLenum)(shadertype)) + return (uint16)(ret) +} + +// return a string describing the current GL connection +func GetString(name uint32) *uint8 { + ret := C.glowGetString(gpGetString, (C.GLenum)(name)) + return (*uint8)(ret) +} +func GetStringi(name uint32, index uint32) *uint8 { + ret := C.glowGetStringi(gpGetStringi, (C.GLenum)(name), (C.GLuint)(index)) + return (*uint8)(ret) +} + +// retrieve the index of a subroutine uniform of a given shader stage within a program +func GetSubroutineIndex(program uint32, shadertype uint32, name *uint8) uint32 { + ret := C.glowGetSubroutineIndex(gpGetSubroutineIndex, (C.GLuint)(program), (C.GLenum)(shadertype), (*C.GLchar)(unsafe.Pointer(name))) + return (uint32)(ret) +} + +// retrieve the location of a subroutine uniform of a given shader stage within a program +func GetSubroutineUniformLocation(program uint32, shadertype uint32, name *uint8) int32 { + ret := C.glowGetSubroutineUniformLocation(gpGetSubroutineUniformLocation, (C.GLuint)(program), (C.GLenum)(shadertype), (*C.GLchar)(unsafe.Pointer(name))) + return (int32)(ret) +} + +// query the properties of a sync object +func GetSynciv(sync uintptr, pname uint32, bufSize int32, length *int32, values *int32) { + C.glowGetSynciv(gpGetSynciv, (C.GLsync)(sync), (C.GLenum)(pname), (C.GLsizei)(bufSize), (*C.GLsizei)(unsafe.Pointer(length)), (*C.GLint)(unsafe.Pointer(values))) +} + +// return a texture image +func GetTexImage(target uint32, level int32, format uint32, xtype uint32, pixels unsafe.Pointer) { + C.glowGetTexImage(gpGetTexImage, (C.GLenum)(target), (C.GLint)(level), (C.GLenum)(format), (C.GLenum)(xtype), pixels) +} +func GetTexLevelParameterfv(target uint32, level int32, pname uint32, params *float32) { + C.glowGetTexLevelParameterfv(gpGetTexLevelParameterfv, (C.GLenum)(target), (C.GLint)(level), (C.GLenum)(pname), (*C.GLfloat)(unsafe.Pointer(params))) +} +func GetTexLevelParameteriv(target uint32, level int32, pname uint32, params *int32) { + C.glowGetTexLevelParameteriv(gpGetTexLevelParameteriv, (C.GLenum)(target), (C.GLint)(level), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetTexParameterIiv(target uint32, pname uint32, params *int32) { + C.glowGetTexParameterIiv(gpGetTexParameterIiv, (C.GLenum)(target), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetTexParameterIuiv(target uint32, pname uint32, params *uint32) { + C.glowGetTexParameterIuiv(gpGetTexParameterIuiv, (C.GLenum)(target), (C.GLenum)(pname), (*C.GLuint)(unsafe.Pointer(params))) +} +func GetTexParameterfv(target uint32, pname uint32, params *float32) { + C.glowGetTexParameterfv(gpGetTexParameterfv, (C.GLenum)(target), (C.GLenum)(pname), (*C.GLfloat)(unsafe.Pointer(params))) +} +func GetTexParameteriv(target uint32, pname uint32, params *int32) { + C.glowGetTexParameteriv(gpGetTexParameteriv, (C.GLenum)(target), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetTextureHandleARB(texture uint32) uint64 { + ret := C.glowGetTextureHandleARB(gpGetTextureHandleARB, (C.GLuint)(texture)) + return (uint64)(ret) +} +func GetTextureHandleNV(texture uint32) uint64 { + ret := C.glowGetTextureHandleNV(gpGetTextureHandleNV, (C.GLuint)(texture)) + return (uint64)(ret) +} + +// return a texture image +func GetTextureImage(texture uint32, level int32, format uint32, xtype uint32, bufSize int32, pixels unsafe.Pointer) { + C.glowGetTextureImage(gpGetTextureImage, (C.GLuint)(texture), (C.GLint)(level), (C.GLenum)(format), (C.GLenum)(xtype), (C.GLsizei)(bufSize), pixels) +} +func GetTextureImageEXT(texture uint32, target uint32, level int32, format uint32, xtype uint32, pixels unsafe.Pointer) { + C.glowGetTextureImageEXT(gpGetTextureImageEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLint)(level), (C.GLenum)(format), (C.GLenum)(xtype), pixels) +} +func GetTextureLevelParameterfv(texture uint32, level int32, pname uint32, params *float32) { + C.glowGetTextureLevelParameterfv(gpGetTextureLevelParameterfv, (C.GLuint)(texture), (C.GLint)(level), (C.GLenum)(pname), (*C.GLfloat)(unsafe.Pointer(params))) +} +func GetTextureLevelParameterfvEXT(texture uint32, target uint32, level int32, pname uint32, params *float32) { + C.glowGetTextureLevelParameterfvEXT(gpGetTextureLevelParameterfvEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLint)(level), (C.GLenum)(pname), (*C.GLfloat)(unsafe.Pointer(params))) +} +func GetTextureLevelParameteriv(texture uint32, level int32, pname uint32, params *int32) { + C.glowGetTextureLevelParameteriv(gpGetTextureLevelParameteriv, (C.GLuint)(texture), (C.GLint)(level), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetTextureLevelParameterivEXT(texture uint32, target uint32, level int32, pname uint32, params *int32) { + C.glowGetTextureLevelParameterivEXT(gpGetTextureLevelParameterivEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLint)(level), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetTextureParameterIiv(texture uint32, pname uint32, params *int32) { + C.glowGetTextureParameterIiv(gpGetTextureParameterIiv, (C.GLuint)(texture), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetTextureParameterIivEXT(texture uint32, target uint32, pname uint32, params *int32) { + C.glowGetTextureParameterIivEXT(gpGetTextureParameterIivEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetTextureParameterIuiv(texture uint32, pname uint32, params *uint32) { + C.glowGetTextureParameterIuiv(gpGetTextureParameterIuiv, (C.GLuint)(texture), (C.GLenum)(pname), (*C.GLuint)(unsafe.Pointer(params))) +} +func GetTextureParameterIuivEXT(texture uint32, target uint32, pname uint32, params *uint32) { + C.glowGetTextureParameterIuivEXT(gpGetTextureParameterIuivEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLenum)(pname), (*C.GLuint)(unsafe.Pointer(params))) +} +func GetTextureParameterfv(texture uint32, pname uint32, params *float32) { + C.glowGetTextureParameterfv(gpGetTextureParameterfv, (C.GLuint)(texture), (C.GLenum)(pname), (*C.GLfloat)(unsafe.Pointer(params))) +} +func GetTextureParameterfvEXT(texture uint32, target uint32, pname uint32, params *float32) { + C.glowGetTextureParameterfvEXT(gpGetTextureParameterfvEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLenum)(pname), (*C.GLfloat)(unsafe.Pointer(params))) +} +func GetTextureParameteriv(texture uint32, pname uint32, params *int32) { + C.glowGetTextureParameteriv(gpGetTextureParameteriv, (C.GLuint)(texture), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetTextureParameterivEXT(texture uint32, target uint32, pname uint32, params *int32) { + C.glowGetTextureParameterivEXT(gpGetTextureParameterivEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetTextureSamplerHandleARB(texture uint32, sampler uint32) uint64 { + ret := C.glowGetTextureSamplerHandleARB(gpGetTextureSamplerHandleARB, (C.GLuint)(texture), (C.GLuint)(sampler)) + return (uint64)(ret) +} +func GetTextureSamplerHandleNV(texture uint32, sampler uint32) uint64 { + ret := C.glowGetTextureSamplerHandleNV(gpGetTextureSamplerHandleNV, (C.GLuint)(texture), (C.GLuint)(sampler)) + return (uint64)(ret) +} + +// retrieve a sub-region of a texture image from a texture object +func GetTextureSubImage(texture uint32, level int32, xoffset int32, yoffset int32, zoffset int32, width int32, height int32, depth int32, format uint32, xtype uint32, bufSize int32, pixels unsafe.Pointer) { + C.glowGetTextureSubImage(gpGetTextureSubImage, (C.GLuint)(texture), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLint)(zoffset), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth), (C.GLenum)(format), (C.GLenum)(xtype), (C.GLsizei)(bufSize), pixels) +} + +// retrieve information about varying variables selected for transform feedback +func GetTransformFeedbackVarying(program uint32, index uint32, bufSize int32, length *int32, size *int32, xtype *uint32, name *uint8) { + C.glowGetTransformFeedbackVarying(gpGetTransformFeedbackVarying, (C.GLuint)(program), (C.GLuint)(index), (C.GLsizei)(bufSize), (*C.GLsizei)(unsafe.Pointer(length)), (*C.GLsizei)(unsafe.Pointer(size)), (*C.GLenum)(unsafe.Pointer(xtype)), (*C.GLchar)(unsafe.Pointer(name))) +} +func GetTransformFeedbacki64_v(xfb uint32, pname uint32, index uint32, param *int64) { + C.glowGetTransformFeedbacki64_v(gpGetTransformFeedbacki64_v, (C.GLuint)(xfb), (C.GLenum)(pname), (C.GLuint)(index), (*C.GLint64)(unsafe.Pointer(param))) +} +func GetTransformFeedbacki_v(xfb uint32, pname uint32, index uint32, param *int32) { + C.glowGetTransformFeedbacki_v(gpGetTransformFeedbacki_v, (C.GLuint)(xfb), (C.GLenum)(pname), (C.GLuint)(index), (*C.GLint)(unsafe.Pointer(param))) +} + +// query the state of a transform feedback object. +func GetTransformFeedbackiv(xfb uint32, pname uint32, param *int32) { + C.glowGetTransformFeedbackiv(gpGetTransformFeedbackiv, (C.GLuint)(xfb), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(param))) +} + +// retrieve the index of a named uniform block +func GetUniformBlockIndex(program uint32, uniformBlockName *uint8) uint32 { + ret := C.glowGetUniformBlockIndex(gpGetUniformBlockIndex, (C.GLuint)(program), (*C.GLchar)(unsafe.Pointer(uniformBlockName))) + return (uint32)(ret) +} + +// retrieve the index of a named uniform block +func GetUniformIndices(program uint32, uniformCount int32, uniformNames **uint8, uniformIndices *uint32) { + C.glowGetUniformIndices(gpGetUniformIndices, (C.GLuint)(program), (C.GLsizei)(uniformCount), (**C.GLchar)(unsafe.Pointer(uniformNames)), (*C.GLuint)(unsafe.Pointer(uniformIndices))) +} + +// Returns the location of a uniform variable +func GetUniformLocation(program uint32, name *uint8) int32 { + ret := C.glowGetUniformLocation(gpGetUniformLocation, (C.GLuint)(program), (*C.GLchar)(unsafe.Pointer(name))) + return (int32)(ret) +} +func GetUniformSubroutineuiv(shadertype uint32, location int32, params *uint32) { + C.glowGetUniformSubroutineuiv(gpGetUniformSubroutineuiv, (C.GLenum)(shadertype), (C.GLint)(location), (*C.GLuint)(unsafe.Pointer(params))) +} +func GetUniformdv(program uint32, location int32, params *float64) { + C.glowGetUniformdv(gpGetUniformdv, (C.GLuint)(program), (C.GLint)(location), (*C.GLdouble)(unsafe.Pointer(params))) +} + +// Returns the value of a uniform variable +func GetUniformfv(program uint32, location int32, params *float32) { + C.glowGetUniformfv(gpGetUniformfv, (C.GLuint)(program), (C.GLint)(location), (*C.GLfloat)(unsafe.Pointer(params))) +} +func GetUniformi64vARB(program uint32, location int32, params *int64) { + C.glowGetUniformi64vARB(gpGetUniformi64vARB, (C.GLuint)(program), (C.GLint)(location), (*C.GLint64)(unsafe.Pointer(params))) +} +func GetUniformi64vNV(program uint32, location int32, params *int64) { + C.glowGetUniformi64vNV(gpGetUniformi64vNV, (C.GLuint)(program), (C.GLint)(location), (*C.GLint64EXT)(unsafe.Pointer(params))) +} + +// Returns the value of a uniform variable +func GetUniformiv(program uint32, location int32, params *int32) { + C.glowGetUniformiv(gpGetUniformiv, (C.GLuint)(program), (C.GLint)(location), (*C.GLint)(unsafe.Pointer(params))) +} +func GetUniformui64vARB(program uint32, location int32, params *uint64) { + C.glowGetUniformui64vARB(gpGetUniformui64vARB, (C.GLuint)(program), (C.GLint)(location), (*C.GLuint64)(unsafe.Pointer(params))) +} +func GetUniformui64vNV(program uint32, location int32, params *uint64) { + C.glowGetUniformui64vNV(gpGetUniformui64vNV, (C.GLuint)(program), (C.GLint)(location), (*C.GLuint64EXT)(unsafe.Pointer(params))) +} +func GetUniformuiv(program uint32, location int32, params *uint32) { + C.glowGetUniformuiv(gpGetUniformuiv, (C.GLuint)(program), (C.GLint)(location), (*C.GLuint)(unsafe.Pointer(params))) +} +func GetVertexArrayIndexed64iv(vaobj uint32, index uint32, pname uint32, param *int64) { + C.glowGetVertexArrayIndexed64iv(gpGetVertexArrayIndexed64iv, (C.GLuint)(vaobj), (C.GLuint)(index), (C.GLenum)(pname), (*C.GLint64)(unsafe.Pointer(param))) +} +func GetVertexArrayIndexediv(vaobj uint32, index uint32, pname uint32, param *int32) { + C.glowGetVertexArrayIndexediv(gpGetVertexArrayIndexediv, (C.GLuint)(vaobj), (C.GLuint)(index), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(param))) +} +func GetVertexArrayIntegeri_vEXT(vaobj uint32, index uint32, pname uint32, param *int32) { + C.glowGetVertexArrayIntegeri_vEXT(gpGetVertexArrayIntegeri_vEXT, (C.GLuint)(vaobj), (C.GLuint)(index), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(param))) +} +func GetVertexArrayIntegervEXT(vaobj uint32, pname uint32, param *int32) { + C.glowGetVertexArrayIntegervEXT(gpGetVertexArrayIntegervEXT, (C.GLuint)(vaobj), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(param))) +} +func GetVertexArrayPointeri_vEXT(vaobj uint32, index uint32, pname uint32, param *unsafe.Pointer) { + C.glowGetVertexArrayPointeri_vEXT(gpGetVertexArrayPointeri_vEXT, (C.GLuint)(vaobj), (C.GLuint)(index), (C.GLenum)(pname), param) +} +func GetVertexArrayPointervEXT(vaobj uint32, pname uint32, param *unsafe.Pointer) { + C.glowGetVertexArrayPointervEXT(gpGetVertexArrayPointervEXT, (C.GLuint)(vaobj), (C.GLenum)(pname), param) +} + +// retrieve parameters of a vertex array object +func GetVertexArrayiv(vaobj uint32, pname uint32, param *int32) { + C.glowGetVertexArrayiv(gpGetVertexArrayiv, (C.GLuint)(vaobj), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(param))) +} + +// Return a generic vertex attribute parameter +func GetVertexAttribIiv(index uint32, pname uint32, params *int32) { + C.glowGetVertexAttribIiv(gpGetVertexAttribIiv, (C.GLuint)(index), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} + +// Return a generic vertex attribute parameter +func GetVertexAttribIuiv(index uint32, pname uint32, params *uint32) { + C.glowGetVertexAttribIuiv(gpGetVertexAttribIuiv, (C.GLuint)(index), (C.GLenum)(pname), (*C.GLuint)(unsafe.Pointer(params))) +} + +// Return a generic vertex attribute parameter +func GetVertexAttribLdv(index uint32, pname uint32, params *float64) { + C.glowGetVertexAttribLdv(gpGetVertexAttribLdv, (C.GLuint)(index), (C.GLenum)(pname), (*C.GLdouble)(unsafe.Pointer(params))) +} +func GetVertexAttribLi64vNV(index uint32, pname uint32, params *int64) { + C.glowGetVertexAttribLi64vNV(gpGetVertexAttribLi64vNV, (C.GLuint)(index), (C.GLenum)(pname), (*C.GLint64EXT)(unsafe.Pointer(params))) +} +func GetVertexAttribLui64vARB(index uint32, pname uint32, params *uint64) { + C.glowGetVertexAttribLui64vARB(gpGetVertexAttribLui64vARB, (C.GLuint)(index), (C.GLenum)(pname), (*C.GLuint64EXT)(unsafe.Pointer(params))) +} +func GetVertexAttribLui64vNV(index uint32, pname uint32, params *uint64) { + C.glowGetVertexAttribLui64vNV(gpGetVertexAttribLui64vNV, (C.GLuint)(index), (C.GLenum)(pname), (*C.GLuint64EXT)(unsafe.Pointer(params))) +} + +// return the address of the specified generic vertex attribute pointer +func GetVertexAttribPointerv(index uint32, pname uint32, pointer *unsafe.Pointer) { + C.glowGetVertexAttribPointerv(gpGetVertexAttribPointerv, (C.GLuint)(index), (C.GLenum)(pname), pointer) +} + +// Return a generic vertex attribute parameter +func GetVertexAttribdv(index uint32, pname uint32, params *float64) { + C.glowGetVertexAttribdv(gpGetVertexAttribdv, (C.GLuint)(index), (C.GLenum)(pname), (*C.GLdouble)(unsafe.Pointer(params))) +} + +// Return a generic vertex attribute parameter +func GetVertexAttribfv(index uint32, pname uint32, params *float32) { + C.glowGetVertexAttribfv(gpGetVertexAttribfv, (C.GLuint)(index), (C.GLenum)(pname), (*C.GLfloat)(unsafe.Pointer(params))) +} + +// Return a generic vertex attribute parameter +func GetVertexAttribiv(index uint32, pname uint32, params *int32) { + C.glowGetVertexAttribiv(gpGetVertexAttribiv, (C.GLuint)(index), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func GetVkProcAddrNV(name *uint8) C.GLVULKANPROCNV { + ret := C.glowGetVkProcAddrNV(gpGetVkProcAddrNV, (*C.GLchar)(unsafe.Pointer(name))) + return (C.GLVULKANPROCNV)(ret) +} +func GetnCompressedTexImageARB(target uint32, lod int32, bufSize int32, img unsafe.Pointer) { + C.glowGetnCompressedTexImageARB(gpGetnCompressedTexImageARB, (C.GLenum)(target), (C.GLint)(lod), (C.GLsizei)(bufSize), img) +} +func GetnTexImageARB(target uint32, level int32, format uint32, xtype uint32, bufSize int32, img unsafe.Pointer) { + C.glowGetnTexImageARB(gpGetnTexImageARB, (C.GLenum)(target), (C.GLint)(level), (C.GLenum)(format), (C.GLenum)(xtype), (C.GLsizei)(bufSize), img) +} +func GetnUniformdvARB(program uint32, location int32, bufSize int32, params *float64) { + C.glowGetnUniformdvARB(gpGetnUniformdvARB, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(bufSize), (*C.GLdouble)(unsafe.Pointer(params))) +} +func GetnUniformfv(program uint32, location int32, bufSize int32, params *float32) { + C.glowGetnUniformfv(gpGetnUniformfv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(bufSize), (*C.GLfloat)(unsafe.Pointer(params))) +} +func GetnUniformfvARB(program uint32, location int32, bufSize int32, params *float32) { + C.glowGetnUniformfvARB(gpGetnUniformfvARB, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(bufSize), (*C.GLfloat)(unsafe.Pointer(params))) +} +func GetnUniformfvKHR(program uint32, location int32, bufSize int32, params *float32) { + C.glowGetnUniformfvKHR(gpGetnUniformfvKHR, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(bufSize), (*C.GLfloat)(unsafe.Pointer(params))) +} +func GetnUniformi64vARB(program uint32, location int32, bufSize int32, params *int64) { + C.glowGetnUniformi64vARB(gpGetnUniformi64vARB, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(bufSize), (*C.GLint64)(unsafe.Pointer(params))) +} +func GetnUniformiv(program uint32, location int32, bufSize int32, params *int32) { + C.glowGetnUniformiv(gpGetnUniformiv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(bufSize), (*C.GLint)(unsafe.Pointer(params))) +} +func GetnUniformivARB(program uint32, location int32, bufSize int32, params *int32) { + C.glowGetnUniformivARB(gpGetnUniformivARB, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(bufSize), (*C.GLint)(unsafe.Pointer(params))) +} +func GetnUniformivKHR(program uint32, location int32, bufSize int32, params *int32) { + C.glowGetnUniformivKHR(gpGetnUniformivKHR, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(bufSize), (*C.GLint)(unsafe.Pointer(params))) +} +func GetnUniformui64vARB(program uint32, location int32, bufSize int32, params *uint64) { + C.glowGetnUniformui64vARB(gpGetnUniformui64vARB, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(bufSize), (*C.GLuint64)(unsafe.Pointer(params))) +} +func GetnUniformuiv(program uint32, location int32, bufSize int32, params *uint32) { + C.glowGetnUniformuiv(gpGetnUniformuiv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(bufSize), (*C.GLuint)(unsafe.Pointer(params))) +} +func GetnUniformuivARB(program uint32, location int32, bufSize int32, params *uint32) { + C.glowGetnUniformuivARB(gpGetnUniformuivARB, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(bufSize), (*C.GLuint)(unsafe.Pointer(params))) +} +func GetnUniformuivKHR(program uint32, location int32, bufSize int32, params *uint32) { + C.glowGetnUniformuivKHR(gpGetnUniformuivKHR, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(bufSize), (*C.GLuint)(unsafe.Pointer(params))) +} + +// specify implementation-specific hints +func Hint(target uint32, mode uint32) { + C.glowHint(gpHint, (C.GLenum)(target), (C.GLenum)(mode)) +} +func IndexFormatNV(xtype uint32, stride int32) { + C.glowIndexFormatNV(gpIndexFormatNV, (C.GLenum)(xtype), (C.GLsizei)(stride)) +} +func InsertEventMarkerEXT(length int32, marker *uint8) { + C.glowInsertEventMarkerEXT(gpInsertEventMarkerEXT, (C.GLsizei)(length), (*C.GLchar)(unsafe.Pointer(marker))) +} +func InterpolatePathsNV(resultPath uint32, pathA uint32, pathB uint32, weight float32) { + C.glowInterpolatePathsNV(gpInterpolatePathsNV, (C.GLuint)(resultPath), (C.GLuint)(pathA), (C.GLuint)(pathB), (C.GLfloat)(weight)) +} + +// invalidate the content of a buffer object's data store +func InvalidateBufferData(buffer uint32) { + C.glowInvalidateBufferData(gpInvalidateBufferData, (C.GLuint)(buffer)) +} + +// invalidate a region of a buffer object's data store +func InvalidateBufferSubData(buffer uint32, offset int, length int) { + C.glowInvalidateBufferSubData(gpInvalidateBufferSubData, (C.GLuint)(buffer), (C.GLintptr)(offset), (C.GLsizeiptr)(length)) +} + +// invalidate the content of some or all of a framebuffer's attachments +func InvalidateFramebuffer(target uint32, numAttachments int32, attachments *uint32) { + C.glowInvalidateFramebuffer(gpInvalidateFramebuffer, (C.GLenum)(target), (C.GLsizei)(numAttachments), (*C.GLenum)(unsafe.Pointer(attachments))) +} + +// invalidate the content of some or all of a framebuffer's attachments +func InvalidateNamedFramebufferData(framebuffer uint32, numAttachments int32, attachments *uint32) { + C.glowInvalidateNamedFramebufferData(gpInvalidateNamedFramebufferData, (C.GLuint)(framebuffer), (C.GLsizei)(numAttachments), (*C.GLenum)(unsafe.Pointer(attachments))) +} + +// invalidate the content of a region of some or all of a framebuffer's attachments +func InvalidateNamedFramebufferSubData(framebuffer uint32, numAttachments int32, attachments *uint32, x int32, y int32, width int32, height int32) { + C.glowInvalidateNamedFramebufferSubData(gpInvalidateNamedFramebufferSubData, (C.GLuint)(framebuffer), (C.GLsizei)(numAttachments), (*C.GLenum)(unsafe.Pointer(attachments)), (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width), (C.GLsizei)(height)) +} + +// invalidate the content of a region of some or all of a framebuffer's attachments +func InvalidateSubFramebuffer(target uint32, numAttachments int32, attachments *uint32, x int32, y int32, width int32, height int32) { + C.glowInvalidateSubFramebuffer(gpInvalidateSubFramebuffer, (C.GLenum)(target), (C.GLsizei)(numAttachments), (*C.GLenum)(unsafe.Pointer(attachments)), (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width), (C.GLsizei)(height)) +} + +// invalidate the entirety a texture image +func InvalidateTexImage(texture uint32, level int32) { + C.glowInvalidateTexImage(gpInvalidateTexImage, (C.GLuint)(texture), (C.GLint)(level)) +} + +// invalidate a region of a texture image +func InvalidateTexSubImage(texture uint32, level int32, xoffset int32, yoffset int32, zoffset int32, width int32, height int32, depth int32) { + C.glowInvalidateTexSubImage(gpInvalidateTexSubImage, (C.GLuint)(texture), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLint)(zoffset), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth)) +} + +// determine if a name corresponds to a buffer object +func IsBuffer(buffer uint32) bool { + ret := C.glowIsBuffer(gpIsBuffer, (C.GLuint)(buffer)) + return ret == TRUE +} +func IsBufferResidentNV(target uint32) bool { + ret := C.glowIsBufferResidentNV(gpIsBufferResidentNV, (C.GLenum)(target)) + return ret == TRUE +} +func IsCommandListNV(list uint32) bool { + ret := C.glowIsCommandListNV(gpIsCommandListNV, (C.GLuint)(list)) + return ret == TRUE +} +func IsEnabled(cap uint32) bool { + ret := C.glowIsEnabled(gpIsEnabled, (C.GLenum)(cap)) + return ret == TRUE +} +func IsEnabledIndexedEXT(target uint32, index uint32) bool { + ret := C.glowIsEnabledIndexedEXT(gpIsEnabledIndexedEXT, (C.GLenum)(target), (C.GLuint)(index)) + return ret == TRUE +} +func IsEnabledi(target uint32, index uint32) bool { + ret := C.glowIsEnabledi(gpIsEnabledi, (C.GLenum)(target), (C.GLuint)(index)) + return ret == TRUE +} + +// determine if a name corresponds to a framebuffer object +func IsFramebuffer(framebuffer uint32) bool { + ret := C.glowIsFramebuffer(gpIsFramebuffer, (C.GLuint)(framebuffer)) + return ret == TRUE +} +func IsImageHandleResidentARB(handle uint64) bool { + ret := C.glowIsImageHandleResidentARB(gpIsImageHandleResidentARB, (C.GLuint64)(handle)) + return ret == TRUE +} +func IsImageHandleResidentNV(handle uint64) bool { + ret := C.glowIsImageHandleResidentNV(gpIsImageHandleResidentNV, (C.GLuint64)(handle)) + return ret == TRUE +} +func IsNamedBufferResidentNV(buffer uint32) bool { + ret := C.glowIsNamedBufferResidentNV(gpIsNamedBufferResidentNV, (C.GLuint)(buffer)) + return ret == TRUE +} +func IsNamedStringARB(namelen int32, name *uint8) bool { + ret := C.glowIsNamedStringARB(gpIsNamedStringARB, (C.GLint)(namelen), (*C.GLchar)(unsafe.Pointer(name))) + return ret == TRUE +} +func IsPathNV(path uint32) bool { + ret := C.glowIsPathNV(gpIsPathNV, (C.GLuint)(path)) + return ret == TRUE +} +func IsPointInFillPathNV(path uint32, mask uint32, x float32, y float32) bool { + ret := C.glowIsPointInFillPathNV(gpIsPointInFillPathNV, (C.GLuint)(path), (C.GLuint)(mask), (C.GLfloat)(x), (C.GLfloat)(y)) + return ret == TRUE +} +func IsPointInStrokePathNV(path uint32, x float32, y float32) bool { + ret := C.glowIsPointInStrokePathNV(gpIsPointInStrokePathNV, (C.GLuint)(path), (C.GLfloat)(x), (C.GLfloat)(y)) + return ret == TRUE +} + +// Determines if a name corresponds to a program object +func IsProgram(program uint32) bool { + ret := C.glowIsProgram(gpIsProgram, (C.GLuint)(program)) + return ret == TRUE +} + +// determine if a name corresponds to a program pipeline object +func IsProgramPipeline(pipeline uint32) bool { + ret := C.glowIsProgramPipeline(gpIsProgramPipeline, (C.GLuint)(pipeline)) + return ret == TRUE +} +func IsProgramPipelineEXT(pipeline uint32) bool { + ret := C.glowIsProgramPipelineEXT(gpIsProgramPipelineEXT, (C.GLuint)(pipeline)) + return ret == TRUE +} + +// determine if a name corresponds to a query object +func IsQuery(id uint32) bool { + ret := C.glowIsQuery(gpIsQuery, (C.GLuint)(id)) + return ret == TRUE +} + +// determine if a name corresponds to a renderbuffer object +func IsRenderbuffer(renderbuffer uint32) bool { + ret := C.glowIsRenderbuffer(gpIsRenderbuffer, (C.GLuint)(renderbuffer)) + return ret == TRUE +} + +// determine if a name corresponds to a sampler object +func IsSampler(sampler uint32) bool { + ret := C.glowIsSampler(gpIsSampler, (C.GLuint)(sampler)) + return ret == TRUE +} + +// Determines if a name corresponds to a shader object +func IsShader(shader uint32) bool { + ret := C.glowIsShader(gpIsShader, (C.GLuint)(shader)) + return ret == TRUE +} +func IsStateNV(state uint32) bool { + ret := C.glowIsStateNV(gpIsStateNV, (C.GLuint)(state)) + return ret == TRUE +} + +// determine if a name corresponds to a sync object +func IsSync(sync uintptr) bool { + ret := C.glowIsSync(gpIsSync, (C.GLsync)(sync)) + return ret == TRUE +} + +// determine if a name corresponds to a texture +func IsTexture(texture uint32) bool { + ret := C.glowIsTexture(gpIsTexture, (C.GLuint)(texture)) + return ret == TRUE +} +func IsTextureHandleResidentARB(handle uint64) bool { + ret := C.glowIsTextureHandleResidentARB(gpIsTextureHandleResidentARB, (C.GLuint64)(handle)) + return ret == TRUE +} +func IsTextureHandleResidentNV(handle uint64) bool { + ret := C.glowIsTextureHandleResidentNV(gpIsTextureHandleResidentNV, (C.GLuint64)(handle)) + return ret == TRUE +} + +// determine if a name corresponds to a transform feedback object +func IsTransformFeedback(id uint32) bool { + ret := C.glowIsTransformFeedback(gpIsTransformFeedback, (C.GLuint)(id)) + return ret == TRUE +} + +// determine if a name corresponds to a vertex array object +func IsVertexArray(array uint32) bool { + ret := C.glowIsVertexArray(gpIsVertexArray, (C.GLuint)(array)) + return ret == TRUE +} +func LabelObjectEXT(xtype uint32, object uint32, length int32, label *uint8) { + C.glowLabelObjectEXT(gpLabelObjectEXT, (C.GLenum)(xtype), (C.GLuint)(object), (C.GLsizei)(length), (*C.GLchar)(unsafe.Pointer(label))) +} + +// specify the width of rasterized lines +func LineWidth(width float32) { + C.glowLineWidth(gpLineWidth, (C.GLfloat)(width)) +} + +// Links a program object +func LinkProgram(program uint32) { + C.glowLinkProgram(gpLinkProgram, (C.GLuint)(program)) +} +func ListDrawCommandsStatesClientNV(list uint32, segment uint32, indirects *unsafe.Pointer, sizes *int32, states *uint32, fbos *uint32, count uint32) { + C.glowListDrawCommandsStatesClientNV(gpListDrawCommandsStatesClientNV, (C.GLuint)(list), (C.GLuint)(segment), indirects, (*C.GLsizei)(unsafe.Pointer(sizes)), (*C.GLuint)(unsafe.Pointer(states)), (*C.GLuint)(unsafe.Pointer(fbos)), (C.GLuint)(count)) +} + +// specify a logical pixel operation for rendering +func LogicOp(opcode uint32) { + C.glowLogicOp(gpLogicOp, (C.GLenum)(opcode)) +} +func MakeBufferNonResidentNV(target uint32) { + C.glowMakeBufferNonResidentNV(gpMakeBufferNonResidentNV, (C.GLenum)(target)) +} +func MakeBufferResidentNV(target uint32, access uint32) { + C.glowMakeBufferResidentNV(gpMakeBufferResidentNV, (C.GLenum)(target), (C.GLenum)(access)) +} +func MakeImageHandleNonResidentARB(handle uint64) { + C.glowMakeImageHandleNonResidentARB(gpMakeImageHandleNonResidentARB, (C.GLuint64)(handle)) +} +func MakeImageHandleNonResidentNV(handle uint64) { + C.glowMakeImageHandleNonResidentNV(gpMakeImageHandleNonResidentNV, (C.GLuint64)(handle)) +} +func MakeImageHandleResidentARB(handle uint64, access uint32) { + C.glowMakeImageHandleResidentARB(gpMakeImageHandleResidentARB, (C.GLuint64)(handle), (C.GLenum)(access)) +} +func MakeImageHandleResidentNV(handle uint64, access uint32) { + C.glowMakeImageHandleResidentNV(gpMakeImageHandleResidentNV, (C.GLuint64)(handle), (C.GLenum)(access)) +} +func MakeNamedBufferNonResidentNV(buffer uint32) { + C.glowMakeNamedBufferNonResidentNV(gpMakeNamedBufferNonResidentNV, (C.GLuint)(buffer)) +} +func MakeNamedBufferResidentNV(buffer uint32, access uint32) { + C.glowMakeNamedBufferResidentNV(gpMakeNamedBufferResidentNV, (C.GLuint)(buffer), (C.GLenum)(access)) +} +func MakeTextureHandleNonResidentARB(handle uint64) { + C.glowMakeTextureHandleNonResidentARB(gpMakeTextureHandleNonResidentARB, (C.GLuint64)(handle)) +} +func MakeTextureHandleNonResidentNV(handle uint64) { + C.glowMakeTextureHandleNonResidentNV(gpMakeTextureHandleNonResidentNV, (C.GLuint64)(handle)) +} +func MakeTextureHandleResidentARB(handle uint64) { + C.glowMakeTextureHandleResidentARB(gpMakeTextureHandleResidentARB, (C.GLuint64)(handle)) +} +func MakeTextureHandleResidentNV(handle uint64) { + C.glowMakeTextureHandleResidentNV(gpMakeTextureHandleResidentNV, (C.GLuint64)(handle)) +} + +// map all of a buffer object's data store into the client's address space +func MapBuffer(target uint32, access uint32) unsafe.Pointer { + ret := C.glowMapBuffer(gpMapBuffer, (C.GLenum)(target), (C.GLenum)(access)) + return (unsafe.Pointer)(ret) +} + +// map all or part of a buffer object's data store into the client's address space +func MapBufferRange(target uint32, offset int, length int, access uint32) unsafe.Pointer { + ret := C.glowMapBufferRange(gpMapBufferRange, (C.GLenum)(target), (C.GLintptr)(offset), (C.GLsizeiptr)(length), (C.GLbitfield)(access)) + return (unsafe.Pointer)(ret) +} + +// map all of a buffer object's data store into the client's address space +func MapNamedBuffer(buffer uint32, access uint32) unsafe.Pointer { + ret := C.glowMapNamedBuffer(gpMapNamedBuffer, (C.GLuint)(buffer), (C.GLenum)(access)) + return (unsafe.Pointer)(ret) +} +func MapNamedBufferEXT(buffer uint32, access uint32) unsafe.Pointer { + ret := C.glowMapNamedBufferEXT(gpMapNamedBufferEXT, (C.GLuint)(buffer), (C.GLenum)(access)) + return (unsafe.Pointer)(ret) +} + +// map all or part of a buffer object's data store into the client's address space +func MapNamedBufferRange(buffer uint32, offset int, length int, access uint32) unsafe.Pointer { + ret := C.glowMapNamedBufferRange(gpMapNamedBufferRange, (C.GLuint)(buffer), (C.GLintptr)(offset), (C.GLsizeiptr)(length), (C.GLbitfield)(access)) + return (unsafe.Pointer)(ret) +} +func MapNamedBufferRangeEXT(buffer uint32, offset int, length int, access uint32) unsafe.Pointer { + ret := C.glowMapNamedBufferRangeEXT(gpMapNamedBufferRangeEXT, (C.GLuint)(buffer), (C.GLintptr)(offset), (C.GLsizeiptr)(length), (C.GLbitfield)(access)) + return (unsafe.Pointer)(ret) +} +func MatrixFrustumEXT(mode uint32, left float64, right float64, bottom float64, top float64, zNear float64, zFar float64) { + C.glowMatrixFrustumEXT(gpMatrixFrustumEXT, (C.GLenum)(mode), (C.GLdouble)(left), (C.GLdouble)(right), (C.GLdouble)(bottom), (C.GLdouble)(top), (C.GLdouble)(zNear), (C.GLdouble)(zFar)) +} +func MatrixLoad3x2fNV(matrixMode uint32, m *float32) { + C.glowMatrixLoad3x2fNV(gpMatrixLoad3x2fNV, (C.GLenum)(matrixMode), (*C.GLfloat)(unsafe.Pointer(m))) +} +func MatrixLoad3x3fNV(matrixMode uint32, m *float32) { + C.glowMatrixLoad3x3fNV(gpMatrixLoad3x3fNV, (C.GLenum)(matrixMode), (*C.GLfloat)(unsafe.Pointer(m))) +} +func MatrixLoadIdentityEXT(mode uint32) { + C.glowMatrixLoadIdentityEXT(gpMatrixLoadIdentityEXT, (C.GLenum)(mode)) +} +func MatrixLoadTranspose3x3fNV(matrixMode uint32, m *float32) { + C.glowMatrixLoadTranspose3x3fNV(gpMatrixLoadTranspose3x3fNV, (C.GLenum)(matrixMode), (*C.GLfloat)(unsafe.Pointer(m))) +} +func MatrixLoadTransposedEXT(mode uint32, m *float64) { + C.glowMatrixLoadTransposedEXT(gpMatrixLoadTransposedEXT, (C.GLenum)(mode), (*C.GLdouble)(unsafe.Pointer(m))) +} +func MatrixLoadTransposefEXT(mode uint32, m *float32) { + C.glowMatrixLoadTransposefEXT(gpMatrixLoadTransposefEXT, (C.GLenum)(mode), (*C.GLfloat)(unsafe.Pointer(m))) +} +func MatrixLoaddEXT(mode uint32, m *float64) { + C.glowMatrixLoaddEXT(gpMatrixLoaddEXT, (C.GLenum)(mode), (*C.GLdouble)(unsafe.Pointer(m))) +} +func MatrixLoadfEXT(mode uint32, m *float32) { + C.glowMatrixLoadfEXT(gpMatrixLoadfEXT, (C.GLenum)(mode), (*C.GLfloat)(unsafe.Pointer(m))) +} +func MatrixMult3x2fNV(matrixMode uint32, m *float32) { + C.glowMatrixMult3x2fNV(gpMatrixMult3x2fNV, (C.GLenum)(matrixMode), (*C.GLfloat)(unsafe.Pointer(m))) +} +func MatrixMult3x3fNV(matrixMode uint32, m *float32) { + C.glowMatrixMult3x3fNV(gpMatrixMult3x3fNV, (C.GLenum)(matrixMode), (*C.GLfloat)(unsafe.Pointer(m))) +} +func MatrixMultTranspose3x3fNV(matrixMode uint32, m *float32) { + C.glowMatrixMultTranspose3x3fNV(gpMatrixMultTranspose3x3fNV, (C.GLenum)(matrixMode), (*C.GLfloat)(unsafe.Pointer(m))) +} +func MatrixMultTransposedEXT(mode uint32, m *float64) { + C.glowMatrixMultTransposedEXT(gpMatrixMultTransposedEXT, (C.GLenum)(mode), (*C.GLdouble)(unsafe.Pointer(m))) +} +func MatrixMultTransposefEXT(mode uint32, m *float32) { + C.glowMatrixMultTransposefEXT(gpMatrixMultTransposefEXT, (C.GLenum)(mode), (*C.GLfloat)(unsafe.Pointer(m))) +} +func MatrixMultdEXT(mode uint32, m *float64) { + C.glowMatrixMultdEXT(gpMatrixMultdEXT, (C.GLenum)(mode), (*C.GLdouble)(unsafe.Pointer(m))) +} +func MatrixMultfEXT(mode uint32, m *float32) { + C.glowMatrixMultfEXT(gpMatrixMultfEXT, (C.GLenum)(mode), (*C.GLfloat)(unsafe.Pointer(m))) +} +func MatrixOrthoEXT(mode uint32, left float64, right float64, bottom float64, top float64, zNear float64, zFar float64) { + C.glowMatrixOrthoEXT(gpMatrixOrthoEXT, (C.GLenum)(mode), (C.GLdouble)(left), (C.GLdouble)(right), (C.GLdouble)(bottom), (C.GLdouble)(top), (C.GLdouble)(zNear), (C.GLdouble)(zFar)) +} +func MatrixPopEXT(mode uint32) { + C.glowMatrixPopEXT(gpMatrixPopEXT, (C.GLenum)(mode)) +} +func MatrixPushEXT(mode uint32) { + C.glowMatrixPushEXT(gpMatrixPushEXT, (C.GLenum)(mode)) +} +func MatrixRotatedEXT(mode uint32, angle float64, x float64, y float64, z float64) { + C.glowMatrixRotatedEXT(gpMatrixRotatedEXT, (C.GLenum)(mode), (C.GLdouble)(angle), (C.GLdouble)(x), (C.GLdouble)(y), (C.GLdouble)(z)) +} +func MatrixRotatefEXT(mode uint32, angle float32, x float32, y float32, z float32) { + C.glowMatrixRotatefEXT(gpMatrixRotatefEXT, (C.GLenum)(mode), (C.GLfloat)(angle), (C.GLfloat)(x), (C.GLfloat)(y), (C.GLfloat)(z)) +} +func MatrixScaledEXT(mode uint32, x float64, y float64, z float64) { + C.glowMatrixScaledEXT(gpMatrixScaledEXT, (C.GLenum)(mode), (C.GLdouble)(x), (C.GLdouble)(y), (C.GLdouble)(z)) +} +func MatrixScalefEXT(mode uint32, x float32, y float32, z float32) { + C.glowMatrixScalefEXT(gpMatrixScalefEXT, (C.GLenum)(mode), (C.GLfloat)(x), (C.GLfloat)(y), (C.GLfloat)(z)) +} +func MatrixTranslatedEXT(mode uint32, x float64, y float64, z float64) { + C.glowMatrixTranslatedEXT(gpMatrixTranslatedEXT, (C.GLenum)(mode), (C.GLdouble)(x), (C.GLdouble)(y), (C.GLdouble)(z)) +} +func MatrixTranslatefEXT(mode uint32, x float32, y float32, z float32) { + C.glowMatrixTranslatefEXT(gpMatrixTranslatefEXT, (C.GLenum)(mode), (C.GLfloat)(x), (C.GLfloat)(y), (C.GLfloat)(z)) +} +func MaxShaderCompilerThreadsARB(count uint32) { + C.glowMaxShaderCompilerThreadsARB(gpMaxShaderCompilerThreadsARB, (C.GLuint)(count)) +} +func MaxShaderCompilerThreadsKHR(count uint32) { + C.glowMaxShaderCompilerThreadsKHR(gpMaxShaderCompilerThreadsKHR, (C.GLuint)(count)) +} + +// defines a barrier ordering memory transactions +func MemoryBarrier(barriers uint32) { + C.glowMemoryBarrier(gpMemoryBarrier, (C.GLbitfield)(barriers)) +} +func MemoryBarrierByRegion(barriers uint32) { + C.glowMemoryBarrierByRegion(gpMemoryBarrierByRegion, (C.GLbitfield)(barriers)) +} + +// specifies minimum rate at which sample shaing takes place +func MinSampleShading(value float32) { + C.glowMinSampleShading(gpMinSampleShading, (C.GLfloat)(value)) +} +func MinSampleShadingARB(value float32) { + C.glowMinSampleShadingARB(gpMinSampleShadingARB, (C.GLfloat)(value)) +} + +// render multiple sets of primitives from array data +func MultiDrawArrays(mode uint32, first *int32, count *int32, drawcount int32) { + C.glowMultiDrawArrays(gpMultiDrawArrays, (C.GLenum)(mode), (*C.GLint)(unsafe.Pointer(first)), (*C.GLsizei)(unsafe.Pointer(count)), (C.GLsizei)(drawcount)) +} + +// render multiple sets of primitives from array data, taking parameters from memory +func MultiDrawArraysIndirect(mode uint32, indirect unsafe.Pointer, drawcount int32, stride int32) { + C.glowMultiDrawArraysIndirect(gpMultiDrawArraysIndirect, (C.GLenum)(mode), indirect, (C.GLsizei)(drawcount), (C.GLsizei)(stride)) +} +func MultiDrawArraysIndirectBindlessCountNV(mode uint32, indirect unsafe.Pointer, drawCount int32, maxDrawCount int32, stride int32, vertexBufferCount int32) { + C.glowMultiDrawArraysIndirectBindlessCountNV(gpMultiDrawArraysIndirectBindlessCountNV, (C.GLenum)(mode), indirect, (C.GLsizei)(drawCount), (C.GLsizei)(maxDrawCount), (C.GLsizei)(stride), (C.GLint)(vertexBufferCount)) +} +func MultiDrawArraysIndirectBindlessNV(mode uint32, indirect unsafe.Pointer, drawCount int32, stride int32, vertexBufferCount int32) { + C.glowMultiDrawArraysIndirectBindlessNV(gpMultiDrawArraysIndirectBindlessNV, (C.GLenum)(mode), indirect, (C.GLsizei)(drawCount), (C.GLsizei)(stride), (C.GLint)(vertexBufferCount)) +} +func MultiDrawArraysIndirectCountARB(mode uint32, indirect unsafe.Pointer, drawcount int, maxdrawcount int32, stride int32) { + C.glowMultiDrawArraysIndirectCountARB(gpMultiDrawArraysIndirectCountARB, (C.GLenum)(mode), indirect, (C.GLintptr)(drawcount), (C.GLsizei)(maxdrawcount), (C.GLsizei)(stride)) +} + +// render multiple sets of primitives by specifying indices of array data elements +func MultiDrawElements(mode uint32, count *int32, xtype uint32, indices *unsafe.Pointer, drawcount int32) { + C.glowMultiDrawElements(gpMultiDrawElements, (C.GLenum)(mode), (*C.GLsizei)(unsafe.Pointer(count)), (C.GLenum)(xtype), indices, (C.GLsizei)(drawcount)) +} + +// render multiple sets of primitives by specifying indices of array data elements and an index to apply to each index +func MultiDrawElementsBaseVertex(mode uint32, count *int32, xtype uint32, indices *unsafe.Pointer, drawcount int32, basevertex *int32) { + C.glowMultiDrawElementsBaseVertex(gpMultiDrawElementsBaseVertex, (C.GLenum)(mode), (*C.GLsizei)(unsafe.Pointer(count)), (C.GLenum)(xtype), indices, (C.GLsizei)(drawcount), (*C.GLint)(unsafe.Pointer(basevertex))) +} + +// render indexed primitives from array data, taking parameters from memory +func MultiDrawElementsIndirect(mode uint32, xtype uint32, indirect unsafe.Pointer, drawcount int32, stride int32) { + C.glowMultiDrawElementsIndirect(gpMultiDrawElementsIndirect, (C.GLenum)(mode), (C.GLenum)(xtype), indirect, (C.GLsizei)(drawcount), (C.GLsizei)(stride)) +} +func MultiDrawElementsIndirectBindlessCountNV(mode uint32, xtype uint32, indirect unsafe.Pointer, drawCount int32, maxDrawCount int32, stride int32, vertexBufferCount int32) { + C.glowMultiDrawElementsIndirectBindlessCountNV(gpMultiDrawElementsIndirectBindlessCountNV, (C.GLenum)(mode), (C.GLenum)(xtype), indirect, (C.GLsizei)(drawCount), (C.GLsizei)(maxDrawCount), (C.GLsizei)(stride), (C.GLint)(vertexBufferCount)) +} +func MultiDrawElementsIndirectBindlessNV(mode uint32, xtype uint32, indirect unsafe.Pointer, drawCount int32, stride int32, vertexBufferCount int32) { + C.glowMultiDrawElementsIndirectBindlessNV(gpMultiDrawElementsIndirectBindlessNV, (C.GLenum)(mode), (C.GLenum)(xtype), indirect, (C.GLsizei)(drawCount), (C.GLsizei)(stride), (C.GLint)(vertexBufferCount)) +} +func MultiDrawElementsIndirectCountARB(mode uint32, xtype uint32, indirect unsafe.Pointer, drawcount int, maxdrawcount int32, stride int32) { + C.glowMultiDrawElementsIndirectCountARB(gpMultiDrawElementsIndirectCountARB, (C.GLenum)(mode), (C.GLenum)(xtype), indirect, (C.GLintptr)(drawcount), (C.GLsizei)(maxdrawcount), (C.GLsizei)(stride)) +} +func MultiTexBufferEXT(texunit uint32, target uint32, internalformat uint32, buffer uint32) { + C.glowMultiTexBufferEXT(gpMultiTexBufferEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLenum)(internalformat), (C.GLuint)(buffer)) +} +func MultiTexCoordPointerEXT(texunit uint32, size int32, xtype uint32, stride int32, pointer unsafe.Pointer) { + C.glowMultiTexCoordPointerEXT(gpMultiTexCoordPointerEXT, (C.GLenum)(texunit), (C.GLint)(size), (C.GLenum)(xtype), (C.GLsizei)(stride), pointer) +} +func MultiTexEnvfEXT(texunit uint32, target uint32, pname uint32, param float32) { + C.glowMultiTexEnvfEXT(gpMultiTexEnvfEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLenum)(pname), (C.GLfloat)(param)) +} +func MultiTexEnvfvEXT(texunit uint32, target uint32, pname uint32, params *float32) { + C.glowMultiTexEnvfvEXT(gpMultiTexEnvfvEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLenum)(pname), (*C.GLfloat)(unsafe.Pointer(params))) +} +func MultiTexEnviEXT(texunit uint32, target uint32, pname uint32, param int32) { + C.glowMultiTexEnviEXT(gpMultiTexEnviEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLenum)(pname), (C.GLint)(param)) +} +func MultiTexEnvivEXT(texunit uint32, target uint32, pname uint32, params *int32) { + C.glowMultiTexEnvivEXT(gpMultiTexEnvivEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func MultiTexGendEXT(texunit uint32, coord uint32, pname uint32, param float64) { + C.glowMultiTexGendEXT(gpMultiTexGendEXT, (C.GLenum)(texunit), (C.GLenum)(coord), (C.GLenum)(pname), (C.GLdouble)(param)) +} +func MultiTexGendvEXT(texunit uint32, coord uint32, pname uint32, params *float64) { + C.glowMultiTexGendvEXT(gpMultiTexGendvEXT, (C.GLenum)(texunit), (C.GLenum)(coord), (C.GLenum)(pname), (*C.GLdouble)(unsafe.Pointer(params))) +} +func MultiTexGenfEXT(texunit uint32, coord uint32, pname uint32, param float32) { + C.glowMultiTexGenfEXT(gpMultiTexGenfEXT, (C.GLenum)(texunit), (C.GLenum)(coord), (C.GLenum)(pname), (C.GLfloat)(param)) +} +func MultiTexGenfvEXT(texunit uint32, coord uint32, pname uint32, params *float32) { + C.glowMultiTexGenfvEXT(gpMultiTexGenfvEXT, (C.GLenum)(texunit), (C.GLenum)(coord), (C.GLenum)(pname), (*C.GLfloat)(unsafe.Pointer(params))) +} +func MultiTexGeniEXT(texunit uint32, coord uint32, pname uint32, param int32) { + C.glowMultiTexGeniEXT(gpMultiTexGeniEXT, (C.GLenum)(texunit), (C.GLenum)(coord), (C.GLenum)(pname), (C.GLint)(param)) +} +func MultiTexGenivEXT(texunit uint32, coord uint32, pname uint32, params *int32) { + C.glowMultiTexGenivEXT(gpMultiTexGenivEXT, (C.GLenum)(texunit), (C.GLenum)(coord), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func MultiTexImage1DEXT(texunit uint32, target uint32, level int32, internalformat int32, width int32, border int32, format uint32, xtype uint32, pixels unsafe.Pointer) { + C.glowMultiTexImage1DEXT(gpMultiTexImage1DEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLint)(level), (C.GLint)(internalformat), (C.GLsizei)(width), (C.GLint)(border), (C.GLenum)(format), (C.GLenum)(xtype), pixels) +} +func MultiTexImage2DEXT(texunit uint32, target uint32, level int32, internalformat int32, width int32, height int32, border int32, format uint32, xtype uint32, pixels unsafe.Pointer) { + C.glowMultiTexImage2DEXT(gpMultiTexImage2DEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLint)(level), (C.GLint)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLint)(border), (C.GLenum)(format), (C.GLenum)(xtype), pixels) +} +func MultiTexImage3DEXT(texunit uint32, target uint32, level int32, internalformat int32, width int32, height int32, depth int32, border int32, format uint32, xtype uint32, pixels unsafe.Pointer) { + C.glowMultiTexImage3DEXT(gpMultiTexImage3DEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLint)(level), (C.GLint)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth), (C.GLint)(border), (C.GLenum)(format), (C.GLenum)(xtype), pixels) +} +func MultiTexParameterIivEXT(texunit uint32, target uint32, pname uint32, params *int32) { + C.glowMultiTexParameterIivEXT(gpMultiTexParameterIivEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func MultiTexParameterIuivEXT(texunit uint32, target uint32, pname uint32, params *uint32) { + C.glowMultiTexParameterIuivEXT(gpMultiTexParameterIuivEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLenum)(pname), (*C.GLuint)(unsafe.Pointer(params))) +} +func MultiTexParameterfEXT(texunit uint32, target uint32, pname uint32, param float32) { + C.glowMultiTexParameterfEXT(gpMultiTexParameterfEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLenum)(pname), (C.GLfloat)(param)) +} +func MultiTexParameterfvEXT(texunit uint32, target uint32, pname uint32, params *float32) { + C.glowMultiTexParameterfvEXT(gpMultiTexParameterfvEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLenum)(pname), (*C.GLfloat)(unsafe.Pointer(params))) +} +func MultiTexParameteriEXT(texunit uint32, target uint32, pname uint32, param int32) { + C.glowMultiTexParameteriEXT(gpMultiTexParameteriEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLenum)(pname), (C.GLint)(param)) +} +func MultiTexParameterivEXT(texunit uint32, target uint32, pname uint32, params *int32) { + C.glowMultiTexParameterivEXT(gpMultiTexParameterivEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func MultiTexRenderbufferEXT(texunit uint32, target uint32, renderbuffer uint32) { + C.glowMultiTexRenderbufferEXT(gpMultiTexRenderbufferEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLuint)(renderbuffer)) +} +func MultiTexSubImage1DEXT(texunit uint32, target uint32, level int32, xoffset int32, width int32, format uint32, xtype uint32, pixels unsafe.Pointer) { + C.glowMultiTexSubImage1DEXT(gpMultiTexSubImage1DEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLsizei)(width), (C.GLenum)(format), (C.GLenum)(xtype), pixels) +} +func MultiTexSubImage2DEXT(texunit uint32, target uint32, level int32, xoffset int32, yoffset int32, width int32, height int32, format uint32, xtype uint32, pixels unsafe.Pointer) { + C.glowMultiTexSubImage2DEXT(gpMultiTexSubImage2DEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLenum)(format), (C.GLenum)(xtype), pixels) +} +func MultiTexSubImage3DEXT(texunit uint32, target uint32, level int32, xoffset int32, yoffset int32, zoffset int32, width int32, height int32, depth int32, format uint32, xtype uint32, pixels unsafe.Pointer) { + C.glowMultiTexSubImage3DEXT(gpMultiTexSubImage3DEXT, (C.GLenum)(texunit), (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLint)(zoffset), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth), (C.GLenum)(format), (C.GLenum)(xtype), pixels) +} + +// creates and initializes a buffer object's data store +func NamedBufferData(buffer uint32, size int, data unsafe.Pointer, usage uint32) { + C.glowNamedBufferData(gpNamedBufferData, (C.GLuint)(buffer), (C.GLsizeiptr)(size), data, (C.GLenum)(usage)) +} +func NamedBufferDataEXT(buffer uint32, size int, data unsafe.Pointer, usage uint32) { + C.glowNamedBufferDataEXT(gpNamedBufferDataEXT, (C.GLuint)(buffer), (C.GLsizeiptr)(size), data, (C.GLenum)(usage)) +} +func NamedBufferPageCommitmentARB(buffer uint32, offset int, size int, commit bool) { + C.glowNamedBufferPageCommitmentARB(gpNamedBufferPageCommitmentARB, (C.GLuint)(buffer), (C.GLintptr)(offset), (C.GLsizeiptr)(size), (C.GLboolean)(boolToInt(commit))) +} +func NamedBufferPageCommitmentEXT(buffer uint32, offset int, size int, commit bool) { + C.glowNamedBufferPageCommitmentEXT(gpNamedBufferPageCommitmentEXT, (C.GLuint)(buffer), (C.GLintptr)(offset), (C.GLsizeiptr)(size), (C.GLboolean)(boolToInt(commit))) +} + +// creates and initializes a buffer object's immutable data store +func NamedBufferStorage(buffer uint32, size int, data unsafe.Pointer, flags uint32) { + C.glowNamedBufferStorage(gpNamedBufferStorage, (C.GLuint)(buffer), (C.GLsizeiptr)(size), data, (C.GLbitfield)(flags)) +} +func NamedBufferStorageEXT(buffer uint32, size int, data unsafe.Pointer, flags uint32) { + C.glowNamedBufferStorageEXT(gpNamedBufferStorageEXT, (C.GLuint)(buffer), (C.GLsizeiptr)(size), data, (C.GLbitfield)(flags)) +} + +// updates a subset of a buffer object's data store +func NamedBufferSubData(buffer uint32, offset int, size int, data unsafe.Pointer) { + C.glowNamedBufferSubData(gpNamedBufferSubData, (C.GLuint)(buffer), (C.GLintptr)(offset), (C.GLsizeiptr)(size), data) +} +func NamedBufferSubDataEXT(buffer uint32, offset int, size int, data unsafe.Pointer) { + C.glowNamedBufferSubDataEXT(gpNamedBufferSubDataEXT, (C.GLuint)(buffer), (C.GLintptr)(offset), (C.GLsizeiptr)(size), data) +} +func NamedCopyBufferSubDataEXT(readBuffer uint32, writeBuffer uint32, readOffset int, writeOffset int, size int) { + C.glowNamedCopyBufferSubDataEXT(gpNamedCopyBufferSubDataEXT, (C.GLuint)(readBuffer), (C.GLuint)(writeBuffer), (C.GLintptr)(readOffset), (C.GLintptr)(writeOffset), (C.GLsizeiptr)(size)) +} + +// specify which color buffers are to be drawn into +func NamedFramebufferDrawBuffer(framebuffer uint32, buf uint32) { + C.glowNamedFramebufferDrawBuffer(gpNamedFramebufferDrawBuffer, (C.GLuint)(framebuffer), (C.GLenum)(buf)) +} + +// Specifies a list of color buffers to be drawn into +func NamedFramebufferDrawBuffers(framebuffer uint32, n int32, bufs *uint32) { + C.glowNamedFramebufferDrawBuffers(gpNamedFramebufferDrawBuffers, (C.GLuint)(framebuffer), (C.GLsizei)(n), (*C.GLenum)(unsafe.Pointer(bufs))) +} + +// set a named parameter of a framebuffer object +func NamedFramebufferParameteri(framebuffer uint32, pname uint32, param int32) { + C.glowNamedFramebufferParameteri(gpNamedFramebufferParameteri, (C.GLuint)(framebuffer), (C.GLenum)(pname), (C.GLint)(param)) +} +func NamedFramebufferParameteriEXT(framebuffer uint32, pname uint32, param int32) { + C.glowNamedFramebufferParameteriEXT(gpNamedFramebufferParameteriEXT, (C.GLuint)(framebuffer), (C.GLenum)(pname), (C.GLint)(param)) +} + +// select a color buffer source for pixels +func NamedFramebufferReadBuffer(framebuffer uint32, src uint32) { + C.glowNamedFramebufferReadBuffer(gpNamedFramebufferReadBuffer, (C.GLuint)(framebuffer), (C.GLenum)(src)) +} + +// attach a renderbuffer as a logical buffer of a framebuffer object +func NamedFramebufferRenderbuffer(framebuffer uint32, attachment uint32, renderbuffertarget uint32, renderbuffer uint32) { + C.glowNamedFramebufferRenderbuffer(gpNamedFramebufferRenderbuffer, (C.GLuint)(framebuffer), (C.GLenum)(attachment), (C.GLenum)(renderbuffertarget), (C.GLuint)(renderbuffer)) +} +func NamedFramebufferRenderbufferEXT(framebuffer uint32, attachment uint32, renderbuffertarget uint32, renderbuffer uint32) { + C.glowNamedFramebufferRenderbufferEXT(gpNamedFramebufferRenderbufferEXT, (C.GLuint)(framebuffer), (C.GLenum)(attachment), (C.GLenum)(renderbuffertarget), (C.GLuint)(renderbuffer)) +} +func NamedFramebufferSampleLocationsfvARB(framebuffer uint32, start uint32, count int32, v *float32) { + C.glowNamedFramebufferSampleLocationsfvARB(gpNamedFramebufferSampleLocationsfvARB, (C.GLuint)(framebuffer), (C.GLuint)(start), (C.GLsizei)(count), (*C.GLfloat)(unsafe.Pointer(v))) +} +func NamedFramebufferSampleLocationsfvNV(framebuffer uint32, start uint32, count int32, v *float32) { + C.glowNamedFramebufferSampleLocationsfvNV(gpNamedFramebufferSampleLocationsfvNV, (C.GLuint)(framebuffer), (C.GLuint)(start), (C.GLsizei)(count), (*C.GLfloat)(unsafe.Pointer(v))) +} +func NamedFramebufferTexture(framebuffer uint32, attachment uint32, texture uint32, level int32) { + C.glowNamedFramebufferTexture(gpNamedFramebufferTexture, (C.GLuint)(framebuffer), (C.GLenum)(attachment), (C.GLuint)(texture), (C.GLint)(level)) +} +func NamedFramebufferTexture1DEXT(framebuffer uint32, attachment uint32, textarget uint32, texture uint32, level int32) { + C.glowNamedFramebufferTexture1DEXT(gpNamedFramebufferTexture1DEXT, (C.GLuint)(framebuffer), (C.GLenum)(attachment), (C.GLenum)(textarget), (C.GLuint)(texture), (C.GLint)(level)) +} +func NamedFramebufferTexture2DEXT(framebuffer uint32, attachment uint32, textarget uint32, texture uint32, level int32) { + C.glowNamedFramebufferTexture2DEXT(gpNamedFramebufferTexture2DEXT, (C.GLuint)(framebuffer), (C.GLenum)(attachment), (C.GLenum)(textarget), (C.GLuint)(texture), (C.GLint)(level)) +} +func NamedFramebufferTexture3DEXT(framebuffer uint32, attachment uint32, textarget uint32, texture uint32, level int32, zoffset int32) { + C.glowNamedFramebufferTexture3DEXT(gpNamedFramebufferTexture3DEXT, (C.GLuint)(framebuffer), (C.GLenum)(attachment), (C.GLenum)(textarget), (C.GLuint)(texture), (C.GLint)(level), (C.GLint)(zoffset)) +} +func NamedFramebufferTextureEXT(framebuffer uint32, attachment uint32, texture uint32, level int32) { + C.glowNamedFramebufferTextureEXT(gpNamedFramebufferTextureEXT, (C.GLuint)(framebuffer), (C.GLenum)(attachment), (C.GLuint)(texture), (C.GLint)(level)) +} +func NamedFramebufferTextureFaceEXT(framebuffer uint32, attachment uint32, texture uint32, level int32, face uint32) { + C.glowNamedFramebufferTextureFaceEXT(gpNamedFramebufferTextureFaceEXT, (C.GLuint)(framebuffer), (C.GLenum)(attachment), (C.GLuint)(texture), (C.GLint)(level), (C.GLenum)(face)) +} + +// attach a single layer of a texture object as a logical buffer of a framebuffer object +func NamedFramebufferTextureLayer(framebuffer uint32, attachment uint32, texture uint32, level int32, layer int32) { + C.glowNamedFramebufferTextureLayer(gpNamedFramebufferTextureLayer, (C.GLuint)(framebuffer), (C.GLenum)(attachment), (C.GLuint)(texture), (C.GLint)(level), (C.GLint)(layer)) +} +func NamedFramebufferTextureLayerEXT(framebuffer uint32, attachment uint32, texture uint32, level int32, layer int32) { + C.glowNamedFramebufferTextureLayerEXT(gpNamedFramebufferTextureLayerEXT, (C.GLuint)(framebuffer), (C.GLenum)(attachment), (C.GLuint)(texture), (C.GLint)(level), (C.GLint)(layer)) +} +func NamedProgramLocalParameter4dEXT(program uint32, target uint32, index uint32, x float64, y float64, z float64, w float64) { + C.glowNamedProgramLocalParameter4dEXT(gpNamedProgramLocalParameter4dEXT, (C.GLuint)(program), (C.GLenum)(target), (C.GLuint)(index), (C.GLdouble)(x), (C.GLdouble)(y), (C.GLdouble)(z), (C.GLdouble)(w)) +} +func NamedProgramLocalParameter4dvEXT(program uint32, target uint32, index uint32, params *float64) { + C.glowNamedProgramLocalParameter4dvEXT(gpNamedProgramLocalParameter4dvEXT, (C.GLuint)(program), (C.GLenum)(target), (C.GLuint)(index), (*C.GLdouble)(unsafe.Pointer(params))) +} +func NamedProgramLocalParameter4fEXT(program uint32, target uint32, index uint32, x float32, y float32, z float32, w float32) { + C.glowNamedProgramLocalParameter4fEXT(gpNamedProgramLocalParameter4fEXT, (C.GLuint)(program), (C.GLenum)(target), (C.GLuint)(index), (C.GLfloat)(x), (C.GLfloat)(y), (C.GLfloat)(z), (C.GLfloat)(w)) +} +func NamedProgramLocalParameter4fvEXT(program uint32, target uint32, index uint32, params *float32) { + C.glowNamedProgramLocalParameter4fvEXT(gpNamedProgramLocalParameter4fvEXT, (C.GLuint)(program), (C.GLenum)(target), (C.GLuint)(index), (*C.GLfloat)(unsafe.Pointer(params))) +} +func NamedProgramLocalParameterI4iEXT(program uint32, target uint32, index uint32, x int32, y int32, z int32, w int32) { + C.glowNamedProgramLocalParameterI4iEXT(gpNamedProgramLocalParameterI4iEXT, (C.GLuint)(program), (C.GLenum)(target), (C.GLuint)(index), (C.GLint)(x), (C.GLint)(y), (C.GLint)(z), (C.GLint)(w)) +} +func NamedProgramLocalParameterI4ivEXT(program uint32, target uint32, index uint32, params *int32) { + C.glowNamedProgramLocalParameterI4ivEXT(gpNamedProgramLocalParameterI4ivEXT, (C.GLuint)(program), (C.GLenum)(target), (C.GLuint)(index), (*C.GLint)(unsafe.Pointer(params))) +} +func NamedProgramLocalParameterI4uiEXT(program uint32, target uint32, index uint32, x uint32, y uint32, z uint32, w uint32) { + C.glowNamedProgramLocalParameterI4uiEXT(gpNamedProgramLocalParameterI4uiEXT, (C.GLuint)(program), (C.GLenum)(target), (C.GLuint)(index), (C.GLuint)(x), (C.GLuint)(y), (C.GLuint)(z), (C.GLuint)(w)) +} +func NamedProgramLocalParameterI4uivEXT(program uint32, target uint32, index uint32, params *uint32) { + C.glowNamedProgramLocalParameterI4uivEXT(gpNamedProgramLocalParameterI4uivEXT, (C.GLuint)(program), (C.GLenum)(target), (C.GLuint)(index), (*C.GLuint)(unsafe.Pointer(params))) +} +func NamedProgramLocalParameters4fvEXT(program uint32, target uint32, index uint32, count int32, params *float32) { + C.glowNamedProgramLocalParameters4fvEXT(gpNamedProgramLocalParameters4fvEXT, (C.GLuint)(program), (C.GLenum)(target), (C.GLuint)(index), (C.GLsizei)(count), (*C.GLfloat)(unsafe.Pointer(params))) +} +func NamedProgramLocalParametersI4ivEXT(program uint32, target uint32, index uint32, count int32, params *int32) { + C.glowNamedProgramLocalParametersI4ivEXT(gpNamedProgramLocalParametersI4ivEXT, (C.GLuint)(program), (C.GLenum)(target), (C.GLuint)(index), (C.GLsizei)(count), (*C.GLint)(unsafe.Pointer(params))) +} +func NamedProgramLocalParametersI4uivEXT(program uint32, target uint32, index uint32, count int32, params *uint32) { + C.glowNamedProgramLocalParametersI4uivEXT(gpNamedProgramLocalParametersI4uivEXT, (C.GLuint)(program), (C.GLenum)(target), (C.GLuint)(index), (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(params))) +} +func NamedProgramStringEXT(program uint32, target uint32, format uint32, len int32, xstring unsafe.Pointer) { + C.glowNamedProgramStringEXT(gpNamedProgramStringEXT, (C.GLuint)(program), (C.GLenum)(target), (C.GLenum)(format), (C.GLsizei)(len), xstring) +} + +// establish data storage, format and dimensions of a renderbuffer object's image +func NamedRenderbufferStorage(renderbuffer uint32, internalformat uint32, width int32, height int32) { + C.glowNamedRenderbufferStorage(gpNamedRenderbufferStorage, (C.GLuint)(renderbuffer), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height)) +} +func NamedRenderbufferStorageEXT(renderbuffer uint32, internalformat uint32, width int32, height int32) { + C.glowNamedRenderbufferStorageEXT(gpNamedRenderbufferStorageEXT, (C.GLuint)(renderbuffer), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height)) +} + +// establish data storage, format, dimensions and sample count of a renderbuffer object's image +func NamedRenderbufferStorageMultisample(renderbuffer uint32, samples int32, internalformat uint32, width int32, height int32) { + C.glowNamedRenderbufferStorageMultisample(gpNamedRenderbufferStorageMultisample, (C.GLuint)(renderbuffer), (C.GLsizei)(samples), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height)) +} +func NamedRenderbufferStorageMultisampleCoverageEXT(renderbuffer uint32, coverageSamples int32, colorSamples int32, internalformat uint32, width int32, height int32) { + C.glowNamedRenderbufferStorageMultisampleCoverageEXT(gpNamedRenderbufferStorageMultisampleCoverageEXT, (C.GLuint)(renderbuffer), (C.GLsizei)(coverageSamples), (C.GLsizei)(colorSamples), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height)) +} +func NamedRenderbufferStorageMultisampleEXT(renderbuffer uint32, samples int32, internalformat uint32, width int32, height int32) { + C.glowNamedRenderbufferStorageMultisampleEXT(gpNamedRenderbufferStorageMultisampleEXT, (C.GLuint)(renderbuffer), (C.GLsizei)(samples), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height)) +} +func NamedStringARB(xtype uint32, namelen int32, name *uint8, stringlen int32, xstring *uint8) { + C.glowNamedStringARB(gpNamedStringARB, (C.GLenum)(xtype), (C.GLint)(namelen), (*C.GLchar)(unsafe.Pointer(name)), (C.GLint)(stringlen), (*C.GLchar)(unsafe.Pointer(xstring))) +} +func NormalFormatNV(xtype uint32, stride int32) { + C.glowNormalFormatNV(gpNormalFormatNV, (C.GLenum)(xtype), (C.GLsizei)(stride)) +} + +// label a named object identified within a namespace +func ObjectLabel(identifier uint32, name uint32, length int32, label *uint8) { + C.glowObjectLabel(gpObjectLabel, (C.GLenum)(identifier), (C.GLuint)(name), (C.GLsizei)(length), (*C.GLchar)(unsafe.Pointer(label))) +} +func ObjectLabelKHR(identifier uint32, name uint32, length int32, label *uint8) { + C.glowObjectLabelKHR(gpObjectLabelKHR, (C.GLenum)(identifier), (C.GLuint)(name), (C.GLsizei)(length), (*C.GLchar)(unsafe.Pointer(label))) +} + +// label a a sync object identified by a pointer +func ObjectPtrLabel(ptr unsafe.Pointer, length int32, label *uint8) { + C.glowObjectPtrLabel(gpObjectPtrLabel, ptr, (C.GLsizei)(length), (*C.GLchar)(unsafe.Pointer(label))) +} +func ObjectPtrLabelKHR(ptr unsafe.Pointer, length int32, label *uint8) { + C.glowObjectPtrLabelKHR(gpObjectPtrLabelKHR, ptr, (C.GLsizei)(length), (*C.GLchar)(unsafe.Pointer(label))) +} +func PatchParameterfv(pname uint32, values *float32) { + C.glowPatchParameterfv(gpPatchParameterfv, (C.GLenum)(pname), (*C.GLfloat)(unsafe.Pointer(values))) +} + +// specifies the parameters for patch primitives +func PatchParameteri(pname uint32, value int32) { + C.glowPatchParameteri(gpPatchParameteri, (C.GLenum)(pname), (C.GLint)(value)) +} +func PathCommandsNV(path uint32, numCommands int32, commands *uint8, numCoords int32, coordType uint32, coords unsafe.Pointer) { + C.glowPathCommandsNV(gpPathCommandsNV, (C.GLuint)(path), (C.GLsizei)(numCommands), (*C.GLubyte)(unsafe.Pointer(commands)), (C.GLsizei)(numCoords), (C.GLenum)(coordType), coords) +} +func PathCoordsNV(path uint32, numCoords int32, coordType uint32, coords unsafe.Pointer) { + C.glowPathCoordsNV(gpPathCoordsNV, (C.GLuint)(path), (C.GLsizei)(numCoords), (C.GLenum)(coordType), coords) +} +func PathCoverDepthFuncNV(xfunc uint32) { + C.glowPathCoverDepthFuncNV(gpPathCoverDepthFuncNV, (C.GLenum)(xfunc)) +} +func PathDashArrayNV(path uint32, dashCount int32, dashArray *float32) { + C.glowPathDashArrayNV(gpPathDashArrayNV, (C.GLuint)(path), (C.GLsizei)(dashCount), (*C.GLfloat)(unsafe.Pointer(dashArray))) +} +func PathGlyphIndexArrayNV(firstPathName uint32, fontTarget uint32, fontName unsafe.Pointer, fontStyle uint32, firstGlyphIndex uint32, numGlyphs int32, pathParameterTemplate uint32, emScale float32) uint32 { + ret := C.glowPathGlyphIndexArrayNV(gpPathGlyphIndexArrayNV, (C.GLuint)(firstPathName), (C.GLenum)(fontTarget), fontName, (C.GLbitfield)(fontStyle), (C.GLuint)(firstGlyphIndex), (C.GLsizei)(numGlyphs), (C.GLuint)(pathParameterTemplate), (C.GLfloat)(emScale)) + return (uint32)(ret) +} +func PathGlyphIndexRangeNV(fontTarget uint32, fontName unsafe.Pointer, fontStyle uint32, pathParameterTemplate uint32, emScale float32, baseAndCount *uint32) uint32 { + ret := C.glowPathGlyphIndexRangeNV(gpPathGlyphIndexRangeNV, (C.GLenum)(fontTarget), fontName, (C.GLbitfield)(fontStyle), (C.GLuint)(pathParameterTemplate), (C.GLfloat)(emScale), (*C.GLuint)(unsafe.Pointer(baseAndCount))) + return (uint32)(ret) +} +func PathGlyphRangeNV(firstPathName uint32, fontTarget uint32, fontName unsafe.Pointer, fontStyle uint32, firstGlyph uint32, numGlyphs int32, handleMissingGlyphs uint32, pathParameterTemplate uint32, emScale float32) { + C.glowPathGlyphRangeNV(gpPathGlyphRangeNV, (C.GLuint)(firstPathName), (C.GLenum)(fontTarget), fontName, (C.GLbitfield)(fontStyle), (C.GLuint)(firstGlyph), (C.GLsizei)(numGlyphs), (C.GLenum)(handleMissingGlyphs), (C.GLuint)(pathParameterTemplate), (C.GLfloat)(emScale)) +} +func PathGlyphsNV(firstPathName uint32, fontTarget uint32, fontName unsafe.Pointer, fontStyle uint32, numGlyphs int32, xtype uint32, charcodes unsafe.Pointer, handleMissingGlyphs uint32, pathParameterTemplate uint32, emScale float32) { + C.glowPathGlyphsNV(gpPathGlyphsNV, (C.GLuint)(firstPathName), (C.GLenum)(fontTarget), fontName, (C.GLbitfield)(fontStyle), (C.GLsizei)(numGlyphs), (C.GLenum)(xtype), charcodes, (C.GLenum)(handleMissingGlyphs), (C.GLuint)(pathParameterTemplate), (C.GLfloat)(emScale)) +} +func PathMemoryGlyphIndexArrayNV(firstPathName uint32, fontTarget uint32, fontSize int, fontData unsafe.Pointer, faceIndex int32, firstGlyphIndex uint32, numGlyphs int32, pathParameterTemplate uint32, emScale float32) uint32 { + ret := C.glowPathMemoryGlyphIndexArrayNV(gpPathMemoryGlyphIndexArrayNV, (C.GLuint)(firstPathName), (C.GLenum)(fontTarget), (C.GLsizeiptr)(fontSize), fontData, (C.GLsizei)(faceIndex), (C.GLuint)(firstGlyphIndex), (C.GLsizei)(numGlyphs), (C.GLuint)(pathParameterTemplate), (C.GLfloat)(emScale)) + return (uint32)(ret) +} +func PathParameterfNV(path uint32, pname uint32, value float32) { + C.glowPathParameterfNV(gpPathParameterfNV, (C.GLuint)(path), (C.GLenum)(pname), (C.GLfloat)(value)) +} +func PathParameterfvNV(path uint32, pname uint32, value *float32) { + C.glowPathParameterfvNV(gpPathParameterfvNV, (C.GLuint)(path), (C.GLenum)(pname), (*C.GLfloat)(unsafe.Pointer(value))) +} +func PathParameteriNV(path uint32, pname uint32, value int32) { + C.glowPathParameteriNV(gpPathParameteriNV, (C.GLuint)(path), (C.GLenum)(pname), (C.GLint)(value)) +} +func PathParameterivNV(path uint32, pname uint32, value *int32) { + C.glowPathParameterivNV(gpPathParameterivNV, (C.GLuint)(path), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(value))) +} +func PathStencilDepthOffsetNV(factor float32, units float32) { + C.glowPathStencilDepthOffsetNV(gpPathStencilDepthOffsetNV, (C.GLfloat)(factor), (C.GLfloat)(units)) +} +func PathStencilFuncNV(xfunc uint32, ref int32, mask uint32) { + C.glowPathStencilFuncNV(gpPathStencilFuncNV, (C.GLenum)(xfunc), (C.GLint)(ref), (C.GLuint)(mask)) +} +func PathStringNV(path uint32, format uint32, length int32, pathString unsafe.Pointer) { + C.glowPathStringNV(gpPathStringNV, (C.GLuint)(path), (C.GLenum)(format), (C.GLsizei)(length), pathString) +} +func PathSubCommandsNV(path uint32, commandStart int32, commandsToDelete int32, numCommands int32, commands *uint8, numCoords int32, coordType uint32, coords unsafe.Pointer) { + C.glowPathSubCommandsNV(gpPathSubCommandsNV, (C.GLuint)(path), (C.GLsizei)(commandStart), (C.GLsizei)(commandsToDelete), (C.GLsizei)(numCommands), (*C.GLubyte)(unsafe.Pointer(commands)), (C.GLsizei)(numCoords), (C.GLenum)(coordType), coords) +} +func PathSubCoordsNV(path uint32, coordStart int32, numCoords int32, coordType uint32, coords unsafe.Pointer) { + C.glowPathSubCoordsNV(gpPathSubCoordsNV, (C.GLuint)(path), (C.GLsizei)(coordStart), (C.GLsizei)(numCoords), (C.GLenum)(coordType), coords) +} + +// pause transform feedback operations +func PauseTransformFeedback() { + C.glowPauseTransformFeedback(gpPauseTransformFeedback) +} +func PixelStoref(pname uint32, param float32) { + C.glowPixelStoref(gpPixelStoref, (C.GLenum)(pname), (C.GLfloat)(param)) +} + +// set pixel storage modes +func PixelStorei(pname uint32, param int32) { + C.glowPixelStorei(gpPixelStorei, (C.GLenum)(pname), (C.GLint)(param)) +} +func PointAlongPathNV(path uint32, startSegment int32, numSegments int32, distance float32, x *float32, y *float32, tangentX *float32, tangentY *float32) bool { + ret := C.glowPointAlongPathNV(gpPointAlongPathNV, (C.GLuint)(path), (C.GLsizei)(startSegment), (C.GLsizei)(numSegments), (C.GLfloat)(distance), (*C.GLfloat)(unsafe.Pointer(x)), (*C.GLfloat)(unsafe.Pointer(y)), (*C.GLfloat)(unsafe.Pointer(tangentX)), (*C.GLfloat)(unsafe.Pointer(tangentY))) + return ret == TRUE +} +func PointParameterf(pname uint32, param float32) { + C.glowPointParameterf(gpPointParameterf, (C.GLenum)(pname), (C.GLfloat)(param)) +} +func PointParameterfv(pname uint32, params *float32) { + C.glowPointParameterfv(gpPointParameterfv, (C.GLenum)(pname), (*C.GLfloat)(unsafe.Pointer(params))) +} +func PointParameteri(pname uint32, param int32) { + C.glowPointParameteri(gpPointParameteri, (C.GLenum)(pname), (C.GLint)(param)) +} +func PointParameteriv(pname uint32, params *int32) { + C.glowPointParameteriv(gpPointParameteriv, (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} + +// specify the diameter of rasterized points +func PointSize(size float32) { + C.glowPointSize(gpPointSize, (C.GLfloat)(size)) +} + +// select a polygon rasterization mode +func PolygonMode(face uint32, mode uint32) { + C.glowPolygonMode(gpPolygonMode, (C.GLenum)(face), (C.GLenum)(mode)) +} + +// set the scale and units used to calculate depth values +func PolygonOffset(factor float32, units float32) { + C.glowPolygonOffset(gpPolygonOffset, (C.GLfloat)(factor), (C.GLfloat)(units)) +} +func PolygonOffsetClamp(factor float32, units float32, clamp float32) { + C.glowPolygonOffsetClamp(gpPolygonOffsetClamp, (C.GLfloat)(factor), (C.GLfloat)(units), (C.GLfloat)(clamp)) +} +func PolygonOffsetClampEXT(factor float32, units float32, clamp float32) { + C.glowPolygonOffsetClampEXT(gpPolygonOffsetClampEXT, (C.GLfloat)(factor), (C.GLfloat)(units), (C.GLfloat)(clamp)) +} + +// pop the active debug group +func PopDebugGroup() { + C.glowPopDebugGroup(gpPopDebugGroup) +} +func PopDebugGroupKHR() { + C.glowPopDebugGroupKHR(gpPopDebugGroupKHR) +} +func PopGroupMarkerEXT() { + C.glowPopGroupMarkerEXT(gpPopGroupMarkerEXT) +} +func PrimitiveBoundingBoxARB(minX float32, minY float32, minZ float32, minW float32, maxX float32, maxY float32, maxZ float32, maxW float32) { + C.glowPrimitiveBoundingBoxARB(gpPrimitiveBoundingBoxARB, (C.GLfloat)(minX), (C.GLfloat)(minY), (C.GLfloat)(minZ), (C.GLfloat)(minW), (C.GLfloat)(maxX), (C.GLfloat)(maxY), (C.GLfloat)(maxZ), (C.GLfloat)(maxW)) +} + +// specify the primitive restart index +func PrimitiveRestartIndex(index uint32) { + C.glowPrimitiveRestartIndex(gpPrimitiveRestartIndex, (C.GLuint)(index)) +} + +// load a program object with a program binary +func ProgramBinary(program uint32, binaryFormat uint32, binary unsafe.Pointer, length int32) { + C.glowProgramBinary(gpProgramBinary, (C.GLuint)(program), (C.GLenum)(binaryFormat), binary, (C.GLsizei)(length)) +} + +// specify a parameter for a program object +func ProgramParameteri(program uint32, pname uint32, value int32) { + C.glowProgramParameteri(gpProgramParameteri, (C.GLuint)(program), (C.GLenum)(pname), (C.GLint)(value)) +} +func ProgramParameteriARB(program uint32, pname uint32, value int32) { + C.glowProgramParameteriARB(gpProgramParameteriARB, (C.GLuint)(program), (C.GLenum)(pname), (C.GLint)(value)) +} +func ProgramParameteriEXT(program uint32, pname uint32, value int32) { + C.glowProgramParameteriEXT(gpProgramParameteriEXT, (C.GLuint)(program), (C.GLenum)(pname), (C.GLint)(value)) +} +func ProgramPathFragmentInputGenNV(program uint32, location int32, genMode uint32, components int32, coeffs *float32) { + C.glowProgramPathFragmentInputGenNV(gpProgramPathFragmentInputGenNV, (C.GLuint)(program), (C.GLint)(location), (C.GLenum)(genMode), (C.GLint)(components), (*C.GLfloat)(unsafe.Pointer(coeffs))) +} +func ProgramUniform1d(program uint32, location int32, v0 float64) { + C.glowProgramUniform1d(gpProgramUniform1d, (C.GLuint)(program), (C.GLint)(location), (C.GLdouble)(v0)) +} +func ProgramUniform1dEXT(program uint32, location int32, x float64) { + C.glowProgramUniform1dEXT(gpProgramUniform1dEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLdouble)(x)) +} +func ProgramUniform1dv(program uint32, location int32, count int32, value *float64) { + C.glowProgramUniform1dv(gpProgramUniform1dv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLdouble)(unsafe.Pointer(value))) +} +func ProgramUniform1dvEXT(program uint32, location int32, count int32, value *float64) { + C.glowProgramUniform1dvEXT(gpProgramUniform1dvEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLdouble)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniform1f(program uint32, location int32, v0 float32) { + C.glowProgramUniform1f(gpProgramUniform1f, (C.GLuint)(program), (C.GLint)(location), (C.GLfloat)(v0)) +} +func ProgramUniform1fEXT(program uint32, location int32, v0 float32) { + C.glowProgramUniform1fEXT(gpProgramUniform1fEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLfloat)(v0)) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniform1fv(program uint32, location int32, count int32, value *float32) { + C.glowProgramUniform1fv(gpProgramUniform1fv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLfloat)(unsafe.Pointer(value))) +} +func ProgramUniform1fvEXT(program uint32, location int32, count int32, value *float32) { + C.glowProgramUniform1fvEXT(gpProgramUniform1fvEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLfloat)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniform1i(program uint32, location int32, v0 int32) { + C.glowProgramUniform1i(gpProgramUniform1i, (C.GLuint)(program), (C.GLint)(location), (C.GLint)(v0)) +} +func ProgramUniform1i64ARB(program uint32, location int32, x int64) { + C.glowProgramUniform1i64ARB(gpProgramUniform1i64ARB, (C.GLuint)(program), (C.GLint)(location), (C.GLint64)(x)) +} +func ProgramUniform1i64NV(program uint32, location int32, x int64) { + C.glowProgramUniform1i64NV(gpProgramUniform1i64NV, (C.GLuint)(program), (C.GLint)(location), (C.GLint64EXT)(x)) +} +func ProgramUniform1i64vARB(program uint32, location int32, count int32, value *int64) { + C.glowProgramUniform1i64vARB(gpProgramUniform1i64vARB, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLint64)(unsafe.Pointer(value))) +} +func ProgramUniform1i64vNV(program uint32, location int32, count int32, value *int64) { + C.glowProgramUniform1i64vNV(gpProgramUniform1i64vNV, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLint64EXT)(unsafe.Pointer(value))) +} +func ProgramUniform1iEXT(program uint32, location int32, v0 int32) { + C.glowProgramUniform1iEXT(gpProgramUniform1iEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLint)(v0)) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniform1iv(program uint32, location int32, count int32, value *int32) { + C.glowProgramUniform1iv(gpProgramUniform1iv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLint)(unsafe.Pointer(value))) +} +func ProgramUniform1ivEXT(program uint32, location int32, count int32, value *int32) { + C.glowProgramUniform1ivEXT(gpProgramUniform1ivEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLint)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniform1ui(program uint32, location int32, v0 uint32) { + C.glowProgramUniform1ui(gpProgramUniform1ui, (C.GLuint)(program), (C.GLint)(location), (C.GLuint)(v0)) +} +func ProgramUniform1ui64ARB(program uint32, location int32, x uint64) { + C.glowProgramUniform1ui64ARB(gpProgramUniform1ui64ARB, (C.GLuint)(program), (C.GLint)(location), (C.GLuint64)(x)) +} +func ProgramUniform1ui64NV(program uint32, location int32, x uint64) { + C.glowProgramUniform1ui64NV(gpProgramUniform1ui64NV, (C.GLuint)(program), (C.GLint)(location), (C.GLuint64EXT)(x)) +} +func ProgramUniform1ui64vARB(program uint32, location int32, count int32, value *uint64) { + C.glowProgramUniform1ui64vARB(gpProgramUniform1ui64vARB, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint64)(unsafe.Pointer(value))) +} +func ProgramUniform1ui64vNV(program uint32, location int32, count int32, value *uint64) { + C.glowProgramUniform1ui64vNV(gpProgramUniform1ui64vNV, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint64EXT)(unsafe.Pointer(value))) +} +func ProgramUniform1uiEXT(program uint32, location int32, v0 uint32) { + C.glowProgramUniform1uiEXT(gpProgramUniform1uiEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLuint)(v0)) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniform1uiv(program uint32, location int32, count int32, value *uint32) { + C.glowProgramUniform1uiv(gpProgramUniform1uiv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(value))) +} +func ProgramUniform1uivEXT(program uint32, location int32, count int32, value *uint32) { + C.glowProgramUniform1uivEXT(gpProgramUniform1uivEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(value))) +} +func ProgramUniform2d(program uint32, location int32, v0 float64, v1 float64) { + C.glowProgramUniform2d(gpProgramUniform2d, (C.GLuint)(program), (C.GLint)(location), (C.GLdouble)(v0), (C.GLdouble)(v1)) +} +func ProgramUniform2dEXT(program uint32, location int32, x float64, y float64) { + C.glowProgramUniform2dEXT(gpProgramUniform2dEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLdouble)(x), (C.GLdouble)(y)) +} +func ProgramUniform2dv(program uint32, location int32, count int32, value *float64) { + C.glowProgramUniform2dv(gpProgramUniform2dv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLdouble)(unsafe.Pointer(value))) +} +func ProgramUniform2dvEXT(program uint32, location int32, count int32, value *float64) { + C.glowProgramUniform2dvEXT(gpProgramUniform2dvEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLdouble)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniform2f(program uint32, location int32, v0 float32, v1 float32) { + C.glowProgramUniform2f(gpProgramUniform2f, (C.GLuint)(program), (C.GLint)(location), (C.GLfloat)(v0), (C.GLfloat)(v1)) +} +func ProgramUniform2fEXT(program uint32, location int32, v0 float32, v1 float32) { + C.glowProgramUniform2fEXT(gpProgramUniform2fEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLfloat)(v0), (C.GLfloat)(v1)) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniform2fv(program uint32, location int32, count int32, value *float32) { + C.glowProgramUniform2fv(gpProgramUniform2fv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLfloat)(unsafe.Pointer(value))) +} +func ProgramUniform2fvEXT(program uint32, location int32, count int32, value *float32) { + C.glowProgramUniform2fvEXT(gpProgramUniform2fvEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLfloat)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniform2i(program uint32, location int32, v0 int32, v1 int32) { + C.glowProgramUniform2i(gpProgramUniform2i, (C.GLuint)(program), (C.GLint)(location), (C.GLint)(v0), (C.GLint)(v1)) +} +func ProgramUniform2i64ARB(program uint32, location int32, x int64, y int64) { + C.glowProgramUniform2i64ARB(gpProgramUniform2i64ARB, (C.GLuint)(program), (C.GLint)(location), (C.GLint64)(x), (C.GLint64)(y)) +} +func ProgramUniform2i64NV(program uint32, location int32, x int64, y int64) { + C.glowProgramUniform2i64NV(gpProgramUniform2i64NV, (C.GLuint)(program), (C.GLint)(location), (C.GLint64EXT)(x), (C.GLint64EXT)(y)) +} +func ProgramUniform2i64vARB(program uint32, location int32, count int32, value *int64) { + C.glowProgramUniform2i64vARB(gpProgramUniform2i64vARB, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLint64)(unsafe.Pointer(value))) +} +func ProgramUniform2i64vNV(program uint32, location int32, count int32, value *int64) { + C.glowProgramUniform2i64vNV(gpProgramUniform2i64vNV, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLint64EXT)(unsafe.Pointer(value))) +} +func ProgramUniform2iEXT(program uint32, location int32, v0 int32, v1 int32) { + C.glowProgramUniform2iEXT(gpProgramUniform2iEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLint)(v0), (C.GLint)(v1)) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniform2iv(program uint32, location int32, count int32, value *int32) { + C.glowProgramUniform2iv(gpProgramUniform2iv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLint)(unsafe.Pointer(value))) +} +func ProgramUniform2ivEXT(program uint32, location int32, count int32, value *int32) { + C.glowProgramUniform2ivEXT(gpProgramUniform2ivEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLint)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniform2ui(program uint32, location int32, v0 uint32, v1 uint32) { + C.glowProgramUniform2ui(gpProgramUniform2ui, (C.GLuint)(program), (C.GLint)(location), (C.GLuint)(v0), (C.GLuint)(v1)) +} +func ProgramUniform2ui64ARB(program uint32, location int32, x uint64, y uint64) { + C.glowProgramUniform2ui64ARB(gpProgramUniform2ui64ARB, (C.GLuint)(program), (C.GLint)(location), (C.GLuint64)(x), (C.GLuint64)(y)) +} +func ProgramUniform2ui64NV(program uint32, location int32, x uint64, y uint64) { + C.glowProgramUniform2ui64NV(gpProgramUniform2ui64NV, (C.GLuint)(program), (C.GLint)(location), (C.GLuint64EXT)(x), (C.GLuint64EXT)(y)) +} +func ProgramUniform2ui64vARB(program uint32, location int32, count int32, value *uint64) { + C.glowProgramUniform2ui64vARB(gpProgramUniform2ui64vARB, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint64)(unsafe.Pointer(value))) +} +func ProgramUniform2ui64vNV(program uint32, location int32, count int32, value *uint64) { + C.glowProgramUniform2ui64vNV(gpProgramUniform2ui64vNV, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint64EXT)(unsafe.Pointer(value))) +} +func ProgramUniform2uiEXT(program uint32, location int32, v0 uint32, v1 uint32) { + C.glowProgramUniform2uiEXT(gpProgramUniform2uiEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLuint)(v0), (C.GLuint)(v1)) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniform2uiv(program uint32, location int32, count int32, value *uint32) { + C.glowProgramUniform2uiv(gpProgramUniform2uiv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(value))) +} +func ProgramUniform2uivEXT(program uint32, location int32, count int32, value *uint32) { + C.glowProgramUniform2uivEXT(gpProgramUniform2uivEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(value))) +} +func ProgramUniform3d(program uint32, location int32, v0 float64, v1 float64, v2 float64) { + C.glowProgramUniform3d(gpProgramUniform3d, (C.GLuint)(program), (C.GLint)(location), (C.GLdouble)(v0), (C.GLdouble)(v1), (C.GLdouble)(v2)) +} +func ProgramUniform3dEXT(program uint32, location int32, x float64, y float64, z float64) { + C.glowProgramUniform3dEXT(gpProgramUniform3dEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLdouble)(x), (C.GLdouble)(y), (C.GLdouble)(z)) +} +func ProgramUniform3dv(program uint32, location int32, count int32, value *float64) { + C.glowProgramUniform3dv(gpProgramUniform3dv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLdouble)(unsafe.Pointer(value))) +} +func ProgramUniform3dvEXT(program uint32, location int32, count int32, value *float64) { + C.glowProgramUniform3dvEXT(gpProgramUniform3dvEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLdouble)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniform3f(program uint32, location int32, v0 float32, v1 float32, v2 float32) { + C.glowProgramUniform3f(gpProgramUniform3f, (C.GLuint)(program), (C.GLint)(location), (C.GLfloat)(v0), (C.GLfloat)(v1), (C.GLfloat)(v2)) +} +func ProgramUniform3fEXT(program uint32, location int32, v0 float32, v1 float32, v2 float32) { + C.glowProgramUniform3fEXT(gpProgramUniform3fEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLfloat)(v0), (C.GLfloat)(v1), (C.GLfloat)(v2)) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniform3fv(program uint32, location int32, count int32, value *float32) { + C.glowProgramUniform3fv(gpProgramUniform3fv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLfloat)(unsafe.Pointer(value))) +} +func ProgramUniform3fvEXT(program uint32, location int32, count int32, value *float32) { + C.glowProgramUniform3fvEXT(gpProgramUniform3fvEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLfloat)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniform3i(program uint32, location int32, v0 int32, v1 int32, v2 int32) { + C.glowProgramUniform3i(gpProgramUniform3i, (C.GLuint)(program), (C.GLint)(location), (C.GLint)(v0), (C.GLint)(v1), (C.GLint)(v2)) +} +func ProgramUniform3i64ARB(program uint32, location int32, x int64, y int64, z int64) { + C.glowProgramUniform3i64ARB(gpProgramUniform3i64ARB, (C.GLuint)(program), (C.GLint)(location), (C.GLint64)(x), (C.GLint64)(y), (C.GLint64)(z)) +} +func ProgramUniform3i64NV(program uint32, location int32, x int64, y int64, z int64) { + C.glowProgramUniform3i64NV(gpProgramUniform3i64NV, (C.GLuint)(program), (C.GLint)(location), (C.GLint64EXT)(x), (C.GLint64EXT)(y), (C.GLint64EXT)(z)) +} +func ProgramUniform3i64vARB(program uint32, location int32, count int32, value *int64) { + C.glowProgramUniform3i64vARB(gpProgramUniform3i64vARB, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLint64)(unsafe.Pointer(value))) +} +func ProgramUniform3i64vNV(program uint32, location int32, count int32, value *int64) { + C.glowProgramUniform3i64vNV(gpProgramUniform3i64vNV, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLint64EXT)(unsafe.Pointer(value))) +} +func ProgramUniform3iEXT(program uint32, location int32, v0 int32, v1 int32, v2 int32) { + C.glowProgramUniform3iEXT(gpProgramUniform3iEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLint)(v0), (C.GLint)(v1), (C.GLint)(v2)) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniform3iv(program uint32, location int32, count int32, value *int32) { + C.glowProgramUniform3iv(gpProgramUniform3iv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLint)(unsafe.Pointer(value))) +} +func ProgramUniform3ivEXT(program uint32, location int32, count int32, value *int32) { + C.glowProgramUniform3ivEXT(gpProgramUniform3ivEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLint)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniform3ui(program uint32, location int32, v0 uint32, v1 uint32, v2 uint32) { + C.glowProgramUniform3ui(gpProgramUniform3ui, (C.GLuint)(program), (C.GLint)(location), (C.GLuint)(v0), (C.GLuint)(v1), (C.GLuint)(v2)) +} +func ProgramUniform3ui64ARB(program uint32, location int32, x uint64, y uint64, z uint64) { + C.glowProgramUniform3ui64ARB(gpProgramUniform3ui64ARB, (C.GLuint)(program), (C.GLint)(location), (C.GLuint64)(x), (C.GLuint64)(y), (C.GLuint64)(z)) +} +func ProgramUniform3ui64NV(program uint32, location int32, x uint64, y uint64, z uint64) { + C.glowProgramUniform3ui64NV(gpProgramUniform3ui64NV, (C.GLuint)(program), (C.GLint)(location), (C.GLuint64EXT)(x), (C.GLuint64EXT)(y), (C.GLuint64EXT)(z)) +} +func ProgramUniform3ui64vARB(program uint32, location int32, count int32, value *uint64) { + C.glowProgramUniform3ui64vARB(gpProgramUniform3ui64vARB, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint64)(unsafe.Pointer(value))) +} +func ProgramUniform3ui64vNV(program uint32, location int32, count int32, value *uint64) { + C.glowProgramUniform3ui64vNV(gpProgramUniform3ui64vNV, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint64EXT)(unsafe.Pointer(value))) +} +func ProgramUniform3uiEXT(program uint32, location int32, v0 uint32, v1 uint32, v2 uint32) { + C.glowProgramUniform3uiEXT(gpProgramUniform3uiEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLuint)(v0), (C.GLuint)(v1), (C.GLuint)(v2)) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniform3uiv(program uint32, location int32, count int32, value *uint32) { + C.glowProgramUniform3uiv(gpProgramUniform3uiv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(value))) +} +func ProgramUniform3uivEXT(program uint32, location int32, count int32, value *uint32) { + C.glowProgramUniform3uivEXT(gpProgramUniform3uivEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(value))) +} +func ProgramUniform4d(program uint32, location int32, v0 float64, v1 float64, v2 float64, v3 float64) { + C.glowProgramUniform4d(gpProgramUniform4d, (C.GLuint)(program), (C.GLint)(location), (C.GLdouble)(v0), (C.GLdouble)(v1), (C.GLdouble)(v2), (C.GLdouble)(v3)) +} +func ProgramUniform4dEXT(program uint32, location int32, x float64, y float64, z float64, w float64) { + C.glowProgramUniform4dEXT(gpProgramUniform4dEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLdouble)(x), (C.GLdouble)(y), (C.GLdouble)(z), (C.GLdouble)(w)) +} +func ProgramUniform4dv(program uint32, location int32, count int32, value *float64) { + C.glowProgramUniform4dv(gpProgramUniform4dv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLdouble)(unsafe.Pointer(value))) +} +func ProgramUniform4dvEXT(program uint32, location int32, count int32, value *float64) { + C.glowProgramUniform4dvEXT(gpProgramUniform4dvEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLdouble)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniform4f(program uint32, location int32, v0 float32, v1 float32, v2 float32, v3 float32) { + C.glowProgramUniform4f(gpProgramUniform4f, (C.GLuint)(program), (C.GLint)(location), (C.GLfloat)(v0), (C.GLfloat)(v1), (C.GLfloat)(v2), (C.GLfloat)(v3)) +} +func ProgramUniform4fEXT(program uint32, location int32, v0 float32, v1 float32, v2 float32, v3 float32) { + C.glowProgramUniform4fEXT(gpProgramUniform4fEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLfloat)(v0), (C.GLfloat)(v1), (C.GLfloat)(v2), (C.GLfloat)(v3)) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniform4fv(program uint32, location int32, count int32, value *float32) { + C.glowProgramUniform4fv(gpProgramUniform4fv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLfloat)(unsafe.Pointer(value))) +} +func ProgramUniform4fvEXT(program uint32, location int32, count int32, value *float32) { + C.glowProgramUniform4fvEXT(gpProgramUniform4fvEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLfloat)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniform4i(program uint32, location int32, v0 int32, v1 int32, v2 int32, v3 int32) { + C.glowProgramUniform4i(gpProgramUniform4i, (C.GLuint)(program), (C.GLint)(location), (C.GLint)(v0), (C.GLint)(v1), (C.GLint)(v2), (C.GLint)(v3)) +} +func ProgramUniform4i64ARB(program uint32, location int32, x int64, y int64, z int64, w int64) { + C.glowProgramUniform4i64ARB(gpProgramUniform4i64ARB, (C.GLuint)(program), (C.GLint)(location), (C.GLint64)(x), (C.GLint64)(y), (C.GLint64)(z), (C.GLint64)(w)) +} +func ProgramUniform4i64NV(program uint32, location int32, x int64, y int64, z int64, w int64) { + C.glowProgramUniform4i64NV(gpProgramUniform4i64NV, (C.GLuint)(program), (C.GLint)(location), (C.GLint64EXT)(x), (C.GLint64EXT)(y), (C.GLint64EXT)(z), (C.GLint64EXT)(w)) +} +func ProgramUniform4i64vARB(program uint32, location int32, count int32, value *int64) { + C.glowProgramUniform4i64vARB(gpProgramUniform4i64vARB, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLint64)(unsafe.Pointer(value))) +} +func ProgramUniform4i64vNV(program uint32, location int32, count int32, value *int64) { + C.glowProgramUniform4i64vNV(gpProgramUniform4i64vNV, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLint64EXT)(unsafe.Pointer(value))) +} +func ProgramUniform4iEXT(program uint32, location int32, v0 int32, v1 int32, v2 int32, v3 int32) { + C.glowProgramUniform4iEXT(gpProgramUniform4iEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLint)(v0), (C.GLint)(v1), (C.GLint)(v2), (C.GLint)(v3)) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniform4iv(program uint32, location int32, count int32, value *int32) { + C.glowProgramUniform4iv(gpProgramUniform4iv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLint)(unsafe.Pointer(value))) +} +func ProgramUniform4ivEXT(program uint32, location int32, count int32, value *int32) { + C.glowProgramUniform4ivEXT(gpProgramUniform4ivEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLint)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniform4ui(program uint32, location int32, v0 uint32, v1 uint32, v2 uint32, v3 uint32) { + C.glowProgramUniform4ui(gpProgramUniform4ui, (C.GLuint)(program), (C.GLint)(location), (C.GLuint)(v0), (C.GLuint)(v1), (C.GLuint)(v2), (C.GLuint)(v3)) +} +func ProgramUniform4ui64ARB(program uint32, location int32, x uint64, y uint64, z uint64, w uint64) { + C.glowProgramUniform4ui64ARB(gpProgramUniform4ui64ARB, (C.GLuint)(program), (C.GLint)(location), (C.GLuint64)(x), (C.GLuint64)(y), (C.GLuint64)(z), (C.GLuint64)(w)) +} +func ProgramUniform4ui64NV(program uint32, location int32, x uint64, y uint64, z uint64, w uint64) { + C.glowProgramUniform4ui64NV(gpProgramUniform4ui64NV, (C.GLuint)(program), (C.GLint)(location), (C.GLuint64EXT)(x), (C.GLuint64EXT)(y), (C.GLuint64EXT)(z), (C.GLuint64EXT)(w)) +} +func ProgramUniform4ui64vARB(program uint32, location int32, count int32, value *uint64) { + C.glowProgramUniform4ui64vARB(gpProgramUniform4ui64vARB, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint64)(unsafe.Pointer(value))) +} +func ProgramUniform4ui64vNV(program uint32, location int32, count int32, value *uint64) { + C.glowProgramUniform4ui64vNV(gpProgramUniform4ui64vNV, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint64EXT)(unsafe.Pointer(value))) +} +func ProgramUniform4uiEXT(program uint32, location int32, v0 uint32, v1 uint32, v2 uint32, v3 uint32) { + C.glowProgramUniform4uiEXT(gpProgramUniform4uiEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLuint)(v0), (C.GLuint)(v1), (C.GLuint)(v2), (C.GLuint)(v3)) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniform4uiv(program uint32, location int32, count int32, value *uint32) { + C.glowProgramUniform4uiv(gpProgramUniform4uiv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(value))) +} +func ProgramUniform4uivEXT(program uint32, location int32, count int32, value *uint32) { + C.glowProgramUniform4uivEXT(gpProgramUniform4uivEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(value))) +} +func ProgramUniformHandleui64ARB(program uint32, location int32, value uint64) { + C.glowProgramUniformHandleui64ARB(gpProgramUniformHandleui64ARB, (C.GLuint)(program), (C.GLint)(location), (C.GLuint64)(value)) +} +func ProgramUniformHandleui64NV(program uint32, location int32, value uint64) { + C.glowProgramUniformHandleui64NV(gpProgramUniformHandleui64NV, (C.GLuint)(program), (C.GLint)(location), (C.GLuint64)(value)) +} +func ProgramUniformHandleui64vARB(program uint32, location int32, count int32, values *uint64) { + C.glowProgramUniformHandleui64vARB(gpProgramUniformHandleui64vARB, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint64)(unsafe.Pointer(values))) +} +func ProgramUniformHandleui64vNV(program uint32, location int32, count int32, values *uint64) { + C.glowProgramUniformHandleui64vNV(gpProgramUniformHandleui64vNV, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint64)(unsafe.Pointer(values))) +} +func ProgramUniformMatrix2dv(program uint32, location int32, count int32, transpose bool, value *float64) { + C.glowProgramUniformMatrix2dv(gpProgramUniformMatrix2dv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} +func ProgramUniformMatrix2dvEXT(program uint32, location int32, count int32, transpose bool, value *float64) { + C.glowProgramUniformMatrix2dvEXT(gpProgramUniformMatrix2dvEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniformMatrix2fv(program uint32, location int32, count int32, transpose bool, value *float32) { + C.glowProgramUniformMatrix2fv(gpProgramUniformMatrix2fv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func ProgramUniformMatrix2fvEXT(program uint32, location int32, count int32, transpose bool, value *float32) { + C.glowProgramUniformMatrix2fvEXT(gpProgramUniformMatrix2fvEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func ProgramUniformMatrix2x3dv(program uint32, location int32, count int32, transpose bool, value *float64) { + C.glowProgramUniformMatrix2x3dv(gpProgramUniformMatrix2x3dv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} +func ProgramUniformMatrix2x3dvEXT(program uint32, location int32, count int32, transpose bool, value *float64) { + C.glowProgramUniformMatrix2x3dvEXT(gpProgramUniformMatrix2x3dvEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniformMatrix2x3fv(program uint32, location int32, count int32, transpose bool, value *float32) { + C.glowProgramUniformMatrix2x3fv(gpProgramUniformMatrix2x3fv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func ProgramUniformMatrix2x3fvEXT(program uint32, location int32, count int32, transpose bool, value *float32) { + C.glowProgramUniformMatrix2x3fvEXT(gpProgramUniformMatrix2x3fvEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func ProgramUniformMatrix2x4dv(program uint32, location int32, count int32, transpose bool, value *float64) { + C.glowProgramUniformMatrix2x4dv(gpProgramUniformMatrix2x4dv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} +func ProgramUniformMatrix2x4dvEXT(program uint32, location int32, count int32, transpose bool, value *float64) { + C.glowProgramUniformMatrix2x4dvEXT(gpProgramUniformMatrix2x4dvEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniformMatrix2x4fv(program uint32, location int32, count int32, transpose bool, value *float32) { + C.glowProgramUniformMatrix2x4fv(gpProgramUniformMatrix2x4fv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func ProgramUniformMatrix2x4fvEXT(program uint32, location int32, count int32, transpose bool, value *float32) { + C.glowProgramUniformMatrix2x4fvEXT(gpProgramUniformMatrix2x4fvEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func ProgramUniformMatrix3dv(program uint32, location int32, count int32, transpose bool, value *float64) { + C.glowProgramUniformMatrix3dv(gpProgramUniformMatrix3dv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} +func ProgramUniformMatrix3dvEXT(program uint32, location int32, count int32, transpose bool, value *float64) { + C.glowProgramUniformMatrix3dvEXT(gpProgramUniformMatrix3dvEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniformMatrix3fv(program uint32, location int32, count int32, transpose bool, value *float32) { + C.glowProgramUniformMatrix3fv(gpProgramUniformMatrix3fv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func ProgramUniformMatrix3fvEXT(program uint32, location int32, count int32, transpose bool, value *float32) { + C.glowProgramUniformMatrix3fvEXT(gpProgramUniformMatrix3fvEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func ProgramUniformMatrix3x2dv(program uint32, location int32, count int32, transpose bool, value *float64) { + C.glowProgramUniformMatrix3x2dv(gpProgramUniformMatrix3x2dv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} +func ProgramUniformMatrix3x2dvEXT(program uint32, location int32, count int32, transpose bool, value *float64) { + C.glowProgramUniformMatrix3x2dvEXT(gpProgramUniformMatrix3x2dvEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniformMatrix3x2fv(program uint32, location int32, count int32, transpose bool, value *float32) { + C.glowProgramUniformMatrix3x2fv(gpProgramUniformMatrix3x2fv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func ProgramUniformMatrix3x2fvEXT(program uint32, location int32, count int32, transpose bool, value *float32) { + C.glowProgramUniformMatrix3x2fvEXT(gpProgramUniformMatrix3x2fvEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func ProgramUniformMatrix3x4dv(program uint32, location int32, count int32, transpose bool, value *float64) { + C.glowProgramUniformMatrix3x4dv(gpProgramUniformMatrix3x4dv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} +func ProgramUniformMatrix3x4dvEXT(program uint32, location int32, count int32, transpose bool, value *float64) { + C.glowProgramUniformMatrix3x4dvEXT(gpProgramUniformMatrix3x4dvEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniformMatrix3x4fv(program uint32, location int32, count int32, transpose bool, value *float32) { + C.glowProgramUniformMatrix3x4fv(gpProgramUniformMatrix3x4fv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func ProgramUniformMatrix3x4fvEXT(program uint32, location int32, count int32, transpose bool, value *float32) { + C.glowProgramUniformMatrix3x4fvEXT(gpProgramUniformMatrix3x4fvEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func ProgramUniformMatrix4dv(program uint32, location int32, count int32, transpose bool, value *float64) { + C.glowProgramUniformMatrix4dv(gpProgramUniformMatrix4dv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} +func ProgramUniformMatrix4dvEXT(program uint32, location int32, count int32, transpose bool, value *float64) { + C.glowProgramUniformMatrix4dvEXT(gpProgramUniformMatrix4dvEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniformMatrix4fv(program uint32, location int32, count int32, transpose bool, value *float32) { + C.glowProgramUniformMatrix4fv(gpProgramUniformMatrix4fv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func ProgramUniformMatrix4fvEXT(program uint32, location int32, count int32, transpose bool, value *float32) { + C.glowProgramUniformMatrix4fvEXT(gpProgramUniformMatrix4fvEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func ProgramUniformMatrix4x2dv(program uint32, location int32, count int32, transpose bool, value *float64) { + C.glowProgramUniformMatrix4x2dv(gpProgramUniformMatrix4x2dv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} +func ProgramUniformMatrix4x2dvEXT(program uint32, location int32, count int32, transpose bool, value *float64) { + C.glowProgramUniformMatrix4x2dvEXT(gpProgramUniformMatrix4x2dvEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniformMatrix4x2fv(program uint32, location int32, count int32, transpose bool, value *float32) { + C.glowProgramUniformMatrix4x2fv(gpProgramUniformMatrix4x2fv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func ProgramUniformMatrix4x2fvEXT(program uint32, location int32, count int32, transpose bool, value *float32) { + C.glowProgramUniformMatrix4x2fvEXT(gpProgramUniformMatrix4x2fvEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func ProgramUniformMatrix4x3dv(program uint32, location int32, count int32, transpose bool, value *float64) { + C.glowProgramUniformMatrix4x3dv(gpProgramUniformMatrix4x3dv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} +func ProgramUniformMatrix4x3dvEXT(program uint32, location int32, count int32, transpose bool, value *float64) { + C.glowProgramUniformMatrix4x3dvEXT(gpProgramUniformMatrix4x3dvEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for a specified program object +func ProgramUniformMatrix4x3fv(program uint32, location int32, count int32, transpose bool, value *float32) { + C.glowProgramUniformMatrix4x3fv(gpProgramUniformMatrix4x3fv, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func ProgramUniformMatrix4x3fvEXT(program uint32, location int32, count int32, transpose bool, value *float32) { + C.glowProgramUniformMatrix4x3fvEXT(gpProgramUniformMatrix4x3fvEXT, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func ProgramUniformui64NV(program uint32, location int32, value uint64) { + C.glowProgramUniformui64NV(gpProgramUniformui64NV, (C.GLuint)(program), (C.GLint)(location), (C.GLuint64EXT)(value)) +} +func ProgramUniformui64vNV(program uint32, location int32, count int32, value *uint64) { + C.glowProgramUniformui64vNV(gpProgramUniformui64vNV, (C.GLuint)(program), (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint64EXT)(unsafe.Pointer(value))) +} + +// specifiy the vertex to be used as the source of data for flat shaded varyings +func ProvokingVertex(mode uint32) { + C.glowProvokingVertex(gpProvokingVertex, (C.GLenum)(mode)) +} +func PushClientAttribDefaultEXT(mask uint32) { + C.glowPushClientAttribDefaultEXT(gpPushClientAttribDefaultEXT, (C.GLbitfield)(mask)) +} + +// push a named debug group into the command stream +func PushDebugGroup(source uint32, id uint32, length int32, message *uint8) { + C.glowPushDebugGroup(gpPushDebugGroup, (C.GLenum)(source), (C.GLuint)(id), (C.GLsizei)(length), (*C.GLchar)(unsafe.Pointer(message))) +} +func PushDebugGroupKHR(source uint32, id uint32, length int32, message *uint8) { + C.glowPushDebugGroupKHR(gpPushDebugGroupKHR, (C.GLenum)(source), (C.GLuint)(id), (C.GLsizei)(length), (*C.GLchar)(unsafe.Pointer(message))) +} +func PushGroupMarkerEXT(length int32, marker *uint8) { + C.glowPushGroupMarkerEXT(gpPushGroupMarkerEXT, (C.GLsizei)(length), (*C.GLchar)(unsafe.Pointer(marker))) +} + +// record the GL time into a query object after all previous commands have reached the GL server but have not yet necessarily executed. +func QueryCounter(id uint32, target uint32) { + C.glowQueryCounter(gpQueryCounter, (C.GLuint)(id), (C.GLenum)(target)) +} +func RasterSamplesEXT(samples uint32, fixedsamplelocations bool) { + C.glowRasterSamplesEXT(gpRasterSamplesEXT, (C.GLuint)(samples), (C.GLboolean)(boolToInt(fixedsamplelocations))) +} + +// select a color buffer source for pixels +func ReadBuffer(src uint32) { + C.glowReadBuffer(gpReadBuffer, (C.GLenum)(src)) +} + +// read a block of pixels from the frame buffer +func ReadPixels(x int32, y int32, width int32, height int32, format uint32, xtype uint32, pixels unsafe.Pointer) { + C.glowReadPixels(gpReadPixels, (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLenum)(format), (C.GLenum)(xtype), pixels) +} + +// read a block of pixels from the frame buffer +func ReadnPixels(x int32, y int32, width int32, height int32, format uint32, xtype uint32, bufSize int32, data unsafe.Pointer) { + C.glowReadnPixels(gpReadnPixels, (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLenum)(format), (C.GLenum)(xtype), (C.GLsizei)(bufSize), data) +} +func ReadnPixelsARB(x int32, y int32, width int32, height int32, format uint32, xtype uint32, bufSize int32, data unsafe.Pointer) { + C.glowReadnPixelsARB(gpReadnPixelsARB, (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLenum)(format), (C.GLenum)(xtype), (C.GLsizei)(bufSize), data) +} +func ReadnPixelsKHR(x int32, y int32, width int32, height int32, format uint32, xtype uint32, bufSize int32, data unsafe.Pointer) { + C.glowReadnPixelsKHR(gpReadnPixelsKHR, (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLenum)(format), (C.GLenum)(xtype), (C.GLsizei)(bufSize), data) +} + +// release resources consumed by the implementation's shader compiler +func ReleaseShaderCompiler() { + C.glowReleaseShaderCompiler(gpReleaseShaderCompiler) +} + +// establish data storage, format and dimensions of a renderbuffer object's image +func RenderbufferStorage(target uint32, internalformat uint32, width int32, height int32) { + C.glowRenderbufferStorage(gpRenderbufferStorage, (C.GLenum)(target), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height)) +} + +// establish data storage, format, dimensions and sample count of a renderbuffer object's image +func RenderbufferStorageMultisample(target uint32, samples int32, internalformat uint32, width int32, height int32) { + C.glowRenderbufferStorageMultisample(gpRenderbufferStorageMultisample, (C.GLenum)(target), (C.GLsizei)(samples), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height)) +} +func RenderbufferStorageMultisampleCoverageNV(target uint32, coverageSamples int32, colorSamples int32, internalformat uint32, width int32, height int32) { + C.glowRenderbufferStorageMultisampleCoverageNV(gpRenderbufferStorageMultisampleCoverageNV, (C.GLenum)(target), (C.GLsizei)(coverageSamples), (C.GLsizei)(colorSamples), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height)) +} +func ResolveDepthValuesNV() { + C.glowResolveDepthValuesNV(gpResolveDepthValuesNV) +} + +// resume transform feedback operations +func ResumeTransformFeedback() { + C.glowResumeTransformFeedback(gpResumeTransformFeedback) +} + +// specify multisample coverage parameters +func SampleCoverage(value float32, invert bool) { + C.glowSampleCoverage(gpSampleCoverage, (C.GLfloat)(value), (C.GLboolean)(boolToInt(invert))) +} + +// set the value of a sub-word of the sample mask +func SampleMaski(maskNumber uint32, mask uint32) { + C.glowSampleMaski(gpSampleMaski, (C.GLuint)(maskNumber), (C.GLbitfield)(mask)) +} +func SamplerParameterIiv(sampler uint32, pname uint32, param *int32) { + C.glowSamplerParameterIiv(gpSamplerParameterIiv, (C.GLuint)(sampler), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(param))) +} +func SamplerParameterIuiv(sampler uint32, pname uint32, param *uint32) { + C.glowSamplerParameterIuiv(gpSamplerParameterIuiv, (C.GLuint)(sampler), (C.GLenum)(pname), (*C.GLuint)(unsafe.Pointer(param))) +} +func SamplerParameterf(sampler uint32, pname uint32, param float32) { + C.glowSamplerParameterf(gpSamplerParameterf, (C.GLuint)(sampler), (C.GLenum)(pname), (C.GLfloat)(param)) +} +func SamplerParameterfv(sampler uint32, pname uint32, param *float32) { + C.glowSamplerParameterfv(gpSamplerParameterfv, (C.GLuint)(sampler), (C.GLenum)(pname), (*C.GLfloat)(unsafe.Pointer(param))) +} +func SamplerParameteri(sampler uint32, pname uint32, param int32) { + C.glowSamplerParameteri(gpSamplerParameteri, (C.GLuint)(sampler), (C.GLenum)(pname), (C.GLint)(param)) +} +func SamplerParameteriv(sampler uint32, pname uint32, param *int32) { + C.glowSamplerParameteriv(gpSamplerParameteriv, (C.GLuint)(sampler), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(param))) +} + +// define the scissor box +func Scissor(x int32, y int32, width int32, height int32) { + C.glowScissor(gpScissor, (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width), (C.GLsizei)(height)) +} +func ScissorArrayv(first uint32, count int32, v *int32) { + C.glowScissorArrayv(gpScissorArrayv, (C.GLuint)(first), (C.GLsizei)(count), (*C.GLint)(unsafe.Pointer(v))) +} + +// define the scissor box for a specific viewport +func ScissorIndexed(index uint32, left int32, bottom int32, width int32, height int32) { + C.glowScissorIndexed(gpScissorIndexed, (C.GLuint)(index), (C.GLint)(left), (C.GLint)(bottom), (C.GLsizei)(width), (C.GLsizei)(height)) +} +func ScissorIndexedv(index uint32, v *int32) { + C.glowScissorIndexedv(gpScissorIndexedv, (C.GLuint)(index), (*C.GLint)(unsafe.Pointer(v))) +} +func SecondaryColorFormatNV(size int32, xtype uint32, stride int32) { + C.glowSecondaryColorFormatNV(gpSecondaryColorFormatNV, (C.GLint)(size), (C.GLenum)(xtype), (C.GLsizei)(stride)) +} +func SelectPerfMonitorCountersAMD(monitor uint32, enable bool, group uint32, numCounters int32, counterList *uint32) { + C.glowSelectPerfMonitorCountersAMD(gpSelectPerfMonitorCountersAMD, (C.GLuint)(monitor), (C.GLboolean)(boolToInt(enable)), (C.GLuint)(group), (C.GLint)(numCounters), (*C.GLuint)(unsafe.Pointer(counterList))) +} + +// load pre-compiled shader binaries +func ShaderBinary(count int32, shaders *uint32, binaryformat uint32, binary unsafe.Pointer, length int32) { + C.glowShaderBinary(gpShaderBinary, (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(shaders)), (C.GLenum)(binaryformat), binary, (C.GLsizei)(length)) +} + +// Replaces the source code in a shader object +func ShaderSource(shader uint32, count int32, xstring **uint8, length *int32) { + C.glowShaderSource(gpShaderSource, (C.GLuint)(shader), (C.GLsizei)(count), (**C.GLchar)(unsafe.Pointer(xstring)), (*C.GLint)(unsafe.Pointer(length))) +} + +// change an active shader storage block binding +func ShaderStorageBlockBinding(program uint32, storageBlockIndex uint32, storageBlockBinding uint32) { + C.glowShaderStorageBlockBinding(gpShaderStorageBlockBinding, (C.GLuint)(program), (C.GLuint)(storageBlockIndex), (C.GLuint)(storageBlockBinding)) +} +func SignalVkFenceNV(vkFence uint64) { + C.glowSignalVkFenceNV(gpSignalVkFenceNV, (C.GLuint64)(vkFence)) +} +func SignalVkSemaphoreNV(vkSemaphore uint64) { + C.glowSignalVkSemaphoreNV(gpSignalVkSemaphoreNV, (C.GLuint64)(vkSemaphore)) +} +func SpecializeShaderARB(shader uint32, pEntryPoint *uint8, numSpecializationConstants uint32, pConstantIndex *uint32, pConstantValue *uint32) { + C.glowSpecializeShaderARB(gpSpecializeShaderARB, (C.GLuint)(shader), (*C.GLchar)(unsafe.Pointer(pEntryPoint)), (C.GLuint)(numSpecializationConstants), (*C.GLuint)(unsafe.Pointer(pConstantIndex)), (*C.GLuint)(unsafe.Pointer(pConstantValue))) +} +func StateCaptureNV(state uint32, mode uint32) { + C.glowStateCaptureNV(gpStateCaptureNV, (C.GLuint)(state), (C.GLenum)(mode)) +} +func StencilFillPathInstancedNV(numPaths int32, pathNameType uint32, paths unsafe.Pointer, pathBase uint32, fillMode uint32, mask uint32, transformType uint32, transformValues *float32) { + C.glowStencilFillPathInstancedNV(gpStencilFillPathInstancedNV, (C.GLsizei)(numPaths), (C.GLenum)(pathNameType), paths, (C.GLuint)(pathBase), (C.GLenum)(fillMode), (C.GLuint)(mask), (C.GLenum)(transformType), (*C.GLfloat)(unsafe.Pointer(transformValues))) +} +func StencilFillPathNV(path uint32, fillMode uint32, mask uint32) { + C.glowStencilFillPathNV(gpStencilFillPathNV, (C.GLuint)(path), (C.GLenum)(fillMode), (C.GLuint)(mask)) +} + +// set front and back function and reference value for stencil testing +func StencilFunc(xfunc uint32, ref int32, mask uint32) { + C.glowStencilFunc(gpStencilFunc, (C.GLenum)(xfunc), (C.GLint)(ref), (C.GLuint)(mask)) +} + +// set front and/or back function and reference value for stencil testing +func StencilFuncSeparate(face uint32, xfunc uint32, ref int32, mask uint32) { + C.glowStencilFuncSeparate(gpStencilFuncSeparate, (C.GLenum)(face), (C.GLenum)(xfunc), (C.GLint)(ref), (C.GLuint)(mask)) +} + +// control the front and back writing of individual bits in the stencil planes +func StencilMask(mask uint32) { + C.glowStencilMask(gpStencilMask, (C.GLuint)(mask)) +} + +// control the front and/or back writing of individual bits in the stencil planes +func StencilMaskSeparate(face uint32, mask uint32) { + C.glowStencilMaskSeparate(gpStencilMaskSeparate, (C.GLenum)(face), (C.GLuint)(mask)) +} + +// set front and back stencil test actions +func StencilOp(fail uint32, zfail uint32, zpass uint32) { + C.glowStencilOp(gpStencilOp, (C.GLenum)(fail), (C.GLenum)(zfail), (C.GLenum)(zpass)) +} + +// set front and/or back stencil test actions +func StencilOpSeparate(face uint32, sfail uint32, dpfail uint32, dppass uint32) { + C.glowStencilOpSeparate(gpStencilOpSeparate, (C.GLenum)(face), (C.GLenum)(sfail), (C.GLenum)(dpfail), (C.GLenum)(dppass)) +} +func StencilStrokePathInstancedNV(numPaths int32, pathNameType uint32, paths unsafe.Pointer, pathBase uint32, reference int32, mask uint32, transformType uint32, transformValues *float32) { + C.glowStencilStrokePathInstancedNV(gpStencilStrokePathInstancedNV, (C.GLsizei)(numPaths), (C.GLenum)(pathNameType), paths, (C.GLuint)(pathBase), (C.GLint)(reference), (C.GLuint)(mask), (C.GLenum)(transformType), (*C.GLfloat)(unsafe.Pointer(transformValues))) +} +func StencilStrokePathNV(path uint32, reference int32, mask uint32) { + C.glowStencilStrokePathNV(gpStencilStrokePathNV, (C.GLuint)(path), (C.GLint)(reference), (C.GLuint)(mask)) +} +func StencilThenCoverFillPathInstancedNV(numPaths int32, pathNameType uint32, paths unsafe.Pointer, pathBase uint32, fillMode uint32, mask uint32, coverMode uint32, transformType uint32, transformValues *float32) { + C.glowStencilThenCoverFillPathInstancedNV(gpStencilThenCoverFillPathInstancedNV, (C.GLsizei)(numPaths), (C.GLenum)(pathNameType), paths, (C.GLuint)(pathBase), (C.GLenum)(fillMode), (C.GLuint)(mask), (C.GLenum)(coverMode), (C.GLenum)(transformType), (*C.GLfloat)(unsafe.Pointer(transformValues))) +} +func StencilThenCoverFillPathNV(path uint32, fillMode uint32, mask uint32, coverMode uint32) { + C.glowStencilThenCoverFillPathNV(gpStencilThenCoverFillPathNV, (C.GLuint)(path), (C.GLenum)(fillMode), (C.GLuint)(mask), (C.GLenum)(coverMode)) +} +func StencilThenCoverStrokePathInstancedNV(numPaths int32, pathNameType uint32, paths unsafe.Pointer, pathBase uint32, reference int32, mask uint32, coverMode uint32, transformType uint32, transformValues *float32) { + C.glowStencilThenCoverStrokePathInstancedNV(gpStencilThenCoverStrokePathInstancedNV, (C.GLsizei)(numPaths), (C.GLenum)(pathNameType), paths, (C.GLuint)(pathBase), (C.GLint)(reference), (C.GLuint)(mask), (C.GLenum)(coverMode), (C.GLenum)(transformType), (*C.GLfloat)(unsafe.Pointer(transformValues))) +} +func StencilThenCoverStrokePathNV(path uint32, reference int32, mask uint32, coverMode uint32) { + C.glowStencilThenCoverStrokePathNV(gpStencilThenCoverStrokePathNV, (C.GLuint)(path), (C.GLint)(reference), (C.GLuint)(mask), (C.GLenum)(coverMode)) +} +func SubpixelPrecisionBiasNV(xbits uint32, ybits uint32) { + C.glowSubpixelPrecisionBiasNV(gpSubpixelPrecisionBiasNV, (C.GLuint)(xbits), (C.GLuint)(ybits)) +} + +// attach a buffer object's data store to a buffer texture object +func TexBuffer(target uint32, internalformat uint32, buffer uint32) { + C.glowTexBuffer(gpTexBuffer, (C.GLenum)(target), (C.GLenum)(internalformat), (C.GLuint)(buffer)) +} +func TexBufferARB(target uint32, internalformat uint32, buffer uint32) { + C.glowTexBufferARB(gpTexBufferARB, (C.GLenum)(target), (C.GLenum)(internalformat), (C.GLuint)(buffer)) +} + +// attach a range of a buffer object's data store to a buffer texture object +func TexBufferRange(target uint32, internalformat uint32, buffer uint32, offset int, size int) { + C.glowTexBufferRange(gpTexBufferRange, (C.GLenum)(target), (C.GLenum)(internalformat), (C.GLuint)(buffer), (C.GLintptr)(offset), (C.GLsizeiptr)(size)) +} +func TexCoordFormatNV(size int32, xtype uint32, stride int32) { + C.glowTexCoordFormatNV(gpTexCoordFormatNV, (C.GLint)(size), (C.GLenum)(xtype), (C.GLsizei)(stride)) +} + +// specify a one-dimensional texture image +func TexImage1D(target uint32, level int32, internalformat int32, width int32, border int32, format uint32, xtype uint32, pixels unsafe.Pointer) { + C.glowTexImage1D(gpTexImage1D, (C.GLenum)(target), (C.GLint)(level), (C.GLint)(internalformat), (C.GLsizei)(width), (C.GLint)(border), (C.GLenum)(format), (C.GLenum)(xtype), pixels) +} + +// specify a two-dimensional texture image +func TexImage2D(target uint32, level int32, internalformat int32, width int32, height int32, border int32, format uint32, xtype uint32, pixels unsafe.Pointer) { + C.glowTexImage2D(gpTexImage2D, (C.GLenum)(target), (C.GLint)(level), (C.GLint)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLint)(border), (C.GLenum)(format), (C.GLenum)(xtype), pixels) +} + +// establish the data storage, format, dimensions, and number of samples of a multisample texture's image +func TexImage2DMultisample(target uint32, samples int32, internalformat uint32, width int32, height int32, fixedsamplelocations bool) { + C.glowTexImage2DMultisample(gpTexImage2DMultisample, (C.GLenum)(target), (C.GLsizei)(samples), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLboolean)(boolToInt(fixedsamplelocations))) +} + +// specify a three-dimensional texture image +func TexImage3D(target uint32, level int32, internalformat int32, width int32, height int32, depth int32, border int32, format uint32, xtype uint32, pixels unsafe.Pointer) { + C.glowTexImage3D(gpTexImage3D, (C.GLenum)(target), (C.GLint)(level), (C.GLint)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth), (C.GLint)(border), (C.GLenum)(format), (C.GLenum)(xtype), pixels) +} + +// establish the data storage, format, dimensions, and number of samples of a multisample texture's image +func TexImage3DMultisample(target uint32, samples int32, internalformat uint32, width int32, height int32, depth int32, fixedsamplelocations bool) { + C.glowTexImage3DMultisample(gpTexImage3DMultisample, (C.GLenum)(target), (C.GLsizei)(samples), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth), (C.GLboolean)(boolToInt(fixedsamplelocations))) +} +func TexPageCommitmentARB(target uint32, level int32, xoffset int32, yoffset int32, zoffset int32, width int32, height int32, depth int32, commit bool) { + C.glowTexPageCommitmentARB(gpTexPageCommitmentARB, (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLint)(zoffset), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth), (C.GLboolean)(boolToInt(commit))) +} +func TexParameterIiv(target uint32, pname uint32, params *int32) { + C.glowTexParameterIiv(gpTexParameterIiv, (C.GLenum)(target), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func TexParameterIuiv(target uint32, pname uint32, params *uint32) { + C.glowTexParameterIuiv(gpTexParameterIuiv, (C.GLenum)(target), (C.GLenum)(pname), (*C.GLuint)(unsafe.Pointer(params))) +} +func TexParameterf(target uint32, pname uint32, param float32) { + C.glowTexParameterf(gpTexParameterf, (C.GLenum)(target), (C.GLenum)(pname), (C.GLfloat)(param)) +} +func TexParameterfv(target uint32, pname uint32, params *float32) { + C.glowTexParameterfv(gpTexParameterfv, (C.GLenum)(target), (C.GLenum)(pname), (*C.GLfloat)(unsafe.Pointer(params))) +} +func TexParameteri(target uint32, pname uint32, param int32) { + C.glowTexParameteri(gpTexParameteri, (C.GLenum)(target), (C.GLenum)(pname), (C.GLint)(param)) +} +func TexParameteriv(target uint32, pname uint32, params *int32) { + C.glowTexParameteriv(gpTexParameteriv, (C.GLenum)(target), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} + +// simultaneously specify storage for all levels of a one-dimensional texture +func TexStorage1D(target uint32, levels int32, internalformat uint32, width int32) { + C.glowTexStorage1D(gpTexStorage1D, (C.GLenum)(target), (C.GLsizei)(levels), (C.GLenum)(internalformat), (C.GLsizei)(width)) +} + +// simultaneously specify storage for all levels of a two-dimensional or one-dimensional array texture +func TexStorage2D(target uint32, levels int32, internalformat uint32, width int32, height int32) { + C.glowTexStorage2D(gpTexStorage2D, (C.GLenum)(target), (C.GLsizei)(levels), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height)) +} + +// specify storage for a two-dimensional multisample texture +func TexStorage2DMultisample(target uint32, samples int32, internalformat uint32, width int32, height int32, fixedsamplelocations bool) { + C.glowTexStorage2DMultisample(gpTexStorage2DMultisample, (C.GLenum)(target), (C.GLsizei)(samples), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLboolean)(boolToInt(fixedsamplelocations))) +} + +// simultaneously specify storage for all levels of a three-dimensional, two-dimensional array or cube-map array texture +func TexStorage3D(target uint32, levels int32, internalformat uint32, width int32, height int32, depth int32) { + C.glowTexStorage3D(gpTexStorage3D, (C.GLenum)(target), (C.GLsizei)(levels), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth)) +} + +// specify storage for a two-dimensional multisample array texture +func TexStorage3DMultisample(target uint32, samples int32, internalformat uint32, width int32, height int32, depth int32, fixedsamplelocations bool) { + C.glowTexStorage3DMultisample(gpTexStorage3DMultisample, (C.GLenum)(target), (C.GLsizei)(samples), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth), (C.GLboolean)(boolToInt(fixedsamplelocations))) +} + +// specify a one-dimensional texture subimage +func TexSubImage1D(target uint32, level int32, xoffset int32, width int32, format uint32, xtype uint32, pixels unsafe.Pointer) { + C.glowTexSubImage1D(gpTexSubImage1D, (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLsizei)(width), (C.GLenum)(format), (C.GLenum)(xtype), pixels) +} + +// specify a two-dimensional texture subimage +func TexSubImage2D(target uint32, level int32, xoffset int32, yoffset int32, width int32, height int32, format uint32, xtype uint32, pixels unsafe.Pointer) { + C.glowTexSubImage2D(gpTexSubImage2D, (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLenum)(format), (C.GLenum)(xtype), pixels) +} + +// specify a three-dimensional texture subimage +func TexSubImage3D(target uint32, level int32, xoffset int32, yoffset int32, zoffset int32, width int32, height int32, depth int32, format uint32, xtype uint32, pixels unsafe.Pointer) { + C.glowTexSubImage3D(gpTexSubImage3D, (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLint)(zoffset), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth), (C.GLenum)(format), (C.GLenum)(xtype), pixels) +} + +// controls the ordering of reads and writes to rendered fragments across drawing commands +func TextureBarrier() { + C.glowTextureBarrier(gpTextureBarrier) +} +func TextureBarrierNV() { + C.glowTextureBarrierNV(gpTextureBarrierNV) +} + +// attach a buffer object's data store to a buffer texture object +func TextureBuffer(texture uint32, internalformat uint32, buffer uint32) { + C.glowTextureBuffer(gpTextureBuffer, (C.GLuint)(texture), (C.GLenum)(internalformat), (C.GLuint)(buffer)) +} +func TextureBufferEXT(texture uint32, target uint32, internalformat uint32, buffer uint32) { + C.glowTextureBufferEXT(gpTextureBufferEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLenum)(internalformat), (C.GLuint)(buffer)) +} + +// attach a range of a buffer object's data store to a buffer texture object +func TextureBufferRange(texture uint32, internalformat uint32, buffer uint32, offset int, size int) { + C.glowTextureBufferRange(gpTextureBufferRange, (C.GLuint)(texture), (C.GLenum)(internalformat), (C.GLuint)(buffer), (C.GLintptr)(offset), (C.GLsizeiptr)(size)) +} +func TextureBufferRangeEXT(texture uint32, target uint32, internalformat uint32, buffer uint32, offset int, size int) { + C.glowTextureBufferRangeEXT(gpTextureBufferRangeEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLenum)(internalformat), (C.GLuint)(buffer), (C.GLintptr)(offset), (C.GLsizeiptr)(size)) +} +func TextureImage1DEXT(texture uint32, target uint32, level int32, internalformat int32, width int32, border int32, format uint32, xtype uint32, pixels unsafe.Pointer) { + C.glowTextureImage1DEXT(gpTextureImage1DEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLint)(level), (C.GLint)(internalformat), (C.GLsizei)(width), (C.GLint)(border), (C.GLenum)(format), (C.GLenum)(xtype), pixels) +} +func TextureImage2DEXT(texture uint32, target uint32, level int32, internalformat int32, width int32, height int32, border int32, format uint32, xtype uint32, pixels unsafe.Pointer) { + C.glowTextureImage2DEXT(gpTextureImage2DEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLint)(level), (C.GLint)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLint)(border), (C.GLenum)(format), (C.GLenum)(xtype), pixels) +} +func TextureImage3DEXT(texture uint32, target uint32, level int32, internalformat int32, width int32, height int32, depth int32, border int32, format uint32, xtype uint32, pixels unsafe.Pointer) { + C.glowTextureImage3DEXT(gpTextureImage3DEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLint)(level), (C.GLint)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth), (C.GLint)(border), (C.GLenum)(format), (C.GLenum)(xtype), pixels) +} +func TexturePageCommitmentEXT(texture uint32, level int32, xoffset int32, yoffset int32, zoffset int32, width int32, height int32, depth int32, commit bool) { + C.glowTexturePageCommitmentEXT(gpTexturePageCommitmentEXT, (C.GLuint)(texture), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLint)(zoffset), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth), (C.GLboolean)(boolToInt(commit))) +} +func TextureParameterIiv(texture uint32, pname uint32, params *int32) { + C.glowTextureParameterIiv(gpTextureParameterIiv, (C.GLuint)(texture), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func TextureParameterIivEXT(texture uint32, target uint32, pname uint32, params *int32) { + C.glowTextureParameterIivEXT(gpTextureParameterIivEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func TextureParameterIuiv(texture uint32, pname uint32, params *uint32) { + C.glowTextureParameterIuiv(gpTextureParameterIuiv, (C.GLuint)(texture), (C.GLenum)(pname), (*C.GLuint)(unsafe.Pointer(params))) +} +func TextureParameterIuivEXT(texture uint32, target uint32, pname uint32, params *uint32) { + C.glowTextureParameterIuivEXT(gpTextureParameterIuivEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLenum)(pname), (*C.GLuint)(unsafe.Pointer(params))) +} +func TextureParameterf(texture uint32, pname uint32, param float32) { + C.glowTextureParameterf(gpTextureParameterf, (C.GLuint)(texture), (C.GLenum)(pname), (C.GLfloat)(param)) +} +func TextureParameterfEXT(texture uint32, target uint32, pname uint32, param float32) { + C.glowTextureParameterfEXT(gpTextureParameterfEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLenum)(pname), (C.GLfloat)(param)) +} +func TextureParameterfv(texture uint32, pname uint32, param *float32) { + C.glowTextureParameterfv(gpTextureParameterfv, (C.GLuint)(texture), (C.GLenum)(pname), (*C.GLfloat)(unsafe.Pointer(param))) +} +func TextureParameterfvEXT(texture uint32, target uint32, pname uint32, params *float32) { + C.glowTextureParameterfvEXT(gpTextureParameterfvEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLenum)(pname), (*C.GLfloat)(unsafe.Pointer(params))) +} +func TextureParameteri(texture uint32, pname uint32, param int32) { + C.glowTextureParameteri(gpTextureParameteri, (C.GLuint)(texture), (C.GLenum)(pname), (C.GLint)(param)) +} +func TextureParameteriEXT(texture uint32, target uint32, pname uint32, param int32) { + C.glowTextureParameteriEXT(gpTextureParameteriEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLenum)(pname), (C.GLint)(param)) +} +func TextureParameteriv(texture uint32, pname uint32, param *int32) { + C.glowTextureParameteriv(gpTextureParameteriv, (C.GLuint)(texture), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(param))) +} +func TextureParameterivEXT(texture uint32, target uint32, pname uint32, params *int32) { + C.glowTextureParameterivEXT(gpTextureParameterivEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params))) +} +func TextureRenderbufferEXT(texture uint32, target uint32, renderbuffer uint32) { + C.glowTextureRenderbufferEXT(gpTextureRenderbufferEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLuint)(renderbuffer)) +} + +// simultaneously specify storage for all levels of a one-dimensional texture +func TextureStorage1D(texture uint32, levels int32, internalformat uint32, width int32) { + C.glowTextureStorage1D(gpTextureStorage1D, (C.GLuint)(texture), (C.GLsizei)(levels), (C.GLenum)(internalformat), (C.GLsizei)(width)) +} +func TextureStorage1DEXT(texture uint32, target uint32, levels int32, internalformat uint32, width int32) { + C.glowTextureStorage1DEXT(gpTextureStorage1DEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLsizei)(levels), (C.GLenum)(internalformat), (C.GLsizei)(width)) +} + +// simultaneously specify storage for all levels of a two-dimensional or one-dimensional array texture +func TextureStorage2D(texture uint32, levels int32, internalformat uint32, width int32, height int32) { + C.glowTextureStorage2D(gpTextureStorage2D, (C.GLuint)(texture), (C.GLsizei)(levels), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height)) +} +func TextureStorage2DEXT(texture uint32, target uint32, levels int32, internalformat uint32, width int32, height int32) { + C.glowTextureStorage2DEXT(gpTextureStorage2DEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLsizei)(levels), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height)) +} + +// specify storage for a two-dimensional multisample texture +func TextureStorage2DMultisample(texture uint32, samples int32, internalformat uint32, width int32, height int32, fixedsamplelocations bool) { + C.glowTextureStorage2DMultisample(gpTextureStorage2DMultisample, (C.GLuint)(texture), (C.GLsizei)(samples), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLboolean)(boolToInt(fixedsamplelocations))) +} +func TextureStorage2DMultisampleEXT(texture uint32, target uint32, samples int32, internalformat uint32, width int32, height int32, fixedsamplelocations bool) { + C.glowTextureStorage2DMultisampleEXT(gpTextureStorage2DMultisampleEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLsizei)(samples), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLboolean)(boolToInt(fixedsamplelocations))) +} + +// simultaneously specify storage for all levels of a three-dimensional, two-dimensional array or cube-map array texture +func TextureStorage3D(texture uint32, levels int32, internalformat uint32, width int32, height int32, depth int32) { + C.glowTextureStorage3D(gpTextureStorage3D, (C.GLuint)(texture), (C.GLsizei)(levels), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth)) +} +func TextureStorage3DEXT(texture uint32, target uint32, levels int32, internalformat uint32, width int32, height int32, depth int32) { + C.glowTextureStorage3DEXT(gpTextureStorage3DEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLsizei)(levels), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth)) +} + +// specify storage for a two-dimensional multisample array texture +func TextureStorage3DMultisample(texture uint32, samples int32, internalformat uint32, width int32, height int32, depth int32, fixedsamplelocations bool) { + C.glowTextureStorage3DMultisample(gpTextureStorage3DMultisample, (C.GLuint)(texture), (C.GLsizei)(samples), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth), (C.GLboolean)(boolToInt(fixedsamplelocations))) +} +func TextureStorage3DMultisampleEXT(texture uint32, target uint32, samples int32, internalformat uint32, width int32, height int32, depth int32, fixedsamplelocations bool) { + C.glowTextureStorage3DMultisampleEXT(gpTextureStorage3DMultisampleEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLsizei)(samples), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth), (C.GLboolean)(boolToInt(fixedsamplelocations))) +} + +// specify a one-dimensional texture subimage +func TextureSubImage1D(texture uint32, level int32, xoffset int32, width int32, format uint32, xtype uint32, pixels unsafe.Pointer) { + C.glowTextureSubImage1D(gpTextureSubImage1D, (C.GLuint)(texture), (C.GLint)(level), (C.GLint)(xoffset), (C.GLsizei)(width), (C.GLenum)(format), (C.GLenum)(xtype), pixels) +} +func TextureSubImage1DEXT(texture uint32, target uint32, level int32, xoffset int32, width int32, format uint32, xtype uint32, pixels unsafe.Pointer) { + C.glowTextureSubImage1DEXT(gpTextureSubImage1DEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLsizei)(width), (C.GLenum)(format), (C.GLenum)(xtype), pixels) +} + +// specify a two-dimensional texture subimage +func TextureSubImage2D(texture uint32, level int32, xoffset int32, yoffset int32, width int32, height int32, format uint32, xtype uint32, pixels unsafe.Pointer) { + C.glowTextureSubImage2D(gpTextureSubImage2D, (C.GLuint)(texture), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLenum)(format), (C.GLenum)(xtype), pixels) +} +func TextureSubImage2DEXT(texture uint32, target uint32, level int32, xoffset int32, yoffset int32, width int32, height int32, format uint32, xtype uint32, pixels unsafe.Pointer) { + C.glowTextureSubImage2DEXT(gpTextureSubImage2DEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLenum)(format), (C.GLenum)(xtype), pixels) +} + +// specify a three-dimensional texture subimage +func TextureSubImage3D(texture uint32, level int32, xoffset int32, yoffset int32, zoffset int32, width int32, height int32, depth int32, format uint32, xtype uint32, pixels unsafe.Pointer) { + C.glowTextureSubImage3D(gpTextureSubImage3D, (C.GLuint)(texture), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLint)(zoffset), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth), (C.GLenum)(format), (C.GLenum)(xtype), pixels) +} +func TextureSubImage3DEXT(texture uint32, target uint32, level int32, xoffset int32, yoffset int32, zoffset int32, width int32, height int32, depth int32, format uint32, xtype uint32, pixels unsafe.Pointer) { + C.glowTextureSubImage3DEXT(gpTextureSubImage3DEXT, (C.GLuint)(texture), (C.GLenum)(target), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLint)(zoffset), (C.GLsizei)(width), (C.GLsizei)(height), (C.GLsizei)(depth), (C.GLenum)(format), (C.GLenum)(xtype), pixels) +} + +// initialize a texture as a data alias of another texture's data store +func TextureView(texture uint32, target uint32, origtexture uint32, internalformat uint32, minlevel uint32, numlevels uint32, minlayer uint32, numlayers uint32) { + C.glowTextureView(gpTextureView, (C.GLuint)(texture), (C.GLenum)(target), (C.GLuint)(origtexture), (C.GLenum)(internalformat), (C.GLuint)(minlevel), (C.GLuint)(numlevels), (C.GLuint)(minlayer), (C.GLuint)(numlayers)) +} + +// bind a buffer object to a transform feedback buffer object +func TransformFeedbackBufferBase(xfb uint32, index uint32, buffer uint32) { + C.glowTransformFeedbackBufferBase(gpTransformFeedbackBufferBase, (C.GLuint)(xfb), (C.GLuint)(index), (C.GLuint)(buffer)) +} + +// bind a range within a buffer object to a transform feedback buffer object +func TransformFeedbackBufferRange(xfb uint32, index uint32, buffer uint32, offset int, size int) { + C.glowTransformFeedbackBufferRange(gpTransformFeedbackBufferRange, (C.GLuint)(xfb), (C.GLuint)(index), (C.GLuint)(buffer), (C.GLintptr)(offset), (C.GLsizeiptr)(size)) +} + +// specify values to record in transform feedback buffers +func TransformFeedbackVaryings(program uint32, count int32, varyings **uint8, bufferMode uint32) { + C.glowTransformFeedbackVaryings(gpTransformFeedbackVaryings, (C.GLuint)(program), (C.GLsizei)(count), (**C.GLchar)(unsafe.Pointer(varyings)), (C.GLenum)(bufferMode)) +} +func TransformPathNV(resultPath uint32, srcPath uint32, transformType uint32, transformValues *float32) { + C.glowTransformPathNV(gpTransformPathNV, (C.GLuint)(resultPath), (C.GLuint)(srcPath), (C.GLenum)(transformType), (*C.GLfloat)(unsafe.Pointer(transformValues))) +} +func Uniform1d(location int32, x float64) { + C.glowUniform1d(gpUniform1d, (C.GLint)(location), (C.GLdouble)(x)) +} +func Uniform1dv(location int32, count int32, value *float64) { + C.glowUniform1dv(gpUniform1dv, (C.GLint)(location), (C.GLsizei)(count), (*C.GLdouble)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func Uniform1f(location int32, v0 float32) { + C.glowUniform1f(gpUniform1f, (C.GLint)(location), (C.GLfloat)(v0)) +} + +// Specify the value of a uniform variable for the current program object +func Uniform1fv(location int32, count int32, value *float32) { + C.glowUniform1fv(gpUniform1fv, (C.GLint)(location), (C.GLsizei)(count), (*C.GLfloat)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func Uniform1i(location int32, v0 int32) { + C.glowUniform1i(gpUniform1i, (C.GLint)(location), (C.GLint)(v0)) +} +func Uniform1i64ARB(location int32, x int64) { + C.glowUniform1i64ARB(gpUniform1i64ARB, (C.GLint)(location), (C.GLint64)(x)) +} +func Uniform1i64NV(location int32, x int64) { + C.glowUniform1i64NV(gpUniform1i64NV, (C.GLint)(location), (C.GLint64EXT)(x)) +} +func Uniform1i64vARB(location int32, count int32, value *int64) { + C.glowUniform1i64vARB(gpUniform1i64vARB, (C.GLint)(location), (C.GLsizei)(count), (*C.GLint64)(unsafe.Pointer(value))) +} +func Uniform1i64vNV(location int32, count int32, value *int64) { + C.glowUniform1i64vNV(gpUniform1i64vNV, (C.GLint)(location), (C.GLsizei)(count), (*C.GLint64EXT)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func Uniform1iv(location int32, count int32, value *int32) { + C.glowUniform1iv(gpUniform1iv, (C.GLint)(location), (C.GLsizei)(count), (*C.GLint)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func Uniform1ui(location int32, v0 uint32) { + C.glowUniform1ui(gpUniform1ui, (C.GLint)(location), (C.GLuint)(v0)) +} +func Uniform1ui64ARB(location int32, x uint64) { + C.glowUniform1ui64ARB(gpUniform1ui64ARB, (C.GLint)(location), (C.GLuint64)(x)) +} +func Uniform1ui64NV(location int32, x uint64) { + C.glowUniform1ui64NV(gpUniform1ui64NV, (C.GLint)(location), (C.GLuint64EXT)(x)) +} +func Uniform1ui64vARB(location int32, count int32, value *uint64) { + C.glowUniform1ui64vARB(gpUniform1ui64vARB, (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint64)(unsafe.Pointer(value))) +} +func Uniform1ui64vNV(location int32, count int32, value *uint64) { + C.glowUniform1ui64vNV(gpUniform1ui64vNV, (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint64EXT)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func Uniform1uiv(location int32, count int32, value *uint32) { + C.glowUniform1uiv(gpUniform1uiv, (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(value))) +} +func Uniform2d(location int32, x float64, y float64) { + C.glowUniform2d(gpUniform2d, (C.GLint)(location), (C.GLdouble)(x), (C.GLdouble)(y)) +} +func Uniform2dv(location int32, count int32, value *float64) { + C.glowUniform2dv(gpUniform2dv, (C.GLint)(location), (C.GLsizei)(count), (*C.GLdouble)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func Uniform2f(location int32, v0 float32, v1 float32) { + C.glowUniform2f(gpUniform2f, (C.GLint)(location), (C.GLfloat)(v0), (C.GLfloat)(v1)) +} + +// Specify the value of a uniform variable for the current program object +func Uniform2fv(location int32, count int32, value *float32) { + C.glowUniform2fv(gpUniform2fv, (C.GLint)(location), (C.GLsizei)(count), (*C.GLfloat)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func Uniform2i(location int32, v0 int32, v1 int32) { + C.glowUniform2i(gpUniform2i, (C.GLint)(location), (C.GLint)(v0), (C.GLint)(v1)) +} +func Uniform2i64ARB(location int32, x int64, y int64) { + C.glowUniform2i64ARB(gpUniform2i64ARB, (C.GLint)(location), (C.GLint64)(x), (C.GLint64)(y)) +} +func Uniform2i64NV(location int32, x int64, y int64) { + C.glowUniform2i64NV(gpUniform2i64NV, (C.GLint)(location), (C.GLint64EXT)(x), (C.GLint64EXT)(y)) +} +func Uniform2i64vARB(location int32, count int32, value *int64) { + C.glowUniform2i64vARB(gpUniform2i64vARB, (C.GLint)(location), (C.GLsizei)(count), (*C.GLint64)(unsafe.Pointer(value))) +} +func Uniform2i64vNV(location int32, count int32, value *int64) { + C.glowUniform2i64vNV(gpUniform2i64vNV, (C.GLint)(location), (C.GLsizei)(count), (*C.GLint64EXT)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func Uniform2iv(location int32, count int32, value *int32) { + C.glowUniform2iv(gpUniform2iv, (C.GLint)(location), (C.GLsizei)(count), (*C.GLint)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func Uniform2ui(location int32, v0 uint32, v1 uint32) { + C.glowUniform2ui(gpUniform2ui, (C.GLint)(location), (C.GLuint)(v0), (C.GLuint)(v1)) +} +func Uniform2ui64ARB(location int32, x uint64, y uint64) { + C.glowUniform2ui64ARB(gpUniform2ui64ARB, (C.GLint)(location), (C.GLuint64)(x), (C.GLuint64)(y)) +} +func Uniform2ui64NV(location int32, x uint64, y uint64) { + C.glowUniform2ui64NV(gpUniform2ui64NV, (C.GLint)(location), (C.GLuint64EXT)(x), (C.GLuint64EXT)(y)) +} +func Uniform2ui64vARB(location int32, count int32, value *uint64) { + C.glowUniform2ui64vARB(gpUniform2ui64vARB, (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint64)(unsafe.Pointer(value))) +} +func Uniform2ui64vNV(location int32, count int32, value *uint64) { + C.glowUniform2ui64vNV(gpUniform2ui64vNV, (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint64EXT)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func Uniform2uiv(location int32, count int32, value *uint32) { + C.glowUniform2uiv(gpUniform2uiv, (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(value))) +} +func Uniform3d(location int32, x float64, y float64, z float64) { + C.glowUniform3d(gpUniform3d, (C.GLint)(location), (C.GLdouble)(x), (C.GLdouble)(y), (C.GLdouble)(z)) +} +func Uniform3dv(location int32, count int32, value *float64) { + C.glowUniform3dv(gpUniform3dv, (C.GLint)(location), (C.GLsizei)(count), (*C.GLdouble)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func Uniform3f(location int32, v0 float32, v1 float32, v2 float32) { + C.glowUniform3f(gpUniform3f, (C.GLint)(location), (C.GLfloat)(v0), (C.GLfloat)(v1), (C.GLfloat)(v2)) +} + +// Specify the value of a uniform variable for the current program object +func Uniform3fv(location int32, count int32, value *float32) { + C.glowUniform3fv(gpUniform3fv, (C.GLint)(location), (C.GLsizei)(count), (*C.GLfloat)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func Uniform3i(location int32, v0 int32, v1 int32, v2 int32) { + C.glowUniform3i(gpUniform3i, (C.GLint)(location), (C.GLint)(v0), (C.GLint)(v1), (C.GLint)(v2)) +} +func Uniform3i64ARB(location int32, x int64, y int64, z int64) { + C.glowUniform3i64ARB(gpUniform3i64ARB, (C.GLint)(location), (C.GLint64)(x), (C.GLint64)(y), (C.GLint64)(z)) +} +func Uniform3i64NV(location int32, x int64, y int64, z int64) { + C.glowUniform3i64NV(gpUniform3i64NV, (C.GLint)(location), (C.GLint64EXT)(x), (C.GLint64EXT)(y), (C.GLint64EXT)(z)) +} +func Uniform3i64vARB(location int32, count int32, value *int64) { + C.glowUniform3i64vARB(gpUniform3i64vARB, (C.GLint)(location), (C.GLsizei)(count), (*C.GLint64)(unsafe.Pointer(value))) +} +func Uniform3i64vNV(location int32, count int32, value *int64) { + C.glowUniform3i64vNV(gpUniform3i64vNV, (C.GLint)(location), (C.GLsizei)(count), (*C.GLint64EXT)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func Uniform3iv(location int32, count int32, value *int32) { + C.glowUniform3iv(gpUniform3iv, (C.GLint)(location), (C.GLsizei)(count), (*C.GLint)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func Uniform3ui(location int32, v0 uint32, v1 uint32, v2 uint32) { + C.glowUniform3ui(gpUniform3ui, (C.GLint)(location), (C.GLuint)(v0), (C.GLuint)(v1), (C.GLuint)(v2)) +} +func Uniform3ui64ARB(location int32, x uint64, y uint64, z uint64) { + C.glowUniform3ui64ARB(gpUniform3ui64ARB, (C.GLint)(location), (C.GLuint64)(x), (C.GLuint64)(y), (C.GLuint64)(z)) +} +func Uniform3ui64NV(location int32, x uint64, y uint64, z uint64) { + C.glowUniform3ui64NV(gpUniform3ui64NV, (C.GLint)(location), (C.GLuint64EXT)(x), (C.GLuint64EXT)(y), (C.GLuint64EXT)(z)) +} +func Uniform3ui64vARB(location int32, count int32, value *uint64) { + C.glowUniform3ui64vARB(gpUniform3ui64vARB, (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint64)(unsafe.Pointer(value))) +} +func Uniform3ui64vNV(location int32, count int32, value *uint64) { + C.glowUniform3ui64vNV(gpUniform3ui64vNV, (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint64EXT)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func Uniform3uiv(location int32, count int32, value *uint32) { + C.glowUniform3uiv(gpUniform3uiv, (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(value))) +} +func Uniform4d(location int32, x float64, y float64, z float64, w float64) { + C.glowUniform4d(gpUniform4d, (C.GLint)(location), (C.GLdouble)(x), (C.GLdouble)(y), (C.GLdouble)(z), (C.GLdouble)(w)) +} +func Uniform4dv(location int32, count int32, value *float64) { + C.glowUniform4dv(gpUniform4dv, (C.GLint)(location), (C.GLsizei)(count), (*C.GLdouble)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func Uniform4f(location int32, v0 float32, v1 float32, v2 float32, v3 float32) { + C.glowUniform4f(gpUniform4f, (C.GLint)(location), (C.GLfloat)(v0), (C.GLfloat)(v1), (C.GLfloat)(v2), (C.GLfloat)(v3)) +} + +// Specify the value of a uniform variable for the current program object +func Uniform4fv(location int32, count int32, value *float32) { + C.glowUniform4fv(gpUniform4fv, (C.GLint)(location), (C.GLsizei)(count), (*C.GLfloat)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func Uniform4i(location int32, v0 int32, v1 int32, v2 int32, v3 int32) { + C.glowUniform4i(gpUniform4i, (C.GLint)(location), (C.GLint)(v0), (C.GLint)(v1), (C.GLint)(v2), (C.GLint)(v3)) +} +func Uniform4i64ARB(location int32, x int64, y int64, z int64, w int64) { + C.glowUniform4i64ARB(gpUniform4i64ARB, (C.GLint)(location), (C.GLint64)(x), (C.GLint64)(y), (C.GLint64)(z), (C.GLint64)(w)) +} +func Uniform4i64NV(location int32, x int64, y int64, z int64, w int64) { + C.glowUniform4i64NV(gpUniform4i64NV, (C.GLint)(location), (C.GLint64EXT)(x), (C.GLint64EXT)(y), (C.GLint64EXT)(z), (C.GLint64EXT)(w)) +} +func Uniform4i64vARB(location int32, count int32, value *int64) { + C.glowUniform4i64vARB(gpUniform4i64vARB, (C.GLint)(location), (C.GLsizei)(count), (*C.GLint64)(unsafe.Pointer(value))) +} +func Uniform4i64vNV(location int32, count int32, value *int64) { + C.glowUniform4i64vNV(gpUniform4i64vNV, (C.GLint)(location), (C.GLsizei)(count), (*C.GLint64EXT)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func Uniform4iv(location int32, count int32, value *int32) { + C.glowUniform4iv(gpUniform4iv, (C.GLint)(location), (C.GLsizei)(count), (*C.GLint)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func Uniform4ui(location int32, v0 uint32, v1 uint32, v2 uint32, v3 uint32) { + C.glowUniform4ui(gpUniform4ui, (C.GLint)(location), (C.GLuint)(v0), (C.GLuint)(v1), (C.GLuint)(v2), (C.GLuint)(v3)) +} +func Uniform4ui64ARB(location int32, x uint64, y uint64, z uint64, w uint64) { + C.glowUniform4ui64ARB(gpUniform4ui64ARB, (C.GLint)(location), (C.GLuint64)(x), (C.GLuint64)(y), (C.GLuint64)(z), (C.GLuint64)(w)) +} +func Uniform4ui64NV(location int32, x uint64, y uint64, z uint64, w uint64) { + C.glowUniform4ui64NV(gpUniform4ui64NV, (C.GLint)(location), (C.GLuint64EXT)(x), (C.GLuint64EXT)(y), (C.GLuint64EXT)(z), (C.GLuint64EXT)(w)) +} +func Uniform4ui64vARB(location int32, count int32, value *uint64) { + C.glowUniform4ui64vARB(gpUniform4ui64vARB, (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint64)(unsafe.Pointer(value))) +} +func Uniform4ui64vNV(location int32, count int32, value *uint64) { + C.glowUniform4ui64vNV(gpUniform4ui64vNV, (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint64EXT)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func Uniform4uiv(location int32, count int32, value *uint32) { + C.glowUniform4uiv(gpUniform4uiv, (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(value))) +} + +// assign a binding point to an active uniform block +func UniformBlockBinding(program uint32, uniformBlockIndex uint32, uniformBlockBinding uint32) { + C.glowUniformBlockBinding(gpUniformBlockBinding, (C.GLuint)(program), (C.GLuint)(uniformBlockIndex), (C.GLuint)(uniformBlockBinding)) +} +func UniformHandleui64ARB(location int32, value uint64) { + C.glowUniformHandleui64ARB(gpUniformHandleui64ARB, (C.GLint)(location), (C.GLuint64)(value)) +} +func UniformHandleui64NV(location int32, value uint64) { + C.glowUniformHandleui64NV(gpUniformHandleui64NV, (C.GLint)(location), (C.GLuint64)(value)) +} +func UniformHandleui64vARB(location int32, count int32, value *uint64) { + C.glowUniformHandleui64vARB(gpUniformHandleui64vARB, (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint64)(unsafe.Pointer(value))) +} +func UniformHandleui64vNV(location int32, count int32, value *uint64) { + C.glowUniformHandleui64vNV(gpUniformHandleui64vNV, (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint64)(unsafe.Pointer(value))) +} +func UniformMatrix2dv(location int32, count int32, transpose bool, value *float64) { + C.glowUniformMatrix2dv(gpUniformMatrix2dv, (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func UniformMatrix2fv(location int32, count int32, transpose bool, value *float32) { + C.glowUniformMatrix2fv(gpUniformMatrix2fv, (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func UniformMatrix2x3dv(location int32, count int32, transpose bool, value *float64) { + C.glowUniformMatrix2x3dv(gpUniformMatrix2x3dv, (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func UniformMatrix2x3fv(location int32, count int32, transpose bool, value *float32) { + C.glowUniformMatrix2x3fv(gpUniformMatrix2x3fv, (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func UniformMatrix2x4dv(location int32, count int32, transpose bool, value *float64) { + C.glowUniformMatrix2x4dv(gpUniformMatrix2x4dv, (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func UniformMatrix2x4fv(location int32, count int32, transpose bool, value *float32) { + C.glowUniformMatrix2x4fv(gpUniformMatrix2x4fv, (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func UniformMatrix3dv(location int32, count int32, transpose bool, value *float64) { + C.glowUniformMatrix3dv(gpUniformMatrix3dv, (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func UniformMatrix3fv(location int32, count int32, transpose bool, value *float32) { + C.glowUniformMatrix3fv(gpUniformMatrix3fv, (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func UniformMatrix3x2dv(location int32, count int32, transpose bool, value *float64) { + C.glowUniformMatrix3x2dv(gpUniformMatrix3x2dv, (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func UniformMatrix3x2fv(location int32, count int32, transpose bool, value *float32) { + C.glowUniformMatrix3x2fv(gpUniformMatrix3x2fv, (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func UniformMatrix3x4dv(location int32, count int32, transpose bool, value *float64) { + C.glowUniformMatrix3x4dv(gpUniformMatrix3x4dv, (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func UniformMatrix3x4fv(location int32, count int32, transpose bool, value *float32) { + C.glowUniformMatrix3x4fv(gpUniformMatrix3x4fv, (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func UniformMatrix4dv(location int32, count int32, transpose bool, value *float64) { + C.glowUniformMatrix4dv(gpUniformMatrix4dv, (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func UniformMatrix4fv(location int32, count int32, transpose bool, value *float32) { + C.glowUniformMatrix4fv(gpUniformMatrix4fv, (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func UniformMatrix4x2dv(location int32, count int32, transpose bool, value *float64) { + C.glowUniformMatrix4x2dv(gpUniformMatrix4x2dv, (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func UniformMatrix4x2fv(location int32, count int32, transpose bool, value *float32) { + C.glowUniformMatrix4x2fv(gpUniformMatrix4x2fv, (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func UniformMatrix4x3dv(location int32, count int32, transpose bool, value *float64) { + C.glowUniformMatrix4x3dv(gpUniformMatrix4x3dv, (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLdouble)(unsafe.Pointer(value))) +} + +// Specify the value of a uniform variable for the current program object +func UniformMatrix4x3fv(location int32, count int32, transpose bool, value *float32) { + C.glowUniformMatrix4x3fv(gpUniformMatrix4x3fv, (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value))) +} +func UniformSubroutinesuiv(shadertype uint32, count int32, indices *uint32) { + C.glowUniformSubroutinesuiv(gpUniformSubroutinesuiv, (C.GLenum)(shadertype), (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(indices))) +} +func Uniformui64NV(location int32, value uint64) { + C.glowUniformui64NV(gpUniformui64NV, (C.GLint)(location), (C.GLuint64EXT)(value)) +} +func Uniformui64vNV(location int32, count int32, value *uint64) { + C.glowUniformui64vNV(gpUniformui64vNV, (C.GLint)(location), (C.GLsizei)(count), (*C.GLuint64EXT)(unsafe.Pointer(value))) +} + +// release the mapping of a buffer object's data store into the client's address space +func UnmapBuffer(target uint32) bool { + ret := C.glowUnmapBuffer(gpUnmapBuffer, (C.GLenum)(target)) + return ret == TRUE +} + +// release the mapping of a buffer object's data store into the client's address space +func UnmapNamedBuffer(buffer uint32) bool { + ret := C.glowUnmapNamedBuffer(gpUnmapNamedBuffer, (C.GLuint)(buffer)) + return ret == TRUE +} +func UnmapNamedBufferEXT(buffer uint32) bool { + ret := C.glowUnmapNamedBufferEXT(gpUnmapNamedBufferEXT, (C.GLuint)(buffer)) + return ret == TRUE +} + +// Installs a program object as part of current rendering state +func UseProgram(program uint32) { + C.glowUseProgram(gpUseProgram, (C.GLuint)(program)) +} + +// bind stages of a program object to a program pipeline +func UseProgramStages(pipeline uint32, stages uint32, program uint32) { + C.glowUseProgramStages(gpUseProgramStages, (C.GLuint)(pipeline), (C.GLbitfield)(stages), (C.GLuint)(program)) +} +func UseProgramStagesEXT(pipeline uint32, stages uint32, program uint32) { + C.glowUseProgramStagesEXT(gpUseProgramStagesEXT, (C.GLuint)(pipeline), (C.GLbitfield)(stages), (C.GLuint)(program)) +} +func UseShaderProgramEXT(xtype uint32, program uint32) { + C.glowUseShaderProgramEXT(gpUseShaderProgramEXT, (C.GLenum)(xtype), (C.GLuint)(program)) +} + +// Validates a program object +func ValidateProgram(program uint32) { + C.glowValidateProgram(gpValidateProgram, (C.GLuint)(program)) +} + +// validate a program pipeline object against current GL state +func ValidateProgramPipeline(pipeline uint32) { + C.glowValidateProgramPipeline(gpValidateProgramPipeline, (C.GLuint)(pipeline)) +} +func ValidateProgramPipelineEXT(pipeline uint32) { + C.glowValidateProgramPipelineEXT(gpValidateProgramPipelineEXT, (C.GLuint)(pipeline)) +} +func VertexArrayAttribBinding(vaobj uint32, attribindex uint32, bindingindex uint32) { + C.glowVertexArrayAttribBinding(gpVertexArrayAttribBinding, (C.GLuint)(vaobj), (C.GLuint)(attribindex), (C.GLuint)(bindingindex)) +} + +// specify the organization of vertex arrays +func VertexArrayAttribFormat(vaobj uint32, attribindex uint32, size int32, xtype uint32, normalized bool, relativeoffset uint32) { + C.glowVertexArrayAttribFormat(gpVertexArrayAttribFormat, (C.GLuint)(vaobj), (C.GLuint)(attribindex), (C.GLint)(size), (C.GLenum)(xtype), (C.GLboolean)(boolToInt(normalized)), (C.GLuint)(relativeoffset)) +} +func VertexArrayAttribIFormat(vaobj uint32, attribindex uint32, size int32, xtype uint32, relativeoffset uint32) { + C.glowVertexArrayAttribIFormat(gpVertexArrayAttribIFormat, (C.GLuint)(vaobj), (C.GLuint)(attribindex), (C.GLint)(size), (C.GLenum)(xtype), (C.GLuint)(relativeoffset)) +} +func VertexArrayAttribLFormat(vaobj uint32, attribindex uint32, size int32, xtype uint32, relativeoffset uint32) { + C.glowVertexArrayAttribLFormat(gpVertexArrayAttribLFormat, (C.GLuint)(vaobj), (C.GLuint)(attribindex), (C.GLint)(size), (C.GLenum)(xtype), (C.GLuint)(relativeoffset)) +} +func VertexArrayBindVertexBufferEXT(vaobj uint32, bindingindex uint32, buffer uint32, offset int, stride int32) { + C.glowVertexArrayBindVertexBufferEXT(gpVertexArrayBindVertexBufferEXT, (C.GLuint)(vaobj), (C.GLuint)(bindingindex), (C.GLuint)(buffer), (C.GLintptr)(offset), (C.GLsizei)(stride)) +} + +// modify the rate at which generic vertex attributes advance +func VertexArrayBindingDivisor(vaobj uint32, bindingindex uint32, divisor uint32) { + C.glowVertexArrayBindingDivisor(gpVertexArrayBindingDivisor, (C.GLuint)(vaobj), (C.GLuint)(bindingindex), (C.GLuint)(divisor)) +} +func VertexArrayColorOffsetEXT(vaobj uint32, buffer uint32, size int32, xtype uint32, stride int32, offset int) { + C.glowVertexArrayColorOffsetEXT(gpVertexArrayColorOffsetEXT, (C.GLuint)(vaobj), (C.GLuint)(buffer), (C.GLint)(size), (C.GLenum)(xtype), (C.GLsizei)(stride), (C.GLintptr)(offset)) +} +func VertexArrayEdgeFlagOffsetEXT(vaobj uint32, buffer uint32, stride int32, offset int) { + C.glowVertexArrayEdgeFlagOffsetEXT(gpVertexArrayEdgeFlagOffsetEXT, (C.GLuint)(vaobj), (C.GLuint)(buffer), (C.GLsizei)(stride), (C.GLintptr)(offset)) +} + +// configures element array buffer binding of a vertex array object +func VertexArrayElementBuffer(vaobj uint32, buffer uint32) { + C.glowVertexArrayElementBuffer(gpVertexArrayElementBuffer, (C.GLuint)(vaobj), (C.GLuint)(buffer)) +} +func VertexArrayFogCoordOffsetEXT(vaobj uint32, buffer uint32, xtype uint32, stride int32, offset int) { + C.glowVertexArrayFogCoordOffsetEXT(gpVertexArrayFogCoordOffsetEXT, (C.GLuint)(vaobj), (C.GLuint)(buffer), (C.GLenum)(xtype), (C.GLsizei)(stride), (C.GLintptr)(offset)) +} +func VertexArrayIndexOffsetEXT(vaobj uint32, buffer uint32, xtype uint32, stride int32, offset int) { + C.glowVertexArrayIndexOffsetEXT(gpVertexArrayIndexOffsetEXT, (C.GLuint)(vaobj), (C.GLuint)(buffer), (C.GLenum)(xtype), (C.GLsizei)(stride), (C.GLintptr)(offset)) +} +func VertexArrayMultiTexCoordOffsetEXT(vaobj uint32, buffer uint32, texunit uint32, size int32, xtype uint32, stride int32, offset int) { + C.glowVertexArrayMultiTexCoordOffsetEXT(gpVertexArrayMultiTexCoordOffsetEXT, (C.GLuint)(vaobj), (C.GLuint)(buffer), (C.GLenum)(texunit), (C.GLint)(size), (C.GLenum)(xtype), (C.GLsizei)(stride), (C.GLintptr)(offset)) +} +func VertexArrayNormalOffsetEXT(vaobj uint32, buffer uint32, xtype uint32, stride int32, offset int) { + C.glowVertexArrayNormalOffsetEXT(gpVertexArrayNormalOffsetEXT, (C.GLuint)(vaobj), (C.GLuint)(buffer), (C.GLenum)(xtype), (C.GLsizei)(stride), (C.GLintptr)(offset)) +} +func VertexArraySecondaryColorOffsetEXT(vaobj uint32, buffer uint32, size int32, xtype uint32, stride int32, offset int) { + C.glowVertexArraySecondaryColorOffsetEXT(gpVertexArraySecondaryColorOffsetEXT, (C.GLuint)(vaobj), (C.GLuint)(buffer), (C.GLint)(size), (C.GLenum)(xtype), (C.GLsizei)(stride), (C.GLintptr)(offset)) +} +func VertexArrayTexCoordOffsetEXT(vaobj uint32, buffer uint32, size int32, xtype uint32, stride int32, offset int) { + C.glowVertexArrayTexCoordOffsetEXT(gpVertexArrayTexCoordOffsetEXT, (C.GLuint)(vaobj), (C.GLuint)(buffer), (C.GLint)(size), (C.GLenum)(xtype), (C.GLsizei)(stride), (C.GLintptr)(offset)) +} +func VertexArrayVertexAttribBindingEXT(vaobj uint32, attribindex uint32, bindingindex uint32) { + C.glowVertexArrayVertexAttribBindingEXT(gpVertexArrayVertexAttribBindingEXT, (C.GLuint)(vaobj), (C.GLuint)(attribindex), (C.GLuint)(bindingindex)) +} +func VertexArrayVertexAttribDivisorEXT(vaobj uint32, index uint32, divisor uint32) { + C.glowVertexArrayVertexAttribDivisorEXT(gpVertexArrayVertexAttribDivisorEXT, (C.GLuint)(vaobj), (C.GLuint)(index), (C.GLuint)(divisor)) +} +func VertexArrayVertexAttribFormatEXT(vaobj uint32, attribindex uint32, size int32, xtype uint32, normalized bool, relativeoffset uint32) { + C.glowVertexArrayVertexAttribFormatEXT(gpVertexArrayVertexAttribFormatEXT, (C.GLuint)(vaobj), (C.GLuint)(attribindex), (C.GLint)(size), (C.GLenum)(xtype), (C.GLboolean)(boolToInt(normalized)), (C.GLuint)(relativeoffset)) +} +func VertexArrayVertexAttribIFormatEXT(vaobj uint32, attribindex uint32, size int32, xtype uint32, relativeoffset uint32) { + C.glowVertexArrayVertexAttribIFormatEXT(gpVertexArrayVertexAttribIFormatEXT, (C.GLuint)(vaobj), (C.GLuint)(attribindex), (C.GLint)(size), (C.GLenum)(xtype), (C.GLuint)(relativeoffset)) +} +func VertexArrayVertexAttribIOffsetEXT(vaobj uint32, buffer uint32, index uint32, size int32, xtype uint32, stride int32, offset int) { + C.glowVertexArrayVertexAttribIOffsetEXT(gpVertexArrayVertexAttribIOffsetEXT, (C.GLuint)(vaobj), (C.GLuint)(buffer), (C.GLuint)(index), (C.GLint)(size), (C.GLenum)(xtype), (C.GLsizei)(stride), (C.GLintptr)(offset)) +} +func VertexArrayVertexAttribLFormatEXT(vaobj uint32, attribindex uint32, size int32, xtype uint32, relativeoffset uint32) { + C.glowVertexArrayVertexAttribLFormatEXT(gpVertexArrayVertexAttribLFormatEXT, (C.GLuint)(vaobj), (C.GLuint)(attribindex), (C.GLint)(size), (C.GLenum)(xtype), (C.GLuint)(relativeoffset)) +} +func VertexArrayVertexAttribLOffsetEXT(vaobj uint32, buffer uint32, index uint32, size int32, xtype uint32, stride int32, offset int) { + C.glowVertexArrayVertexAttribLOffsetEXT(gpVertexArrayVertexAttribLOffsetEXT, (C.GLuint)(vaobj), (C.GLuint)(buffer), (C.GLuint)(index), (C.GLint)(size), (C.GLenum)(xtype), (C.GLsizei)(stride), (C.GLintptr)(offset)) +} +func VertexArrayVertexAttribOffsetEXT(vaobj uint32, buffer uint32, index uint32, size int32, xtype uint32, normalized bool, stride int32, offset int) { + C.glowVertexArrayVertexAttribOffsetEXT(gpVertexArrayVertexAttribOffsetEXT, (C.GLuint)(vaobj), (C.GLuint)(buffer), (C.GLuint)(index), (C.GLint)(size), (C.GLenum)(xtype), (C.GLboolean)(boolToInt(normalized)), (C.GLsizei)(stride), (C.GLintptr)(offset)) +} +func VertexArrayVertexBindingDivisorEXT(vaobj uint32, bindingindex uint32, divisor uint32) { + C.glowVertexArrayVertexBindingDivisorEXT(gpVertexArrayVertexBindingDivisorEXT, (C.GLuint)(vaobj), (C.GLuint)(bindingindex), (C.GLuint)(divisor)) +} + +// bind a buffer to a vertex buffer bind point +func VertexArrayVertexBuffer(vaobj uint32, bindingindex uint32, buffer uint32, offset int, stride int32) { + C.glowVertexArrayVertexBuffer(gpVertexArrayVertexBuffer, (C.GLuint)(vaobj), (C.GLuint)(bindingindex), (C.GLuint)(buffer), (C.GLintptr)(offset), (C.GLsizei)(stride)) +} + +// attach multiple buffer objects to a vertex array object +func VertexArrayVertexBuffers(vaobj uint32, first uint32, count int32, buffers *uint32, offsets *int, strides *int32) { + C.glowVertexArrayVertexBuffers(gpVertexArrayVertexBuffers, (C.GLuint)(vaobj), (C.GLuint)(first), (C.GLsizei)(count), (*C.GLuint)(unsafe.Pointer(buffers)), (*C.GLintptr)(unsafe.Pointer(offsets)), (*C.GLsizei)(unsafe.Pointer(strides))) +} +func VertexArrayVertexOffsetEXT(vaobj uint32, buffer uint32, size int32, xtype uint32, stride int32, offset int) { + C.glowVertexArrayVertexOffsetEXT(gpVertexArrayVertexOffsetEXT, (C.GLuint)(vaobj), (C.GLuint)(buffer), (C.GLint)(size), (C.GLenum)(xtype), (C.GLsizei)(stride), (C.GLintptr)(offset)) +} +func VertexAttrib1d(index uint32, x float64) { + C.glowVertexAttrib1d(gpVertexAttrib1d, (C.GLuint)(index), (C.GLdouble)(x)) +} +func VertexAttrib1dv(index uint32, v *float64) { + C.glowVertexAttrib1dv(gpVertexAttrib1dv, (C.GLuint)(index), (*C.GLdouble)(unsafe.Pointer(v))) +} +func VertexAttrib1f(index uint32, x float32) { + C.glowVertexAttrib1f(gpVertexAttrib1f, (C.GLuint)(index), (C.GLfloat)(x)) +} +func VertexAttrib1fv(index uint32, v *float32) { + C.glowVertexAttrib1fv(gpVertexAttrib1fv, (C.GLuint)(index), (*C.GLfloat)(unsafe.Pointer(v))) +} +func VertexAttrib1s(index uint32, x int16) { + C.glowVertexAttrib1s(gpVertexAttrib1s, (C.GLuint)(index), (C.GLshort)(x)) +} +func VertexAttrib1sv(index uint32, v *int16) { + C.glowVertexAttrib1sv(gpVertexAttrib1sv, (C.GLuint)(index), (*C.GLshort)(unsafe.Pointer(v))) +} +func VertexAttrib2d(index uint32, x float64, y float64) { + C.glowVertexAttrib2d(gpVertexAttrib2d, (C.GLuint)(index), (C.GLdouble)(x), (C.GLdouble)(y)) +} +func VertexAttrib2dv(index uint32, v *float64) { + C.glowVertexAttrib2dv(gpVertexAttrib2dv, (C.GLuint)(index), (*C.GLdouble)(unsafe.Pointer(v))) +} +func VertexAttrib2f(index uint32, x float32, y float32) { + C.glowVertexAttrib2f(gpVertexAttrib2f, (C.GLuint)(index), (C.GLfloat)(x), (C.GLfloat)(y)) +} +func VertexAttrib2fv(index uint32, v *float32) { + C.glowVertexAttrib2fv(gpVertexAttrib2fv, (C.GLuint)(index), (*C.GLfloat)(unsafe.Pointer(v))) +} +func VertexAttrib2s(index uint32, x int16, y int16) { + C.glowVertexAttrib2s(gpVertexAttrib2s, (C.GLuint)(index), (C.GLshort)(x), (C.GLshort)(y)) +} +func VertexAttrib2sv(index uint32, v *int16) { + C.glowVertexAttrib2sv(gpVertexAttrib2sv, (C.GLuint)(index), (*C.GLshort)(unsafe.Pointer(v))) +} +func VertexAttrib3d(index uint32, x float64, y float64, z float64) { + C.glowVertexAttrib3d(gpVertexAttrib3d, (C.GLuint)(index), (C.GLdouble)(x), (C.GLdouble)(y), (C.GLdouble)(z)) +} +func VertexAttrib3dv(index uint32, v *float64) { + C.glowVertexAttrib3dv(gpVertexAttrib3dv, (C.GLuint)(index), (*C.GLdouble)(unsafe.Pointer(v))) +} +func VertexAttrib3f(index uint32, x float32, y float32, z float32) { + C.glowVertexAttrib3f(gpVertexAttrib3f, (C.GLuint)(index), (C.GLfloat)(x), (C.GLfloat)(y), (C.GLfloat)(z)) +} +func VertexAttrib3fv(index uint32, v *float32) { + C.glowVertexAttrib3fv(gpVertexAttrib3fv, (C.GLuint)(index), (*C.GLfloat)(unsafe.Pointer(v))) +} +func VertexAttrib3s(index uint32, x int16, y int16, z int16) { + C.glowVertexAttrib3s(gpVertexAttrib3s, (C.GLuint)(index), (C.GLshort)(x), (C.GLshort)(y), (C.GLshort)(z)) +} +func VertexAttrib3sv(index uint32, v *int16) { + C.glowVertexAttrib3sv(gpVertexAttrib3sv, (C.GLuint)(index), (*C.GLshort)(unsafe.Pointer(v))) +} +func VertexAttrib4Nbv(index uint32, v *int8) { + C.glowVertexAttrib4Nbv(gpVertexAttrib4Nbv, (C.GLuint)(index), (*C.GLbyte)(unsafe.Pointer(v))) +} +func VertexAttrib4Niv(index uint32, v *int32) { + C.glowVertexAttrib4Niv(gpVertexAttrib4Niv, (C.GLuint)(index), (*C.GLint)(unsafe.Pointer(v))) +} +func VertexAttrib4Nsv(index uint32, v *int16) { + C.glowVertexAttrib4Nsv(gpVertexAttrib4Nsv, (C.GLuint)(index), (*C.GLshort)(unsafe.Pointer(v))) +} +func VertexAttrib4Nub(index uint32, x uint8, y uint8, z uint8, w uint8) { + C.glowVertexAttrib4Nub(gpVertexAttrib4Nub, (C.GLuint)(index), (C.GLubyte)(x), (C.GLubyte)(y), (C.GLubyte)(z), (C.GLubyte)(w)) +} +func VertexAttrib4Nubv(index uint32, v *uint8) { + C.glowVertexAttrib4Nubv(gpVertexAttrib4Nubv, (C.GLuint)(index), (*C.GLubyte)(unsafe.Pointer(v))) +} +func VertexAttrib4Nuiv(index uint32, v *uint32) { + C.glowVertexAttrib4Nuiv(gpVertexAttrib4Nuiv, (C.GLuint)(index), (*C.GLuint)(unsafe.Pointer(v))) +} +func VertexAttrib4Nusv(index uint32, v *uint16) { + C.glowVertexAttrib4Nusv(gpVertexAttrib4Nusv, (C.GLuint)(index), (*C.GLushort)(unsafe.Pointer(v))) +} +func VertexAttrib4bv(index uint32, v *int8) { + C.glowVertexAttrib4bv(gpVertexAttrib4bv, (C.GLuint)(index), (*C.GLbyte)(unsafe.Pointer(v))) +} +func VertexAttrib4d(index uint32, x float64, y float64, z float64, w float64) { + C.glowVertexAttrib4d(gpVertexAttrib4d, (C.GLuint)(index), (C.GLdouble)(x), (C.GLdouble)(y), (C.GLdouble)(z), (C.GLdouble)(w)) +} +func VertexAttrib4dv(index uint32, v *float64) { + C.glowVertexAttrib4dv(gpVertexAttrib4dv, (C.GLuint)(index), (*C.GLdouble)(unsafe.Pointer(v))) +} +func VertexAttrib4f(index uint32, x float32, y float32, z float32, w float32) { + C.glowVertexAttrib4f(gpVertexAttrib4f, (C.GLuint)(index), (C.GLfloat)(x), (C.GLfloat)(y), (C.GLfloat)(z), (C.GLfloat)(w)) +} +func VertexAttrib4fv(index uint32, v *float32) { + C.glowVertexAttrib4fv(gpVertexAttrib4fv, (C.GLuint)(index), (*C.GLfloat)(unsafe.Pointer(v))) +} +func VertexAttrib4iv(index uint32, v *int32) { + C.glowVertexAttrib4iv(gpVertexAttrib4iv, (C.GLuint)(index), (*C.GLint)(unsafe.Pointer(v))) +} +func VertexAttrib4s(index uint32, x int16, y int16, z int16, w int16) { + C.glowVertexAttrib4s(gpVertexAttrib4s, (C.GLuint)(index), (C.GLshort)(x), (C.GLshort)(y), (C.GLshort)(z), (C.GLshort)(w)) +} +func VertexAttrib4sv(index uint32, v *int16) { + C.glowVertexAttrib4sv(gpVertexAttrib4sv, (C.GLuint)(index), (*C.GLshort)(unsafe.Pointer(v))) +} +func VertexAttrib4ubv(index uint32, v *uint8) { + C.glowVertexAttrib4ubv(gpVertexAttrib4ubv, (C.GLuint)(index), (*C.GLubyte)(unsafe.Pointer(v))) +} +func VertexAttrib4uiv(index uint32, v *uint32) { + C.glowVertexAttrib4uiv(gpVertexAttrib4uiv, (C.GLuint)(index), (*C.GLuint)(unsafe.Pointer(v))) +} +func VertexAttrib4usv(index uint32, v *uint16) { + C.glowVertexAttrib4usv(gpVertexAttrib4usv, (C.GLuint)(index), (*C.GLushort)(unsafe.Pointer(v))) +} + +// associate a vertex attribute and a vertex buffer binding for a vertex array object +func VertexAttribBinding(attribindex uint32, bindingindex uint32) { + C.glowVertexAttribBinding(gpVertexAttribBinding, (C.GLuint)(attribindex), (C.GLuint)(bindingindex)) +} + +// modify the rate at which generic vertex attributes advance during instanced rendering +func VertexAttribDivisor(index uint32, divisor uint32) { + C.glowVertexAttribDivisor(gpVertexAttribDivisor, (C.GLuint)(index), (C.GLuint)(divisor)) +} +func VertexAttribDivisorARB(index uint32, divisor uint32) { + C.glowVertexAttribDivisorARB(gpVertexAttribDivisorARB, (C.GLuint)(index), (C.GLuint)(divisor)) +} + +// specify the organization of vertex arrays +func VertexAttribFormat(attribindex uint32, size int32, xtype uint32, normalized bool, relativeoffset uint32) { + C.glowVertexAttribFormat(gpVertexAttribFormat, (C.GLuint)(attribindex), (C.GLint)(size), (C.GLenum)(xtype), (C.GLboolean)(boolToInt(normalized)), (C.GLuint)(relativeoffset)) +} +func VertexAttribFormatNV(index uint32, size int32, xtype uint32, normalized bool, stride int32) { + C.glowVertexAttribFormatNV(gpVertexAttribFormatNV, (C.GLuint)(index), (C.GLint)(size), (C.GLenum)(xtype), (C.GLboolean)(boolToInt(normalized)), (C.GLsizei)(stride)) +} +func VertexAttribI1i(index uint32, x int32) { + C.glowVertexAttribI1i(gpVertexAttribI1i, (C.GLuint)(index), (C.GLint)(x)) +} +func VertexAttribI1iv(index uint32, v *int32) { + C.glowVertexAttribI1iv(gpVertexAttribI1iv, (C.GLuint)(index), (*C.GLint)(unsafe.Pointer(v))) +} +func VertexAttribI1ui(index uint32, x uint32) { + C.glowVertexAttribI1ui(gpVertexAttribI1ui, (C.GLuint)(index), (C.GLuint)(x)) +} +func VertexAttribI1uiv(index uint32, v *uint32) { + C.glowVertexAttribI1uiv(gpVertexAttribI1uiv, (C.GLuint)(index), (*C.GLuint)(unsafe.Pointer(v))) +} +func VertexAttribI2i(index uint32, x int32, y int32) { + C.glowVertexAttribI2i(gpVertexAttribI2i, (C.GLuint)(index), (C.GLint)(x), (C.GLint)(y)) +} +func VertexAttribI2iv(index uint32, v *int32) { + C.glowVertexAttribI2iv(gpVertexAttribI2iv, (C.GLuint)(index), (*C.GLint)(unsafe.Pointer(v))) +} +func VertexAttribI2ui(index uint32, x uint32, y uint32) { + C.glowVertexAttribI2ui(gpVertexAttribI2ui, (C.GLuint)(index), (C.GLuint)(x), (C.GLuint)(y)) +} +func VertexAttribI2uiv(index uint32, v *uint32) { + C.glowVertexAttribI2uiv(gpVertexAttribI2uiv, (C.GLuint)(index), (*C.GLuint)(unsafe.Pointer(v))) +} +func VertexAttribI3i(index uint32, x int32, y int32, z int32) { + C.glowVertexAttribI3i(gpVertexAttribI3i, (C.GLuint)(index), (C.GLint)(x), (C.GLint)(y), (C.GLint)(z)) +} +func VertexAttribI3iv(index uint32, v *int32) { + C.glowVertexAttribI3iv(gpVertexAttribI3iv, (C.GLuint)(index), (*C.GLint)(unsafe.Pointer(v))) +} +func VertexAttribI3ui(index uint32, x uint32, y uint32, z uint32) { + C.glowVertexAttribI3ui(gpVertexAttribI3ui, (C.GLuint)(index), (C.GLuint)(x), (C.GLuint)(y), (C.GLuint)(z)) +} +func VertexAttribI3uiv(index uint32, v *uint32) { + C.glowVertexAttribI3uiv(gpVertexAttribI3uiv, (C.GLuint)(index), (*C.GLuint)(unsafe.Pointer(v))) +} +func VertexAttribI4bv(index uint32, v *int8) { + C.glowVertexAttribI4bv(gpVertexAttribI4bv, (C.GLuint)(index), (*C.GLbyte)(unsafe.Pointer(v))) +} +func VertexAttribI4i(index uint32, x int32, y int32, z int32, w int32) { + C.glowVertexAttribI4i(gpVertexAttribI4i, (C.GLuint)(index), (C.GLint)(x), (C.GLint)(y), (C.GLint)(z), (C.GLint)(w)) +} +func VertexAttribI4iv(index uint32, v *int32) { + C.glowVertexAttribI4iv(gpVertexAttribI4iv, (C.GLuint)(index), (*C.GLint)(unsafe.Pointer(v))) +} +func VertexAttribI4sv(index uint32, v *int16) { + C.glowVertexAttribI4sv(gpVertexAttribI4sv, (C.GLuint)(index), (*C.GLshort)(unsafe.Pointer(v))) +} +func VertexAttribI4ubv(index uint32, v *uint8) { + C.glowVertexAttribI4ubv(gpVertexAttribI4ubv, (C.GLuint)(index), (*C.GLubyte)(unsafe.Pointer(v))) +} +func VertexAttribI4ui(index uint32, x uint32, y uint32, z uint32, w uint32) { + C.glowVertexAttribI4ui(gpVertexAttribI4ui, (C.GLuint)(index), (C.GLuint)(x), (C.GLuint)(y), (C.GLuint)(z), (C.GLuint)(w)) +} +func VertexAttribI4uiv(index uint32, v *uint32) { + C.glowVertexAttribI4uiv(gpVertexAttribI4uiv, (C.GLuint)(index), (*C.GLuint)(unsafe.Pointer(v))) +} +func VertexAttribI4usv(index uint32, v *uint16) { + C.glowVertexAttribI4usv(gpVertexAttribI4usv, (C.GLuint)(index), (*C.GLushort)(unsafe.Pointer(v))) +} +func VertexAttribIFormat(attribindex uint32, size int32, xtype uint32, relativeoffset uint32) { + C.glowVertexAttribIFormat(gpVertexAttribIFormat, (C.GLuint)(attribindex), (C.GLint)(size), (C.GLenum)(xtype), (C.GLuint)(relativeoffset)) +} +func VertexAttribIFormatNV(index uint32, size int32, xtype uint32, stride int32) { + C.glowVertexAttribIFormatNV(gpVertexAttribIFormatNV, (C.GLuint)(index), (C.GLint)(size), (C.GLenum)(xtype), (C.GLsizei)(stride)) +} +func VertexAttribIPointer(index uint32, size int32, xtype uint32, stride int32, pointer unsafe.Pointer) { + C.glowVertexAttribIPointer(gpVertexAttribIPointer, (C.GLuint)(index), (C.GLint)(size), (C.GLenum)(xtype), (C.GLsizei)(stride), pointer) +} +func VertexAttribL1d(index uint32, x float64) { + C.glowVertexAttribL1d(gpVertexAttribL1d, (C.GLuint)(index), (C.GLdouble)(x)) +} +func VertexAttribL1dv(index uint32, v *float64) { + C.glowVertexAttribL1dv(gpVertexAttribL1dv, (C.GLuint)(index), (*C.GLdouble)(unsafe.Pointer(v))) +} +func VertexAttribL1i64NV(index uint32, x int64) { + C.glowVertexAttribL1i64NV(gpVertexAttribL1i64NV, (C.GLuint)(index), (C.GLint64EXT)(x)) +} +func VertexAttribL1i64vNV(index uint32, v *int64) { + C.glowVertexAttribL1i64vNV(gpVertexAttribL1i64vNV, (C.GLuint)(index), (*C.GLint64EXT)(unsafe.Pointer(v))) +} +func VertexAttribL1ui64ARB(index uint32, x uint64) { + C.glowVertexAttribL1ui64ARB(gpVertexAttribL1ui64ARB, (C.GLuint)(index), (C.GLuint64EXT)(x)) +} +func VertexAttribL1ui64NV(index uint32, x uint64) { + C.glowVertexAttribL1ui64NV(gpVertexAttribL1ui64NV, (C.GLuint)(index), (C.GLuint64EXT)(x)) +} +func VertexAttribL1ui64vARB(index uint32, v *uint64) { + C.glowVertexAttribL1ui64vARB(gpVertexAttribL1ui64vARB, (C.GLuint)(index), (*C.GLuint64EXT)(unsafe.Pointer(v))) +} +func VertexAttribL1ui64vNV(index uint32, v *uint64) { + C.glowVertexAttribL1ui64vNV(gpVertexAttribL1ui64vNV, (C.GLuint)(index), (*C.GLuint64EXT)(unsafe.Pointer(v))) +} +func VertexAttribL2d(index uint32, x float64, y float64) { + C.glowVertexAttribL2d(gpVertexAttribL2d, (C.GLuint)(index), (C.GLdouble)(x), (C.GLdouble)(y)) +} +func VertexAttribL2dv(index uint32, v *float64) { + C.glowVertexAttribL2dv(gpVertexAttribL2dv, (C.GLuint)(index), (*C.GLdouble)(unsafe.Pointer(v))) +} +func VertexAttribL2i64NV(index uint32, x int64, y int64) { + C.glowVertexAttribL2i64NV(gpVertexAttribL2i64NV, (C.GLuint)(index), (C.GLint64EXT)(x), (C.GLint64EXT)(y)) +} +func VertexAttribL2i64vNV(index uint32, v *int64) { + C.glowVertexAttribL2i64vNV(gpVertexAttribL2i64vNV, (C.GLuint)(index), (*C.GLint64EXT)(unsafe.Pointer(v))) +} +func VertexAttribL2ui64NV(index uint32, x uint64, y uint64) { + C.glowVertexAttribL2ui64NV(gpVertexAttribL2ui64NV, (C.GLuint)(index), (C.GLuint64EXT)(x), (C.GLuint64EXT)(y)) +} +func VertexAttribL2ui64vNV(index uint32, v *uint64) { + C.glowVertexAttribL2ui64vNV(gpVertexAttribL2ui64vNV, (C.GLuint)(index), (*C.GLuint64EXT)(unsafe.Pointer(v))) +} +func VertexAttribL3d(index uint32, x float64, y float64, z float64) { + C.glowVertexAttribL3d(gpVertexAttribL3d, (C.GLuint)(index), (C.GLdouble)(x), (C.GLdouble)(y), (C.GLdouble)(z)) +} +func VertexAttribL3dv(index uint32, v *float64) { + C.glowVertexAttribL3dv(gpVertexAttribL3dv, (C.GLuint)(index), (*C.GLdouble)(unsafe.Pointer(v))) +} +func VertexAttribL3i64NV(index uint32, x int64, y int64, z int64) { + C.glowVertexAttribL3i64NV(gpVertexAttribL3i64NV, (C.GLuint)(index), (C.GLint64EXT)(x), (C.GLint64EXT)(y), (C.GLint64EXT)(z)) +} +func VertexAttribL3i64vNV(index uint32, v *int64) { + C.glowVertexAttribL3i64vNV(gpVertexAttribL3i64vNV, (C.GLuint)(index), (*C.GLint64EXT)(unsafe.Pointer(v))) +} +func VertexAttribL3ui64NV(index uint32, x uint64, y uint64, z uint64) { + C.glowVertexAttribL3ui64NV(gpVertexAttribL3ui64NV, (C.GLuint)(index), (C.GLuint64EXT)(x), (C.GLuint64EXT)(y), (C.GLuint64EXT)(z)) +} +func VertexAttribL3ui64vNV(index uint32, v *uint64) { + C.glowVertexAttribL3ui64vNV(gpVertexAttribL3ui64vNV, (C.GLuint)(index), (*C.GLuint64EXT)(unsafe.Pointer(v))) +} +func VertexAttribL4d(index uint32, x float64, y float64, z float64, w float64) { + C.glowVertexAttribL4d(gpVertexAttribL4d, (C.GLuint)(index), (C.GLdouble)(x), (C.GLdouble)(y), (C.GLdouble)(z), (C.GLdouble)(w)) +} +func VertexAttribL4dv(index uint32, v *float64) { + C.glowVertexAttribL4dv(gpVertexAttribL4dv, (C.GLuint)(index), (*C.GLdouble)(unsafe.Pointer(v))) +} +func VertexAttribL4i64NV(index uint32, x int64, y int64, z int64, w int64) { + C.glowVertexAttribL4i64NV(gpVertexAttribL4i64NV, (C.GLuint)(index), (C.GLint64EXT)(x), (C.GLint64EXT)(y), (C.GLint64EXT)(z), (C.GLint64EXT)(w)) +} +func VertexAttribL4i64vNV(index uint32, v *int64) { + C.glowVertexAttribL4i64vNV(gpVertexAttribL4i64vNV, (C.GLuint)(index), (*C.GLint64EXT)(unsafe.Pointer(v))) +} +func VertexAttribL4ui64NV(index uint32, x uint64, y uint64, z uint64, w uint64) { + C.glowVertexAttribL4ui64NV(gpVertexAttribL4ui64NV, (C.GLuint)(index), (C.GLuint64EXT)(x), (C.GLuint64EXT)(y), (C.GLuint64EXT)(z), (C.GLuint64EXT)(w)) +} +func VertexAttribL4ui64vNV(index uint32, v *uint64) { + C.glowVertexAttribL4ui64vNV(gpVertexAttribL4ui64vNV, (C.GLuint)(index), (*C.GLuint64EXT)(unsafe.Pointer(v))) +} +func VertexAttribLFormat(attribindex uint32, size int32, xtype uint32, relativeoffset uint32) { + C.glowVertexAttribLFormat(gpVertexAttribLFormat, (C.GLuint)(attribindex), (C.GLint)(size), (C.GLenum)(xtype), (C.GLuint)(relativeoffset)) +} +func VertexAttribLFormatNV(index uint32, size int32, xtype uint32, stride int32) { + C.glowVertexAttribLFormatNV(gpVertexAttribLFormatNV, (C.GLuint)(index), (C.GLint)(size), (C.GLenum)(xtype), (C.GLsizei)(stride)) +} +func VertexAttribLPointer(index uint32, size int32, xtype uint32, stride int32, pointer unsafe.Pointer) { + C.glowVertexAttribLPointer(gpVertexAttribLPointer, (C.GLuint)(index), (C.GLint)(size), (C.GLenum)(xtype), (C.GLsizei)(stride), pointer) +} +func VertexAttribP1ui(index uint32, xtype uint32, normalized bool, value uint32) { + C.glowVertexAttribP1ui(gpVertexAttribP1ui, (C.GLuint)(index), (C.GLenum)(xtype), (C.GLboolean)(boolToInt(normalized)), (C.GLuint)(value)) +} +func VertexAttribP1uiv(index uint32, xtype uint32, normalized bool, value *uint32) { + C.glowVertexAttribP1uiv(gpVertexAttribP1uiv, (C.GLuint)(index), (C.GLenum)(xtype), (C.GLboolean)(boolToInt(normalized)), (*C.GLuint)(unsafe.Pointer(value))) +} +func VertexAttribP2ui(index uint32, xtype uint32, normalized bool, value uint32) { + C.glowVertexAttribP2ui(gpVertexAttribP2ui, (C.GLuint)(index), (C.GLenum)(xtype), (C.GLboolean)(boolToInt(normalized)), (C.GLuint)(value)) +} +func VertexAttribP2uiv(index uint32, xtype uint32, normalized bool, value *uint32) { + C.glowVertexAttribP2uiv(gpVertexAttribP2uiv, (C.GLuint)(index), (C.GLenum)(xtype), (C.GLboolean)(boolToInt(normalized)), (*C.GLuint)(unsafe.Pointer(value))) +} +func VertexAttribP3ui(index uint32, xtype uint32, normalized bool, value uint32) { + C.glowVertexAttribP3ui(gpVertexAttribP3ui, (C.GLuint)(index), (C.GLenum)(xtype), (C.GLboolean)(boolToInt(normalized)), (C.GLuint)(value)) +} +func VertexAttribP3uiv(index uint32, xtype uint32, normalized bool, value *uint32) { + C.glowVertexAttribP3uiv(gpVertexAttribP3uiv, (C.GLuint)(index), (C.GLenum)(xtype), (C.GLboolean)(boolToInt(normalized)), (*C.GLuint)(unsafe.Pointer(value))) +} +func VertexAttribP4ui(index uint32, xtype uint32, normalized bool, value uint32) { + C.glowVertexAttribP4ui(gpVertexAttribP4ui, (C.GLuint)(index), (C.GLenum)(xtype), (C.GLboolean)(boolToInt(normalized)), (C.GLuint)(value)) +} +func VertexAttribP4uiv(index uint32, xtype uint32, normalized bool, value *uint32) { + C.glowVertexAttribP4uiv(gpVertexAttribP4uiv, (C.GLuint)(index), (C.GLenum)(xtype), (C.GLboolean)(boolToInt(normalized)), (*C.GLuint)(unsafe.Pointer(value))) +} + +// define an array of generic vertex attribute data +func VertexAttribPointer(index uint32, size int32, xtype uint32, normalized bool, stride int32, pointer unsafe.Pointer) { + C.glowVertexAttribPointer(gpVertexAttribPointer, (C.GLuint)(index), (C.GLint)(size), (C.GLenum)(xtype), (C.GLboolean)(boolToInt(normalized)), (C.GLsizei)(stride), pointer) +} + +// modify the rate at which generic vertex attributes advance +func VertexBindingDivisor(bindingindex uint32, divisor uint32) { + C.glowVertexBindingDivisor(gpVertexBindingDivisor, (C.GLuint)(bindingindex), (C.GLuint)(divisor)) +} +func VertexFormatNV(size int32, xtype uint32, stride int32) { + C.glowVertexFormatNV(gpVertexFormatNV, (C.GLint)(size), (C.GLenum)(xtype), (C.GLsizei)(stride)) +} + +// set the viewport +func Viewport(x int32, y int32, width int32, height int32) { + C.glowViewport(gpViewport, (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width), (C.GLsizei)(height)) +} +func ViewportArrayv(first uint32, count int32, v *float32) { + C.glowViewportArrayv(gpViewportArrayv, (C.GLuint)(first), (C.GLsizei)(count), (*C.GLfloat)(unsafe.Pointer(v))) +} +func ViewportIndexedf(index uint32, x float32, y float32, w float32, h float32) { + C.glowViewportIndexedf(gpViewportIndexedf, (C.GLuint)(index), (C.GLfloat)(x), (C.GLfloat)(y), (C.GLfloat)(w), (C.GLfloat)(h)) +} +func ViewportIndexedfv(index uint32, v *float32) { + C.glowViewportIndexedfv(gpViewportIndexedfv, (C.GLuint)(index), (*C.GLfloat)(unsafe.Pointer(v))) +} +func ViewportPositionWScaleNV(index uint32, xcoeff float32, ycoeff float32) { + C.glowViewportPositionWScaleNV(gpViewportPositionWScaleNV, (C.GLuint)(index), (C.GLfloat)(xcoeff), (C.GLfloat)(ycoeff)) +} +func ViewportSwizzleNV(index uint32, swizzlex uint32, swizzley uint32, swizzlez uint32, swizzlew uint32) { + C.glowViewportSwizzleNV(gpViewportSwizzleNV, (C.GLuint)(index), (C.GLenum)(swizzlex), (C.GLenum)(swizzley), (C.GLenum)(swizzlez), (C.GLenum)(swizzlew)) +} + +// instruct the GL server to block until the specified sync object becomes signaled +func WaitSync(sync uintptr, flags uint32, timeout uint64) { + C.glowWaitSync(gpWaitSync, (C.GLsync)(sync), (C.GLbitfield)(flags), (C.GLuint64)(timeout)) +} +func WaitVkSemaphoreNV(vkSemaphore uint64) { + C.glowWaitVkSemaphoreNV(gpWaitVkSemaphoreNV, (C.GLuint64)(vkSemaphore)) +} +func WeightPathsNV(resultPath uint32, numPaths int32, paths *uint32, weights *float32) { + C.glowWeightPathsNV(gpWeightPathsNV, (C.GLuint)(resultPath), (C.GLsizei)(numPaths), (*C.GLuint)(unsafe.Pointer(paths)), (*C.GLfloat)(unsafe.Pointer(weights))) +} +func WindowRectanglesEXT(mode uint32, count int32, box *int32) { + C.glowWindowRectanglesEXT(gpWindowRectanglesEXT, (C.GLenum)(mode), (C.GLsizei)(count), (*C.GLint)(unsafe.Pointer(box))) +} + +// Init initializes the OpenGL bindings by loading the function pointers (for +// each OpenGL function) from the active OpenGL context. +// +// It must be called under the presence of an active OpenGL context, e.g., +// always after calling window.MakeContextCurrent() and always before calling +// any OpenGL functions exported by this package. +// +// On Windows, Init loads pointers that are context-specific (and hence you +// must re-init if switching between OpenGL contexts, although not calling Init +// again after switching between OpenGL contexts may work if the contexts belong +// to the same graphics driver/device). +// +// On macOS and the other POSIX systems, the behavior is different, but code +// written compatible with the Windows behavior is compatible with macOS and the +// other POSIX systems. That is, always Init under an active OpenGL context, and +// always re-init after switching graphics contexts. +// +// For information about caveats of Init, you should read the "Platform Specific +// Function Retrieval" section of https://www.opengl.org/wiki/Load_OpenGL_Functions. +func Init() error { + return InitWithProcAddrFunc(getProcAddress) +} + +// InitWithProcAddrFunc intializes the package using the specified OpenGL +// function pointer loading function. For more cases Init should be used +// instead. +func InitWithProcAddrFunc(getProcAddr func(name string) unsafe.Pointer) error { + gpActiveProgramEXT = (C.GPACTIVEPROGRAMEXT)(getProcAddr("glActiveProgramEXT")) + gpActiveShaderProgram = (C.GPACTIVESHADERPROGRAM)(getProcAddr("glActiveShaderProgram")) + if gpActiveShaderProgram == nil { + return errors.New("glActiveShaderProgram") + } + gpActiveShaderProgramEXT = (C.GPACTIVESHADERPROGRAMEXT)(getProcAddr("glActiveShaderProgramEXT")) + gpActiveTexture = (C.GPACTIVETEXTURE)(getProcAddr("glActiveTexture")) + if gpActiveTexture == nil { + return errors.New("glActiveTexture") + } + gpApplyFramebufferAttachmentCMAAINTEL = (C.GPAPPLYFRAMEBUFFERATTACHMENTCMAAINTEL)(getProcAddr("glApplyFramebufferAttachmentCMAAINTEL")) + gpAttachShader = (C.GPATTACHSHADER)(getProcAddr("glAttachShader")) + if gpAttachShader == nil { + return errors.New("glAttachShader") + } + gpBeginConditionalRender = (C.GPBEGINCONDITIONALRENDER)(getProcAddr("glBeginConditionalRender")) + if gpBeginConditionalRender == nil { + return errors.New("glBeginConditionalRender") + } + gpBeginConditionalRenderNV = (C.GPBEGINCONDITIONALRENDERNV)(getProcAddr("glBeginConditionalRenderNV")) + gpBeginPerfMonitorAMD = (C.GPBEGINPERFMONITORAMD)(getProcAddr("glBeginPerfMonitorAMD")) + gpBeginPerfQueryINTEL = (C.GPBEGINPERFQUERYINTEL)(getProcAddr("glBeginPerfQueryINTEL")) + gpBeginQuery = (C.GPBEGINQUERY)(getProcAddr("glBeginQuery")) + if gpBeginQuery == nil { + return errors.New("glBeginQuery") + } + gpBeginQueryIndexed = (C.GPBEGINQUERYINDEXED)(getProcAddr("glBeginQueryIndexed")) + if gpBeginQueryIndexed == nil { + return errors.New("glBeginQueryIndexed") + } + gpBeginTransformFeedback = (C.GPBEGINTRANSFORMFEEDBACK)(getProcAddr("glBeginTransformFeedback")) + if gpBeginTransformFeedback == nil { + return errors.New("glBeginTransformFeedback") + } + gpBindAttribLocation = (C.GPBINDATTRIBLOCATION)(getProcAddr("glBindAttribLocation")) + if gpBindAttribLocation == nil { + return errors.New("glBindAttribLocation") + } + gpBindBuffer = (C.GPBINDBUFFER)(getProcAddr("glBindBuffer")) + if gpBindBuffer == nil { + return errors.New("glBindBuffer") + } + gpBindBufferBase = (C.GPBINDBUFFERBASE)(getProcAddr("glBindBufferBase")) + if gpBindBufferBase == nil { + return errors.New("glBindBufferBase") + } + gpBindBufferRange = (C.GPBINDBUFFERRANGE)(getProcAddr("glBindBufferRange")) + if gpBindBufferRange == nil { + return errors.New("glBindBufferRange") + } + gpBindBuffersBase = (C.GPBINDBUFFERSBASE)(getProcAddr("glBindBuffersBase")) + gpBindBuffersRange = (C.GPBINDBUFFERSRANGE)(getProcAddr("glBindBuffersRange")) + gpBindFragDataLocation = (C.GPBINDFRAGDATALOCATION)(getProcAddr("glBindFragDataLocation")) + if gpBindFragDataLocation == nil { + return errors.New("glBindFragDataLocation") + } + gpBindFragDataLocationIndexed = (C.GPBINDFRAGDATALOCATIONINDEXED)(getProcAddr("glBindFragDataLocationIndexed")) + if gpBindFragDataLocationIndexed == nil { + return errors.New("glBindFragDataLocationIndexed") + } + gpBindFramebuffer = (C.GPBINDFRAMEBUFFER)(getProcAddr("glBindFramebuffer")) + if gpBindFramebuffer == nil { + return errors.New("glBindFramebuffer") + } + gpBindImageTexture = (C.GPBINDIMAGETEXTURE)(getProcAddr("glBindImageTexture")) + gpBindImageTextures = (C.GPBINDIMAGETEXTURES)(getProcAddr("glBindImageTextures")) + gpBindMultiTextureEXT = (C.GPBINDMULTITEXTUREEXT)(getProcAddr("glBindMultiTextureEXT")) + gpBindProgramPipeline = (C.GPBINDPROGRAMPIPELINE)(getProcAddr("glBindProgramPipeline")) + if gpBindProgramPipeline == nil { + return errors.New("glBindProgramPipeline") + } + gpBindProgramPipelineEXT = (C.GPBINDPROGRAMPIPELINEEXT)(getProcAddr("glBindProgramPipelineEXT")) + gpBindRenderbuffer = (C.GPBINDRENDERBUFFER)(getProcAddr("glBindRenderbuffer")) + if gpBindRenderbuffer == nil { + return errors.New("glBindRenderbuffer") + } + gpBindSampler = (C.GPBINDSAMPLER)(getProcAddr("glBindSampler")) + if gpBindSampler == nil { + return errors.New("glBindSampler") + } + gpBindSamplers = (C.GPBINDSAMPLERS)(getProcAddr("glBindSamplers")) + gpBindTexture = (C.GPBINDTEXTURE)(getProcAddr("glBindTexture")) + if gpBindTexture == nil { + return errors.New("glBindTexture") + } + gpBindTextureUnit = (C.GPBINDTEXTUREUNIT)(getProcAddr("glBindTextureUnit")) + gpBindTextures = (C.GPBINDTEXTURES)(getProcAddr("glBindTextures")) + gpBindTransformFeedback = (C.GPBINDTRANSFORMFEEDBACK)(getProcAddr("glBindTransformFeedback")) + if gpBindTransformFeedback == nil { + return errors.New("glBindTransformFeedback") + } + gpBindVertexArray = (C.GPBINDVERTEXARRAY)(getProcAddr("glBindVertexArray")) + if gpBindVertexArray == nil { + return errors.New("glBindVertexArray") + } + gpBindVertexBuffer = (C.GPBINDVERTEXBUFFER)(getProcAddr("glBindVertexBuffer")) + gpBindVertexBuffers = (C.GPBINDVERTEXBUFFERS)(getProcAddr("glBindVertexBuffers")) + gpBlendBarrierKHR = (C.GPBLENDBARRIERKHR)(getProcAddr("glBlendBarrierKHR")) + gpBlendBarrierNV = (C.GPBLENDBARRIERNV)(getProcAddr("glBlendBarrierNV")) + gpBlendColor = (C.GPBLENDCOLOR)(getProcAddr("glBlendColor")) + if gpBlendColor == nil { + return errors.New("glBlendColor") + } + gpBlendEquation = (C.GPBLENDEQUATION)(getProcAddr("glBlendEquation")) + if gpBlendEquation == nil { + return errors.New("glBlendEquation") + } + gpBlendEquationSeparate = (C.GPBLENDEQUATIONSEPARATE)(getProcAddr("glBlendEquationSeparate")) + if gpBlendEquationSeparate == nil { + return errors.New("glBlendEquationSeparate") + } + gpBlendEquationSeparatei = (C.GPBLENDEQUATIONSEPARATEI)(getProcAddr("glBlendEquationSeparatei")) + if gpBlendEquationSeparatei == nil { + return errors.New("glBlendEquationSeparatei") + } + gpBlendEquationSeparateiARB = (C.GPBLENDEQUATIONSEPARATEIARB)(getProcAddr("glBlendEquationSeparateiARB")) + gpBlendEquationi = (C.GPBLENDEQUATIONI)(getProcAddr("glBlendEquationi")) + if gpBlendEquationi == nil { + return errors.New("glBlendEquationi") + } + gpBlendEquationiARB = (C.GPBLENDEQUATIONIARB)(getProcAddr("glBlendEquationiARB")) + gpBlendFunc = (C.GPBLENDFUNC)(getProcAddr("glBlendFunc")) + if gpBlendFunc == nil { + return errors.New("glBlendFunc") + } + gpBlendFuncSeparate = (C.GPBLENDFUNCSEPARATE)(getProcAddr("glBlendFuncSeparate")) + if gpBlendFuncSeparate == nil { + return errors.New("glBlendFuncSeparate") + } + gpBlendFuncSeparatei = (C.GPBLENDFUNCSEPARATEI)(getProcAddr("glBlendFuncSeparatei")) + if gpBlendFuncSeparatei == nil { + return errors.New("glBlendFuncSeparatei") + } + gpBlendFuncSeparateiARB = (C.GPBLENDFUNCSEPARATEIARB)(getProcAddr("glBlendFuncSeparateiARB")) + gpBlendFunci = (C.GPBLENDFUNCI)(getProcAddr("glBlendFunci")) + if gpBlendFunci == nil { + return errors.New("glBlendFunci") + } + gpBlendFunciARB = (C.GPBLENDFUNCIARB)(getProcAddr("glBlendFunciARB")) + gpBlendParameteriNV = (C.GPBLENDPARAMETERINV)(getProcAddr("glBlendParameteriNV")) + gpBlitFramebuffer = (C.GPBLITFRAMEBUFFER)(getProcAddr("glBlitFramebuffer")) + if gpBlitFramebuffer == nil { + return errors.New("glBlitFramebuffer") + } + gpBlitNamedFramebuffer = (C.GPBLITNAMEDFRAMEBUFFER)(getProcAddr("glBlitNamedFramebuffer")) + gpBufferAddressRangeNV = (C.GPBUFFERADDRESSRANGENV)(getProcAddr("glBufferAddressRangeNV")) + gpBufferData = (C.GPBUFFERDATA)(getProcAddr("glBufferData")) + if gpBufferData == nil { + return errors.New("glBufferData") + } + gpBufferPageCommitmentARB = (C.GPBUFFERPAGECOMMITMENTARB)(getProcAddr("glBufferPageCommitmentARB")) + gpBufferStorage = (C.GPBUFFERSTORAGE)(getProcAddr("glBufferStorage")) + gpBufferSubData = (C.GPBUFFERSUBDATA)(getProcAddr("glBufferSubData")) + if gpBufferSubData == nil { + return errors.New("glBufferSubData") + } + gpCallCommandListNV = (C.GPCALLCOMMANDLISTNV)(getProcAddr("glCallCommandListNV")) + gpCheckFramebufferStatus = (C.GPCHECKFRAMEBUFFERSTATUS)(getProcAddr("glCheckFramebufferStatus")) + if gpCheckFramebufferStatus == nil { + return errors.New("glCheckFramebufferStatus") + } + gpCheckNamedFramebufferStatus = (C.GPCHECKNAMEDFRAMEBUFFERSTATUS)(getProcAddr("glCheckNamedFramebufferStatus")) + gpCheckNamedFramebufferStatusEXT = (C.GPCHECKNAMEDFRAMEBUFFERSTATUSEXT)(getProcAddr("glCheckNamedFramebufferStatusEXT")) + gpClampColor = (C.GPCLAMPCOLOR)(getProcAddr("glClampColor")) + if gpClampColor == nil { + return errors.New("glClampColor") + } + gpClear = (C.GPCLEAR)(getProcAddr("glClear")) + if gpClear == nil { + return errors.New("glClear") + } + gpClearBufferData = (C.GPCLEARBUFFERDATA)(getProcAddr("glClearBufferData")) + gpClearBufferSubData = (C.GPCLEARBUFFERSUBDATA)(getProcAddr("glClearBufferSubData")) + gpClearBufferfi = (C.GPCLEARBUFFERFI)(getProcAddr("glClearBufferfi")) + if gpClearBufferfi == nil { + return errors.New("glClearBufferfi") + } + gpClearBufferfv = (C.GPCLEARBUFFERFV)(getProcAddr("glClearBufferfv")) + if gpClearBufferfv == nil { + return errors.New("glClearBufferfv") + } + gpClearBufferiv = (C.GPCLEARBUFFERIV)(getProcAddr("glClearBufferiv")) + if gpClearBufferiv == nil { + return errors.New("glClearBufferiv") + } + gpClearBufferuiv = (C.GPCLEARBUFFERUIV)(getProcAddr("glClearBufferuiv")) + if gpClearBufferuiv == nil { + return errors.New("glClearBufferuiv") + } + gpClearColor = (C.GPCLEARCOLOR)(getProcAddr("glClearColor")) + if gpClearColor == nil { + return errors.New("glClearColor") + } + gpClearDepth = (C.GPCLEARDEPTH)(getProcAddr("glClearDepth")) + if gpClearDepth == nil { + return errors.New("glClearDepth") + } + gpClearDepthf = (C.GPCLEARDEPTHF)(getProcAddr("glClearDepthf")) + if gpClearDepthf == nil { + return errors.New("glClearDepthf") + } + gpClearNamedBufferData = (C.GPCLEARNAMEDBUFFERDATA)(getProcAddr("glClearNamedBufferData")) + gpClearNamedBufferDataEXT = (C.GPCLEARNAMEDBUFFERDATAEXT)(getProcAddr("glClearNamedBufferDataEXT")) + gpClearNamedBufferSubData = (C.GPCLEARNAMEDBUFFERSUBDATA)(getProcAddr("glClearNamedBufferSubData")) + gpClearNamedBufferSubDataEXT = (C.GPCLEARNAMEDBUFFERSUBDATAEXT)(getProcAddr("glClearNamedBufferSubDataEXT")) + gpClearNamedFramebufferfi = (C.GPCLEARNAMEDFRAMEBUFFERFI)(getProcAddr("glClearNamedFramebufferfi")) + gpClearNamedFramebufferfv = (C.GPCLEARNAMEDFRAMEBUFFERFV)(getProcAddr("glClearNamedFramebufferfv")) + gpClearNamedFramebufferiv = (C.GPCLEARNAMEDFRAMEBUFFERIV)(getProcAddr("glClearNamedFramebufferiv")) + gpClearNamedFramebufferuiv = (C.GPCLEARNAMEDFRAMEBUFFERUIV)(getProcAddr("glClearNamedFramebufferuiv")) + gpClearStencil = (C.GPCLEARSTENCIL)(getProcAddr("glClearStencil")) + if gpClearStencil == nil { + return errors.New("glClearStencil") + } + gpClearTexImage = (C.GPCLEARTEXIMAGE)(getProcAddr("glClearTexImage")) + gpClearTexSubImage = (C.GPCLEARTEXSUBIMAGE)(getProcAddr("glClearTexSubImage")) + gpClientAttribDefaultEXT = (C.GPCLIENTATTRIBDEFAULTEXT)(getProcAddr("glClientAttribDefaultEXT")) + gpClientWaitSync = (C.GPCLIENTWAITSYNC)(getProcAddr("glClientWaitSync")) + if gpClientWaitSync == nil { + return errors.New("glClientWaitSync") + } + gpClipControl = (C.GPCLIPCONTROL)(getProcAddr("glClipControl")) + gpColorFormatNV = (C.GPCOLORFORMATNV)(getProcAddr("glColorFormatNV")) + gpColorMask = (C.GPCOLORMASK)(getProcAddr("glColorMask")) + if gpColorMask == nil { + return errors.New("glColorMask") + } + gpColorMaski = (C.GPCOLORMASKI)(getProcAddr("glColorMaski")) + if gpColorMaski == nil { + return errors.New("glColorMaski") + } + gpCommandListSegmentsNV = (C.GPCOMMANDLISTSEGMENTSNV)(getProcAddr("glCommandListSegmentsNV")) + gpCompileCommandListNV = (C.GPCOMPILECOMMANDLISTNV)(getProcAddr("glCompileCommandListNV")) + gpCompileShader = (C.GPCOMPILESHADER)(getProcAddr("glCompileShader")) + if gpCompileShader == nil { + return errors.New("glCompileShader") + } + gpCompileShaderIncludeARB = (C.GPCOMPILESHADERINCLUDEARB)(getProcAddr("glCompileShaderIncludeARB")) + gpCompressedMultiTexImage1DEXT = (C.GPCOMPRESSEDMULTITEXIMAGE1DEXT)(getProcAddr("glCompressedMultiTexImage1DEXT")) + gpCompressedMultiTexImage2DEXT = (C.GPCOMPRESSEDMULTITEXIMAGE2DEXT)(getProcAddr("glCompressedMultiTexImage2DEXT")) + gpCompressedMultiTexImage3DEXT = (C.GPCOMPRESSEDMULTITEXIMAGE3DEXT)(getProcAddr("glCompressedMultiTexImage3DEXT")) + gpCompressedMultiTexSubImage1DEXT = (C.GPCOMPRESSEDMULTITEXSUBIMAGE1DEXT)(getProcAddr("glCompressedMultiTexSubImage1DEXT")) + gpCompressedMultiTexSubImage2DEXT = (C.GPCOMPRESSEDMULTITEXSUBIMAGE2DEXT)(getProcAddr("glCompressedMultiTexSubImage2DEXT")) + gpCompressedMultiTexSubImage3DEXT = (C.GPCOMPRESSEDMULTITEXSUBIMAGE3DEXT)(getProcAddr("glCompressedMultiTexSubImage3DEXT")) + gpCompressedTexImage1D = (C.GPCOMPRESSEDTEXIMAGE1D)(getProcAddr("glCompressedTexImage1D")) + if gpCompressedTexImage1D == nil { + return errors.New("glCompressedTexImage1D") + } + gpCompressedTexImage2D = (C.GPCOMPRESSEDTEXIMAGE2D)(getProcAddr("glCompressedTexImage2D")) + if gpCompressedTexImage2D == nil { + return errors.New("glCompressedTexImage2D") + } + gpCompressedTexImage3D = (C.GPCOMPRESSEDTEXIMAGE3D)(getProcAddr("glCompressedTexImage3D")) + if gpCompressedTexImage3D == nil { + return errors.New("glCompressedTexImage3D") + } + gpCompressedTexSubImage1D = (C.GPCOMPRESSEDTEXSUBIMAGE1D)(getProcAddr("glCompressedTexSubImage1D")) + if gpCompressedTexSubImage1D == nil { + return errors.New("glCompressedTexSubImage1D") + } + gpCompressedTexSubImage2D = (C.GPCOMPRESSEDTEXSUBIMAGE2D)(getProcAddr("glCompressedTexSubImage2D")) + if gpCompressedTexSubImage2D == nil { + return errors.New("glCompressedTexSubImage2D") + } + gpCompressedTexSubImage3D = (C.GPCOMPRESSEDTEXSUBIMAGE3D)(getProcAddr("glCompressedTexSubImage3D")) + if gpCompressedTexSubImage3D == nil { + return errors.New("glCompressedTexSubImage3D") + } + gpCompressedTextureImage1DEXT = (C.GPCOMPRESSEDTEXTUREIMAGE1DEXT)(getProcAddr("glCompressedTextureImage1DEXT")) + gpCompressedTextureImage2DEXT = (C.GPCOMPRESSEDTEXTUREIMAGE2DEXT)(getProcAddr("glCompressedTextureImage2DEXT")) + gpCompressedTextureImage3DEXT = (C.GPCOMPRESSEDTEXTUREIMAGE3DEXT)(getProcAddr("glCompressedTextureImage3DEXT")) + gpCompressedTextureSubImage1D = (C.GPCOMPRESSEDTEXTURESUBIMAGE1D)(getProcAddr("glCompressedTextureSubImage1D")) + gpCompressedTextureSubImage1DEXT = (C.GPCOMPRESSEDTEXTURESUBIMAGE1DEXT)(getProcAddr("glCompressedTextureSubImage1DEXT")) + gpCompressedTextureSubImage2D = (C.GPCOMPRESSEDTEXTURESUBIMAGE2D)(getProcAddr("glCompressedTextureSubImage2D")) + gpCompressedTextureSubImage2DEXT = (C.GPCOMPRESSEDTEXTURESUBIMAGE2DEXT)(getProcAddr("glCompressedTextureSubImage2DEXT")) + gpCompressedTextureSubImage3D = (C.GPCOMPRESSEDTEXTURESUBIMAGE3D)(getProcAddr("glCompressedTextureSubImage3D")) + gpCompressedTextureSubImage3DEXT = (C.GPCOMPRESSEDTEXTURESUBIMAGE3DEXT)(getProcAddr("glCompressedTextureSubImage3DEXT")) + gpConservativeRasterParameterfNV = (C.GPCONSERVATIVERASTERPARAMETERFNV)(getProcAddr("glConservativeRasterParameterfNV")) + gpConservativeRasterParameteriNV = (C.GPCONSERVATIVERASTERPARAMETERINV)(getProcAddr("glConservativeRasterParameteriNV")) + gpCopyBufferSubData = (C.GPCOPYBUFFERSUBDATA)(getProcAddr("glCopyBufferSubData")) + if gpCopyBufferSubData == nil { + return errors.New("glCopyBufferSubData") + } + gpCopyImageSubData = (C.GPCOPYIMAGESUBDATA)(getProcAddr("glCopyImageSubData")) + gpCopyMultiTexImage1DEXT = (C.GPCOPYMULTITEXIMAGE1DEXT)(getProcAddr("glCopyMultiTexImage1DEXT")) + gpCopyMultiTexImage2DEXT = (C.GPCOPYMULTITEXIMAGE2DEXT)(getProcAddr("glCopyMultiTexImage2DEXT")) + gpCopyMultiTexSubImage1DEXT = (C.GPCOPYMULTITEXSUBIMAGE1DEXT)(getProcAddr("glCopyMultiTexSubImage1DEXT")) + gpCopyMultiTexSubImage2DEXT = (C.GPCOPYMULTITEXSUBIMAGE2DEXT)(getProcAddr("glCopyMultiTexSubImage2DEXT")) + gpCopyMultiTexSubImage3DEXT = (C.GPCOPYMULTITEXSUBIMAGE3DEXT)(getProcAddr("glCopyMultiTexSubImage3DEXT")) + gpCopyNamedBufferSubData = (C.GPCOPYNAMEDBUFFERSUBDATA)(getProcAddr("glCopyNamedBufferSubData")) + gpCopyPathNV = (C.GPCOPYPATHNV)(getProcAddr("glCopyPathNV")) + gpCopyTexImage1D = (C.GPCOPYTEXIMAGE1D)(getProcAddr("glCopyTexImage1D")) + if gpCopyTexImage1D == nil { + return errors.New("glCopyTexImage1D") + } + gpCopyTexImage2D = (C.GPCOPYTEXIMAGE2D)(getProcAddr("glCopyTexImage2D")) + if gpCopyTexImage2D == nil { + return errors.New("glCopyTexImage2D") + } + gpCopyTexSubImage1D = (C.GPCOPYTEXSUBIMAGE1D)(getProcAddr("glCopyTexSubImage1D")) + if gpCopyTexSubImage1D == nil { + return errors.New("glCopyTexSubImage1D") + } + gpCopyTexSubImage2D = (C.GPCOPYTEXSUBIMAGE2D)(getProcAddr("glCopyTexSubImage2D")) + if gpCopyTexSubImage2D == nil { + return errors.New("glCopyTexSubImage2D") + } + gpCopyTexSubImage3D = (C.GPCOPYTEXSUBIMAGE3D)(getProcAddr("glCopyTexSubImage3D")) + if gpCopyTexSubImage3D == nil { + return errors.New("glCopyTexSubImage3D") + } + gpCopyTextureImage1DEXT = (C.GPCOPYTEXTUREIMAGE1DEXT)(getProcAddr("glCopyTextureImage1DEXT")) + gpCopyTextureImage2DEXT = (C.GPCOPYTEXTUREIMAGE2DEXT)(getProcAddr("glCopyTextureImage2DEXT")) + gpCopyTextureSubImage1D = (C.GPCOPYTEXTURESUBIMAGE1D)(getProcAddr("glCopyTextureSubImage1D")) + gpCopyTextureSubImage1DEXT = (C.GPCOPYTEXTURESUBIMAGE1DEXT)(getProcAddr("glCopyTextureSubImage1DEXT")) + gpCopyTextureSubImage2D = (C.GPCOPYTEXTURESUBIMAGE2D)(getProcAddr("glCopyTextureSubImage2D")) + gpCopyTextureSubImage2DEXT = (C.GPCOPYTEXTURESUBIMAGE2DEXT)(getProcAddr("glCopyTextureSubImage2DEXT")) + gpCopyTextureSubImage3D = (C.GPCOPYTEXTURESUBIMAGE3D)(getProcAddr("glCopyTextureSubImage3D")) + gpCopyTextureSubImage3DEXT = (C.GPCOPYTEXTURESUBIMAGE3DEXT)(getProcAddr("glCopyTextureSubImage3DEXT")) + gpCoverFillPathInstancedNV = (C.GPCOVERFILLPATHINSTANCEDNV)(getProcAddr("glCoverFillPathInstancedNV")) + gpCoverFillPathNV = (C.GPCOVERFILLPATHNV)(getProcAddr("glCoverFillPathNV")) + gpCoverStrokePathInstancedNV = (C.GPCOVERSTROKEPATHINSTANCEDNV)(getProcAddr("glCoverStrokePathInstancedNV")) + gpCoverStrokePathNV = (C.GPCOVERSTROKEPATHNV)(getProcAddr("glCoverStrokePathNV")) + gpCoverageModulationNV = (C.GPCOVERAGEMODULATIONNV)(getProcAddr("glCoverageModulationNV")) + gpCoverageModulationTableNV = (C.GPCOVERAGEMODULATIONTABLENV)(getProcAddr("glCoverageModulationTableNV")) + gpCreateBuffers = (C.GPCREATEBUFFERS)(getProcAddr("glCreateBuffers")) + gpCreateCommandListsNV = (C.GPCREATECOMMANDLISTSNV)(getProcAddr("glCreateCommandListsNV")) + gpCreateFramebuffers = (C.GPCREATEFRAMEBUFFERS)(getProcAddr("glCreateFramebuffers")) + gpCreatePerfQueryINTEL = (C.GPCREATEPERFQUERYINTEL)(getProcAddr("glCreatePerfQueryINTEL")) + gpCreateProgram = (C.GPCREATEPROGRAM)(getProcAddr("glCreateProgram")) + if gpCreateProgram == nil { + return errors.New("glCreateProgram") + } + gpCreateProgramPipelines = (C.GPCREATEPROGRAMPIPELINES)(getProcAddr("glCreateProgramPipelines")) + gpCreateQueries = (C.GPCREATEQUERIES)(getProcAddr("glCreateQueries")) + gpCreateRenderbuffers = (C.GPCREATERENDERBUFFERS)(getProcAddr("glCreateRenderbuffers")) + gpCreateSamplers = (C.GPCREATESAMPLERS)(getProcAddr("glCreateSamplers")) + gpCreateShader = (C.GPCREATESHADER)(getProcAddr("glCreateShader")) + if gpCreateShader == nil { + return errors.New("glCreateShader") + } + gpCreateShaderProgramEXT = (C.GPCREATESHADERPROGRAMEXT)(getProcAddr("glCreateShaderProgramEXT")) + gpCreateShaderProgramv = (C.GPCREATESHADERPROGRAMV)(getProcAddr("glCreateShaderProgramv")) + if gpCreateShaderProgramv == nil { + return errors.New("glCreateShaderProgramv") + } + gpCreateShaderProgramvEXT = (C.GPCREATESHADERPROGRAMVEXT)(getProcAddr("glCreateShaderProgramvEXT")) + gpCreateStatesNV = (C.GPCREATESTATESNV)(getProcAddr("glCreateStatesNV")) + gpCreateSyncFromCLeventARB = (C.GPCREATESYNCFROMCLEVENTARB)(getProcAddr("glCreateSyncFromCLeventARB")) + gpCreateTextures = (C.GPCREATETEXTURES)(getProcAddr("glCreateTextures")) + gpCreateTransformFeedbacks = (C.GPCREATETRANSFORMFEEDBACKS)(getProcAddr("glCreateTransformFeedbacks")) + gpCreateVertexArrays = (C.GPCREATEVERTEXARRAYS)(getProcAddr("glCreateVertexArrays")) + gpCullFace = (C.GPCULLFACE)(getProcAddr("glCullFace")) + if gpCullFace == nil { + return errors.New("glCullFace") + } + gpDebugMessageCallback = (C.GPDEBUGMESSAGECALLBACK)(getProcAddr("glDebugMessageCallback")) + gpDebugMessageCallbackARB = (C.GPDEBUGMESSAGECALLBACKARB)(getProcAddr("glDebugMessageCallbackARB")) + gpDebugMessageCallbackKHR = (C.GPDEBUGMESSAGECALLBACKKHR)(getProcAddr("glDebugMessageCallbackKHR")) + gpDebugMessageControl = (C.GPDEBUGMESSAGECONTROL)(getProcAddr("glDebugMessageControl")) + gpDebugMessageControlARB = (C.GPDEBUGMESSAGECONTROLARB)(getProcAddr("glDebugMessageControlARB")) + gpDebugMessageControlKHR = (C.GPDEBUGMESSAGECONTROLKHR)(getProcAddr("glDebugMessageControlKHR")) + gpDebugMessageInsert = (C.GPDEBUGMESSAGEINSERT)(getProcAddr("glDebugMessageInsert")) + gpDebugMessageInsertARB = (C.GPDEBUGMESSAGEINSERTARB)(getProcAddr("glDebugMessageInsertARB")) + gpDebugMessageInsertKHR = (C.GPDEBUGMESSAGEINSERTKHR)(getProcAddr("glDebugMessageInsertKHR")) + gpDeleteBuffers = (C.GPDELETEBUFFERS)(getProcAddr("glDeleteBuffers")) + if gpDeleteBuffers == nil { + return errors.New("glDeleteBuffers") + } + gpDeleteCommandListsNV = (C.GPDELETECOMMANDLISTSNV)(getProcAddr("glDeleteCommandListsNV")) + gpDeleteFramebuffers = (C.GPDELETEFRAMEBUFFERS)(getProcAddr("glDeleteFramebuffers")) + if gpDeleteFramebuffers == nil { + return errors.New("glDeleteFramebuffers") + } + gpDeleteNamedStringARB = (C.GPDELETENAMEDSTRINGARB)(getProcAddr("glDeleteNamedStringARB")) + gpDeletePathsNV = (C.GPDELETEPATHSNV)(getProcAddr("glDeletePathsNV")) + gpDeletePerfMonitorsAMD = (C.GPDELETEPERFMONITORSAMD)(getProcAddr("glDeletePerfMonitorsAMD")) + gpDeletePerfQueryINTEL = (C.GPDELETEPERFQUERYINTEL)(getProcAddr("glDeletePerfQueryINTEL")) + gpDeleteProgram = (C.GPDELETEPROGRAM)(getProcAddr("glDeleteProgram")) + if gpDeleteProgram == nil { + return errors.New("glDeleteProgram") + } + gpDeleteProgramPipelines = (C.GPDELETEPROGRAMPIPELINES)(getProcAddr("glDeleteProgramPipelines")) + if gpDeleteProgramPipelines == nil { + return errors.New("glDeleteProgramPipelines") + } + gpDeleteProgramPipelinesEXT = (C.GPDELETEPROGRAMPIPELINESEXT)(getProcAddr("glDeleteProgramPipelinesEXT")) + gpDeleteQueries = (C.GPDELETEQUERIES)(getProcAddr("glDeleteQueries")) + if gpDeleteQueries == nil { + return errors.New("glDeleteQueries") + } + gpDeleteRenderbuffers = (C.GPDELETERENDERBUFFERS)(getProcAddr("glDeleteRenderbuffers")) + if gpDeleteRenderbuffers == nil { + return errors.New("glDeleteRenderbuffers") + } + gpDeleteSamplers = (C.GPDELETESAMPLERS)(getProcAddr("glDeleteSamplers")) + if gpDeleteSamplers == nil { + return errors.New("glDeleteSamplers") + } + gpDeleteShader = (C.GPDELETESHADER)(getProcAddr("glDeleteShader")) + if gpDeleteShader == nil { + return errors.New("glDeleteShader") + } + gpDeleteStatesNV = (C.GPDELETESTATESNV)(getProcAddr("glDeleteStatesNV")) + gpDeleteSync = (C.GPDELETESYNC)(getProcAddr("glDeleteSync")) + if gpDeleteSync == nil { + return errors.New("glDeleteSync") + } + gpDeleteTextures = (C.GPDELETETEXTURES)(getProcAddr("glDeleteTextures")) + if gpDeleteTextures == nil { + return errors.New("glDeleteTextures") + } + gpDeleteTransformFeedbacks = (C.GPDELETETRANSFORMFEEDBACKS)(getProcAddr("glDeleteTransformFeedbacks")) + if gpDeleteTransformFeedbacks == nil { + return errors.New("glDeleteTransformFeedbacks") + } + gpDeleteVertexArrays = (C.GPDELETEVERTEXARRAYS)(getProcAddr("glDeleteVertexArrays")) + if gpDeleteVertexArrays == nil { + return errors.New("glDeleteVertexArrays") + } + gpDepthFunc = (C.GPDEPTHFUNC)(getProcAddr("glDepthFunc")) + if gpDepthFunc == nil { + return errors.New("glDepthFunc") + } + gpDepthMask = (C.GPDEPTHMASK)(getProcAddr("glDepthMask")) + if gpDepthMask == nil { + return errors.New("glDepthMask") + } + gpDepthRange = (C.GPDEPTHRANGE)(getProcAddr("glDepthRange")) + if gpDepthRange == nil { + return errors.New("glDepthRange") + } + gpDepthRangeArrayv = (C.GPDEPTHRANGEARRAYV)(getProcAddr("glDepthRangeArrayv")) + if gpDepthRangeArrayv == nil { + return errors.New("glDepthRangeArrayv") + } + gpDepthRangeIndexed = (C.GPDEPTHRANGEINDEXED)(getProcAddr("glDepthRangeIndexed")) + if gpDepthRangeIndexed == nil { + return errors.New("glDepthRangeIndexed") + } + gpDepthRangef = (C.GPDEPTHRANGEF)(getProcAddr("glDepthRangef")) + if gpDepthRangef == nil { + return errors.New("glDepthRangef") + } + gpDetachShader = (C.GPDETACHSHADER)(getProcAddr("glDetachShader")) + if gpDetachShader == nil { + return errors.New("glDetachShader") + } + gpDisable = (C.GPDISABLE)(getProcAddr("glDisable")) + if gpDisable == nil { + return errors.New("glDisable") + } + gpDisableClientStateIndexedEXT = (C.GPDISABLECLIENTSTATEINDEXEDEXT)(getProcAddr("glDisableClientStateIndexedEXT")) + gpDisableClientStateiEXT = (C.GPDISABLECLIENTSTATEIEXT)(getProcAddr("glDisableClientStateiEXT")) + gpDisableIndexedEXT = (C.GPDISABLEINDEXEDEXT)(getProcAddr("glDisableIndexedEXT")) + gpDisableVertexArrayAttrib = (C.GPDISABLEVERTEXARRAYATTRIB)(getProcAddr("glDisableVertexArrayAttrib")) + gpDisableVertexArrayAttribEXT = (C.GPDISABLEVERTEXARRAYATTRIBEXT)(getProcAddr("glDisableVertexArrayAttribEXT")) + gpDisableVertexArrayEXT = (C.GPDISABLEVERTEXARRAYEXT)(getProcAddr("glDisableVertexArrayEXT")) + gpDisableVertexAttribArray = (C.GPDISABLEVERTEXATTRIBARRAY)(getProcAddr("glDisableVertexAttribArray")) + if gpDisableVertexAttribArray == nil { + return errors.New("glDisableVertexAttribArray") + } + gpDisablei = (C.GPDISABLEI)(getProcAddr("glDisablei")) + if gpDisablei == nil { + return errors.New("glDisablei") + } + gpDispatchCompute = (C.GPDISPATCHCOMPUTE)(getProcAddr("glDispatchCompute")) + gpDispatchComputeGroupSizeARB = (C.GPDISPATCHCOMPUTEGROUPSIZEARB)(getProcAddr("glDispatchComputeGroupSizeARB")) + gpDispatchComputeIndirect = (C.GPDISPATCHCOMPUTEINDIRECT)(getProcAddr("glDispatchComputeIndirect")) + gpDrawArrays = (C.GPDRAWARRAYS)(getProcAddr("glDrawArrays")) + if gpDrawArrays == nil { + return errors.New("glDrawArrays") + } + gpDrawArraysIndirect = (C.GPDRAWARRAYSINDIRECT)(getProcAddr("glDrawArraysIndirect")) + if gpDrawArraysIndirect == nil { + return errors.New("glDrawArraysIndirect") + } + gpDrawArraysInstanced = (C.GPDRAWARRAYSINSTANCED)(getProcAddr("glDrawArraysInstanced")) + if gpDrawArraysInstanced == nil { + return errors.New("glDrawArraysInstanced") + } + gpDrawArraysInstancedARB = (C.GPDRAWARRAYSINSTANCEDARB)(getProcAddr("glDrawArraysInstancedARB")) + gpDrawArraysInstancedBaseInstance = (C.GPDRAWARRAYSINSTANCEDBASEINSTANCE)(getProcAddr("glDrawArraysInstancedBaseInstance")) + gpDrawArraysInstancedEXT = (C.GPDRAWARRAYSINSTANCEDEXT)(getProcAddr("glDrawArraysInstancedEXT")) + gpDrawBuffer = (C.GPDRAWBUFFER)(getProcAddr("glDrawBuffer")) + if gpDrawBuffer == nil { + return errors.New("glDrawBuffer") + } + gpDrawBuffers = (C.GPDRAWBUFFERS)(getProcAddr("glDrawBuffers")) + if gpDrawBuffers == nil { + return errors.New("glDrawBuffers") + } + gpDrawCommandsAddressNV = (C.GPDRAWCOMMANDSADDRESSNV)(getProcAddr("glDrawCommandsAddressNV")) + gpDrawCommandsNV = (C.GPDRAWCOMMANDSNV)(getProcAddr("glDrawCommandsNV")) + gpDrawCommandsStatesAddressNV = (C.GPDRAWCOMMANDSSTATESADDRESSNV)(getProcAddr("glDrawCommandsStatesAddressNV")) + gpDrawCommandsStatesNV = (C.GPDRAWCOMMANDSSTATESNV)(getProcAddr("glDrawCommandsStatesNV")) + gpDrawElements = (C.GPDRAWELEMENTS)(getProcAddr("glDrawElements")) + if gpDrawElements == nil { + return errors.New("glDrawElements") + } + gpDrawElementsBaseVertex = (C.GPDRAWELEMENTSBASEVERTEX)(getProcAddr("glDrawElementsBaseVertex")) + if gpDrawElementsBaseVertex == nil { + return errors.New("glDrawElementsBaseVertex") + } + gpDrawElementsIndirect = (C.GPDRAWELEMENTSINDIRECT)(getProcAddr("glDrawElementsIndirect")) + if gpDrawElementsIndirect == nil { + return errors.New("glDrawElementsIndirect") + } + gpDrawElementsInstanced = (C.GPDRAWELEMENTSINSTANCED)(getProcAddr("glDrawElementsInstanced")) + if gpDrawElementsInstanced == nil { + return errors.New("glDrawElementsInstanced") + } + gpDrawElementsInstancedARB = (C.GPDRAWELEMENTSINSTANCEDARB)(getProcAddr("glDrawElementsInstancedARB")) + gpDrawElementsInstancedBaseInstance = (C.GPDRAWELEMENTSINSTANCEDBASEINSTANCE)(getProcAddr("glDrawElementsInstancedBaseInstance")) + gpDrawElementsInstancedBaseVertex = (C.GPDRAWELEMENTSINSTANCEDBASEVERTEX)(getProcAddr("glDrawElementsInstancedBaseVertex")) + if gpDrawElementsInstancedBaseVertex == nil { + return errors.New("glDrawElementsInstancedBaseVertex") + } + gpDrawElementsInstancedBaseVertexBaseInstance = (C.GPDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCE)(getProcAddr("glDrawElementsInstancedBaseVertexBaseInstance")) + gpDrawElementsInstancedEXT = (C.GPDRAWELEMENTSINSTANCEDEXT)(getProcAddr("glDrawElementsInstancedEXT")) + gpDrawRangeElements = (C.GPDRAWRANGEELEMENTS)(getProcAddr("glDrawRangeElements")) + if gpDrawRangeElements == nil { + return errors.New("glDrawRangeElements") + } + gpDrawRangeElementsBaseVertex = (C.GPDRAWRANGEELEMENTSBASEVERTEX)(getProcAddr("glDrawRangeElementsBaseVertex")) + if gpDrawRangeElementsBaseVertex == nil { + return errors.New("glDrawRangeElementsBaseVertex") + } + gpDrawTransformFeedback = (C.GPDRAWTRANSFORMFEEDBACK)(getProcAddr("glDrawTransformFeedback")) + if gpDrawTransformFeedback == nil { + return errors.New("glDrawTransformFeedback") + } + gpDrawTransformFeedbackInstanced = (C.GPDRAWTRANSFORMFEEDBACKINSTANCED)(getProcAddr("glDrawTransformFeedbackInstanced")) + gpDrawTransformFeedbackStream = (C.GPDRAWTRANSFORMFEEDBACKSTREAM)(getProcAddr("glDrawTransformFeedbackStream")) + if gpDrawTransformFeedbackStream == nil { + return errors.New("glDrawTransformFeedbackStream") + } + gpDrawTransformFeedbackStreamInstanced = (C.GPDRAWTRANSFORMFEEDBACKSTREAMINSTANCED)(getProcAddr("glDrawTransformFeedbackStreamInstanced")) + gpDrawVkImageNV = (C.GPDRAWVKIMAGENV)(getProcAddr("glDrawVkImageNV")) + gpEGLImageTargetTexStorageEXT = (C.GPEGLIMAGETARGETTEXSTORAGEEXT)(getProcAddr("glEGLImageTargetTexStorageEXT")) + gpEGLImageTargetTextureStorageEXT = (C.GPEGLIMAGETARGETTEXTURESTORAGEEXT)(getProcAddr("glEGLImageTargetTextureStorageEXT")) + gpEdgeFlagFormatNV = (C.GPEDGEFLAGFORMATNV)(getProcAddr("glEdgeFlagFormatNV")) + gpEnable = (C.GPENABLE)(getProcAddr("glEnable")) + if gpEnable == nil { + return errors.New("glEnable") + } + gpEnableClientStateIndexedEXT = (C.GPENABLECLIENTSTATEINDEXEDEXT)(getProcAddr("glEnableClientStateIndexedEXT")) + gpEnableClientStateiEXT = (C.GPENABLECLIENTSTATEIEXT)(getProcAddr("glEnableClientStateiEXT")) + gpEnableIndexedEXT = (C.GPENABLEINDEXEDEXT)(getProcAddr("glEnableIndexedEXT")) + gpEnableVertexArrayAttrib = (C.GPENABLEVERTEXARRAYATTRIB)(getProcAddr("glEnableVertexArrayAttrib")) + gpEnableVertexArrayAttribEXT = (C.GPENABLEVERTEXARRAYATTRIBEXT)(getProcAddr("glEnableVertexArrayAttribEXT")) + gpEnableVertexArrayEXT = (C.GPENABLEVERTEXARRAYEXT)(getProcAddr("glEnableVertexArrayEXT")) + gpEnableVertexAttribArray = (C.GPENABLEVERTEXATTRIBARRAY)(getProcAddr("glEnableVertexAttribArray")) + if gpEnableVertexAttribArray == nil { + return errors.New("glEnableVertexAttribArray") + } + gpEnablei = (C.GPENABLEI)(getProcAddr("glEnablei")) + if gpEnablei == nil { + return errors.New("glEnablei") + } + gpEndConditionalRender = (C.GPENDCONDITIONALRENDER)(getProcAddr("glEndConditionalRender")) + if gpEndConditionalRender == nil { + return errors.New("glEndConditionalRender") + } + gpEndConditionalRenderNV = (C.GPENDCONDITIONALRENDERNV)(getProcAddr("glEndConditionalRenderNV")) + gpEndPerfMonitorAMD = (C.GPENDPERFMONITORAMD)(getProcAddr("glEndPerfMonitorAMD")) + gpEndPerfQueryINTEL = (C.GPENDPERFQUERYINTEL)(getProcAddr("glEndPerfQueryINTEL")) + gpEndQuery = (C.GPENDQUERY)(getProcAddr("glEndQuery")) + if gpEndQuery == nil { + return errors.New("glEndQuery") + } + gpEndQueryIndexed = (C.GPENDQUERYINDEXED)(getProcAddr("glEndQueryIndexed")) + if gpEndQueryIndexed == nil { + return errors.New("glEndQueryIndexed") + } + gpEndTransformFeedback = (C.GPENDTRANSFORMFEEDBACK)(getProcAddr("glEndTransformFeedback")) + if gpEndTransformFeedback == nil { + return errors.New("glEndTransformFeedback") + } + gpEvaluateDepthValuesARB = (C.GPEVALUATEDEPTHVALUESARB)(getProcAddr("glEvaluateDepthValuesARB")) + gpFenceSync = (C.GPFENCESYNC)(getProcAddr("glFenceSync")) + if gpFenceSync == nil { + return errors.New("glFenceSync") + } + gpFinish = (C.GPFINISH)(getProcAddr("glFinish")) + if gpFinish == nil { + return errors.New("glFinish") + } + gpFlush = (C.GPFLUSH)(getProcAddr("glFlush")) + if gpFlush == nil { + return errors.New("glFlush") + } + gpFlushMappedBufferRange = (C.GPFLUSHMAPPEDBUFFERRANGE)(getProcAddr("glFlushMappedBufferRange")) + if gpFlushMappedBufferRange == nil { + return errors.New("glFlushMappedBufferRange") + } + gpFlushMappedNamedBufferRange = (C.GPFLUSHMAPPEDNAMEDBUFFERRANGE)(getProcAddr("glFlushMappedNamedBufferRange")) + gpFlushMappedNamedBufferRangeEXT = (C.GPFLUSHMAPPEDNAMEDBUFFERRANGEEXT)(getProcAddr("glFlushMappedNamedBufferRangeEXT")) + gpFogCoordFormatNV = (C.GPFOGCOORDFORMATNV)(getProcAddr("glFogCoordFormatNV")) + gpFragmentCoverageColorNV = (C.GPFRAGMENTCOVERAGECOLORNV)(getProcAddr("glFragmentCoverageColorNV")) + gpFramebufferDrawBufferEXT = (C.GPFRAMEBUFFERDRAWBUFFEREXT)(getProcAddr("glFramebufferDrawBufferEXT")) + gpFramebufferDrawBuffersEXT = (C.GPFRAMEBUFFERDRAWBUFFERSEXT)(getProcAddr("glFramebufferDrawBuffersEXT")) + gpFramebufferFetchBarrierEXT = (C.GPFRAMEBUFFERFETCHBARRIEREXT)(getProcAddr("glFramebufferFetchBarrierEXT")) + gpFramebufferParameteri = (C.GPFRAMEBUFFERPARAMETERI)(getProcAddr("glFramebufferParameteri")) + gpFramebufferReadBufferEXT = (C.GPFRAMEBUFFERREADBUFFEREXT)(getProcAddr("glFramebufferReadBufferEXT")) + gpFramebufferRenderbuffer = (C.GPFRAMEBUFFERRENDERBUFFER)(getProcAddr("glFramebufferRenderbuffer")) + if gpFramebufferRenderbuffer == nil { + return errors.New("glFramebufferRenderbuffer") + } + gpFramebufferSampleLocationsfvARB = (C.GPFRAMEBUFFERSAMPLELOCATIONSFVARB)(getProcAddr("glFramebufferSampleLocationsfvARB")) + gpFramebufferSampleLocationsfvNV = (C.GPFRAMEBUFFERSAMPLELOCATIONSFVNV)(getProcAddr("glFramebufferSampleLocationsfvNV")) + gpFramebufferTexture = (C.GPFRAMEBUFFERTEXTURE)(getProcAddr("glFramebufferTexture")) + if gpFramebufferTexture == nil { + return errors.New("glFramebufferTexture") + } + gpFramebufferTexture1D = (C.GPFRAMEBUFFERTEXTURE1D)(getProcAddr("glFramebufferTexture1D")) + if gpFramebufferTexture1D == nil { + return errors.New("glFramebufferTexture1D") + } + gpFramebufferTexture2D = (C.GPFRAMEBUFFERTEXTURE2D)(getProcAddr("glFramebufferTexture2D")) + if gpFramebufferTexture2D == nil { + return errors.New("glFramebufferTexture2D") + } + gpFramebufferTexture3D = (C.GPFRAMEBUFFERTEXTURE3D)(getProcAddr("glFramebufferTexture3D")) + if gpFramebufferTexture3D == nil { + return errors.New("glFramebufferTexture3D") + } + gpFramebufferTextureARB = (C.GPFRAMEBUFFERTEXTUREARB)(getProcAddr("glFramebufferTextureARB")) + gpFramebufferTextureFaceARB = (C.GPFRAMEBUFFERTEXTUREFACEARB)(getProcAddr("glFramebufferTextureFaceARB")) + gpFramebufferTextureLayer = (C.GPFRAMEBUFFERTEXTURELAYER)(getProcAddr("glFramebufferTextureLayer")) + if gpFramebufferTextureLayer == nil { + return errors.New("glFramebufferTextureLayer") + } + gpFramebufferTextureLayerARB = (C.GPFRAMEBUFFERTEXTURELAYERARB)(getProcAddr("glFramebufferTextureLayerARB")) + gpFramebufferTextureMultiviewOVR = (C.GPFRAMEBUFFERTEXTUREMULTIVIEWOVR)(getProcAddr("glFramebufferTextureMultiviewOVR")) + gpFrontFace = (C.GPFRONTFACE)(getProcAddr("glFrontFace")) + if gpFrontFace == nil { + return errors.New("glFrontFace") + } + gpGenBuffers = (C.GPGENBUFFERS)(getProcAddr("glGenBuffers")) + if gpGenBuffers == nil { + return errors.New("glGenBuffers") + } + gpGenFramebuffers = (C.GPGENFRAMEBUFFERS)(getProcAddr("glGenFramebuffers")) + if gpGenFramebuffers == nil { + return errors.New("glGenFramebuffers") + } + gpGenPathsNV = (C.GPGENPATHSNV)(getProcAddr("glGenPathsNV")) + gpGenPerfMonitorsAMD = (C.GPGENPERFMONITORSAMD)(getProcAddr("glGenPerfMonitorsAMD")) + gpGenProgramPipelines = (C.GPGENPROGRAMPIPELINES)(getProcAddr("glGenProgramPipelines")) + if gpGenProgramPipelines == nil { + return errors.New("glGenProgramPipelines") + } + gpGenProgramPipelinesEXT = (C.GPGENPROGRAMPIPELINESEXT)(getProcAddr("glGenProgramPipelinesEXT")) + gpGenQueries = (C.GPGENQUERIES)(getProcAddr("glGenQueries")) + if gpGenQueries == nil { + return errors.New("glGenQueries") + } + gpGenRenderbuffers = (C.GPGENRENDERBUFFERS)(getProcAddr("glGenRenderbuffers")) + if gpGenRenderbuffers == nil { + return errors.New("glGenRenderbuffers") + } + gpGenSamplers = (C.GPGENSAMPLERS)(getProcAddr("glGenSamplers")) + if gpGenSamplers == nil { + return errors.New("glGenSamplers") + } + gpGenTextures = (C.GPGENTEXTURES)(getProcAddr("glGenTextures")) + if gpGenTextures == nil { + return errors.New("glGenTextures") + } + gpGenTransformFeedbacks = (C.GPGENTRANSFORMFEEDBACKS)(getProcAddr("glGenTransformFeedbacks")) + if gpGenTransformFeedbacks == nil { + return errors.New("glGenTransformFeedbacks") + } + gpGenVertexArrays = (C.GPGENVERTEXARRAYS)(getProcAddr("glGenVertexArrays")) + if gpGenVertexArrays == nil { + return errors.New("glGenVertexArrays") + } + gpGenerateMipmap = (C.GPGENERATEMIPMAP)(getProcAddr("glGenerateMipmap")) + if gpGenerateMipmap == nil { + return errors.New("glGenerateMipmap") + } + gpGenerateMultiTexMipmapEXT = (C.GPGENERATEMULTITEXMIPMAPEXT)(getProcAddr("glGenerateMultiTexMipmapEXT")) + gpGenerateTextureMipmap = (C.GPGENERATETEXTUREMIPMAP)(getProcAddr("glGenerateTextureMipmap")) + gpGenerateTextureMipmapEXT = (C.GPGENERATETEXTUREMIPMAPEXT)(getProcAddr("glGenerateTextureMipmapEXT")) + gpGetActiveAtomicCounterBufferiv = (C.GPGETACTIVEATOMICCOUNTERBUFFERIV)(getProcAddr("glGetActiveAtomicCounterBufferiv")) + gpGetActiveAttrib = (C.GPGETACTIVEATTRIB)(getProcAddr("glGetActiveAttrib")) + if gpGetActiveAttrib == nil { + return errors.New("glGetActiveAttrib") + } + gpGetActiveSubroutineName = (C.GPGETACTIVESUBROUTINENAME)(getProcAddr("glGetActiveSubroutineName")) + if gpGetActiveSubroutineName == nil { + return errors.New("glGetActiveSubroutineName") + } + gpGetActiveSubroutineUniformName = (C.GPGETACTIVESUBROUTINEUNIFORMNAME)(getProcAddr("glGetActiveSubroutineUniformName")) + if gpGetActiveSubroutineUniformName == nil { + return errors.New("glGetActiveSubroutineUniformName") + } + gpGetActiveSubroutineUniformiv = (C.GPGETACTIVESUBROUTINEUNIFORMIV)(getProcAddr("glGetActiveSubroutineUniformiv")) + if gpGetActiveSubroutineUniformiv == nil { + return errors.New("glGetActiveSubroutineUniformiv") + } + gpGetActiveUniform = (C.GPGETACTIVEUNIFORM)(getProcAddr("glGetActiveUniform")) + if gpGetActiveUniform == nil { + return errors.New("glGetActiveUniform") + } + gpGetActiveUniformBlockName = (C.GPGETACTIVEUNIFORMBLOCKNAME)(getProcAddr("glGetActiveUniformBlockName")) + if gpGetActiveUniformBlockName == nil { + return errors.New("glGetActiveUniformBlockName") + } + gpGetActiveUniformBlockiv = (C.GPGETACTIVEUNIFORMBLOCKIV)(getProcAddr("glGetActiveUniformBlockiv")) + if gpGetActiveUniformBlockiv == nil { + return errors.New("glGetActiveUniformBlockiv") + } + gpGetActiveUniformName = (C.GPGETACTIVEUNIFORMNAME)(getProcAddr("glGetActiveUniformName")) + if gpGetActiveUniformName == nil { + return errors.New("glGetActiveUniformName") + } + gpGetActiveUniformsiv = (C.GPGETACTIVEUNIFORMSIV)(getProcAddr("glGetActiveUniformsiv")) + if gpGetActiveUniformsiv == nil { + return errors.New("glGetActiveUniformsiv") + } + gpGetAttachedShaders = (C.GPGETATTACHEDSHADERS)(getProcAddr("glGetAttachedShaders")) + if gpGetAttachedShaders == nil { + return errors.New("glGetAttachedShaders") + } + gpGetAttribLocation = (C.GPGETATTRIBLOCATION)(getProcAddr("glGetAttribLocation")) + if gpGetAttribLocation == nil { + return errors.New("glGetAttribLocation") + } + gpGetBooleanIndexedvEXT = (C.GPGETBOOLEANINDEXEDVEXT)(getProcAddr("glGetBooleanIndexedvEXT")) + gpGetBooleani_v = (C.GPGETBOOLEANI_V)(getProcAddr("glGetBooleani_v")) + if gpGetBooleani_v == nil { + return errors.New("glGetBooleani_v") + } + gpGetBooleanv = (C.GPGETBOOLEANV)(getProcAddr("glGetBooleanv")) + if gpGetBooleanv == nil { + return errors.New("glGetBooleanv") + } + gpGetBufferParameteri64v = (C.GPGETBUFFERPARAMETERI64V)(getProcAddr("glGetBufferParameteri64v")) + if gpGetBufferParameteri64v == nil { + return errors.New("glGetBufferParameteri64v") + } + gpGetBufferParameteriv = (C.GPGETBUFFERPARAMETERIV)(getProcAddr("glGetBufferParameteriv")) + if gpGetBufferParameteriv == nil { + return errors.New("glGetBufferParameteriv") + } + gpGetBufferParameterui64vNV = (C.GPGETBUFFERPARAMETERUI64VNV)(getProcAddr("glGetBufferParameterui64vNV")) + gpGetBufferPointerv = (C.GPGETBUFFERPOINTERV)(getProcAddr("glGetBufferPointerv")) + if gpGetBufferPointerv == nil { + return errors.New("glGetBufferPointerv") + } + gpGetBufferSubData = (C.GPGETBUFFERSUBDATA)(getProcAddr("glGetBufferSubData")) + if gpGetBufferSubData == nil { + return errors.New("glGetBufferSubData") + } + gpGetCommandHeaderNV = (C.GPGETCOMMANDHEADERNV)(getProcAddr("glGetCommandHeaderNV")) + gpGetCompressedMultiTexImageEXT = (C.GPGETCOMPRESSEDMULTITEXIMAGEEXT)(getProcAddr("glGetCompressedMultiTexImageEXT")) + gpGetCompressedTexImage = (C.GPGETCOMPRESSEDTEXIMAGE)(getProcAddr("glGetCompressedTexImage")) + if gpGetCompressedTexImage == nil { + return errors.New("glGetCompressedTexImage") + } + gpGetCompressedTextureImage = (C.GPGETCOMPRESSEDTEXTUREIMAGE)(getProcAddr("glGetCompressedTextureImage")) + gpGetCompressedTextureImageEXT = (C.GPGETCOMPRESSEDTEXTUREIMAGEEXT)(getProcAddr("glGetCompressedTextureImageEXT")) + gpGetCompressedTextureSubImage = (C.GPGETCOMPRESSEDTEXTURESUBIMAGE)(getProcAddr("glGetCompressedTextureSubImage")) + gpGetCoverageModulationTableNV = (C.GPGETCOVERAGEMODULATIONTABLENV)(getProcAddr("glGetCoverageModulationTableNV")) + gpGetDebugMessageLog = (C.GPGETDEBUGMESSAGELOG)(getProcAddr("glGetDebugMessageLog")) + gpGetDebugMessageLogARB = (C.GPGETDEBUGMESSAGELOGARB)(getProcAddr("glGetDebugMessageLogARB")) + gpGetDebugMessageLogKHR = (C.GPGETDEBUGMESSAGELOGKHR)(getProcAddr("glGetDebugMessageLogKHR")) + gpGetDoubleIndexedvEXT = (C.GPGETDOUBLEINDEXEDVEXT)(getProcAddr("glGetDoubleIndexedvEXT")) + gpGetDoublei_v = (C.GPGETDOUBLEI_V)(getProcAddr("glGetDoublei_v")) + if gpGetDoublei_v == nil { + return errors.New("glGetDoublei_v") + } + gpGetDoublei_vEXT = (C.GPGETDOUBLEI_VEXT)(getProcAddr("glGetDoublei_vEXT")) + gpGetDoublev = (C.GPGETDOUBLEV)(getProcAddr("glGetDoublev")) + if gpGetDoublev == nil { + return errors.New("glGetDoublev") + } + gpGetError = (C.GPGETERROR)(getProcAddr("glGetError")) + if gpGetError == nil { + return errors.New("glGetError") + } + gpGetFirstPerfQueryIdINTEL = (C.GPGETFIRSTPERFQUERYIDINTEL)(getProcAddr("glGetFirstPerfQueryIdINTEL")) + gpGetFloatIndexedvEXT = (C.GPGETFLOATINDEXEDVEXT)(getProcAddr("glGetFloatIndexedvEXT")) + gpGetFloati_v = (C.GPGETFLOATI_V)(getProcAddr("glGetFloati_v")) + if gpGetFloati_v == nil { + return errors.New("glGetFloati_v") + } + gpGetFloati_vEXT = (C.GPGETFLOATI_VEXT)(getProcAddr("glGetFloati_vEXT")) + gpGetFloatv = (C.GPGETFLOATV)(getProcAddr("glGetFloatv")) + if gpGetFloatv == nil { + return errors.New("glGetFloatv") + } + gpGetFragDataIndex = (C.GPGETFRAGDATAINDEX)(getProcAddr("glGetFragDataIndex")) + if gpGetFragDataIndex == nil { + return errors.New("glGetFragDataIndex") + } + gpGetFragDataLocation = (C.GPGETFRAGDATALOCATION)(getProcAddr("glGetFragDataLocation")) + if gpGetFragDataLocation == nil { + return errors.New("glGetFragDataLocation") + } + gpGetFramebufferAttachmentParameteriv = (C.GPGETFRAMEBUFFERATTACHMENTPARAMETERIV)(getProcAddr("glGetFramebufferAttachmentParameteriv")) + if gpGetFramebufferAttachmentParameteriv == nil { + return errors.New("glGetFramebufferAttachmentParameteriv") + } + gpGetFramebufferParameteriv = (C.GPGETFRAMEBUFFERPARAMETERIV)(getProcAddr("glGetFramebufferParameteriv")) + gpGetFramebufferParameterivEXT = (C.GPGETFRAMEBUFFERPARAMETERIVEXT)(getProcAddr("glGetFramebufferParameterivEXT")) + gpGetGraphicsResetStatus = (C.GPGETGRAPHICSRESETSTATUS)(getProcAddr("glGetGraphicsResetStatus")) + gpGetGraphicsResetStatusARB = (C.GPGETGRAPHICSRESETSTATUSARB)(getProcAddr("glGetGraphicsResetStatusARB")) + gpGetGraphicsResetStatusKHR = (C.GPGETGRAPHICSRESETSTATUSKHR)(getProcAddr("glGetGraphicsResetStatusKHR")) + gpGetImageHandleARB = (C.GPGETIMAGEHANDLEARB)(getProcAddr("glGetImageHandleARB")) + gpGetImageHandleNV = (C.GPGETIMAGEHANDLENV)(getProcAddr("glGetImageHandleNV")) + gpGetInteger64i_v = (C.GPGETINTEGER64I_V)(getProcAddr("glGetInteger64i_v")) + if gpGetInteger64i_v == nil { + return errors.New("glGetInteger64i_v") + } + gpGetInteger64v = (C.GPGETINTEGER64V)(getProcAddr("glGetInteger64v")) + if gpGetInteger64v == nil { + return errors.New("glGetInteger64v") + } + gpGetIntegerIndexedvEXT = (C.GPGETINTEGERINDEXEDVEXT)(getProcAddr("glGetIntegerIndexedvEXT")) + gpGetIntegeri_v = (C.GPGETINTEGERI_V)(getProcAddr("glGetIntegeri_v")) + if gpGetIntegeri_v == nil { + return errors.New("glGetIntegeri_v") + } + gpGetIntegerui64i_vNV = (C.GPGETINTEGERUI64I_VNV)(getProcAddr("glGetIntegerui64i_vNV")) + gpGetIntegerui64vNV = (C.GPGETINTEGERUI64VNV)(getProcAddr("glGetIntegerui64vNV")) + gpGetIntegerv = (C.GPGETINTEGERV)(getProcAddr("glGetIntegerv")) + if gpGetIntegerv == nil { + return errors.New("glGetIntegerv") + } + gpGetInternalformatSampleivNV = (C.GPGETINTERNALFORMATSAMPLEIVNV)(getProcAddr("glGetInternalformatSampleivNV")) + gpGetInternalformati64v = (C.GPGETINTERNALFORMATI64V)(getProcAddr("glGetInternalformati64v")) + gpGetInternalformativ = (C.GPGETINTERNALFORMATIV)(getProcAddr("glGetInternalformativ")) + gpGetMultiTexEnvfvEXT = (C.GPGETMULTITEXENVFVEXT)(getProcAddr("glGetMultiTexEnvfvEXT")) + gpGetMultiTexEnvivEXT = (C.GPGETMULTITEXENVIVEXT)(getProcAddr("glGetMultiTexEnvivEXT")) + gpGetMultiTexGendvEXT = (C.GPGETMULTITEXGENDVEXT)(getProcAddr("glGetMultiTexGendvEXT")) + gpGetMultiTexGenfvEXT = (C.GPGETMULTITEXGENFVEXT)(getProcAddr("glGetMultiTexGenfvEXT")) + gpGetMultiTexGenivEXT = (C.GPGETMULTITEXGENIVEXT)(getProcAddr("glGetMultiTexGenivEXT")) + gpGetMultiTexImageEXT = (C.GPGETMULTITEXIMAGEEXT)(getProcAddr("glGetMultiTexImageEXT")) + gpGetMultiTexLevelParameterfvEXT = (C.GPGETMULTITEXLEVELPARAMETERFVEXT)(getProcAddr("glGetMultiTexLevelParameterfvEXT")) + gpGetMultiTexLevelParameterivEXT = (C.GPGETMULTITEXLEVELPARAMETERIVEXT)(getProcAddr("glGetMultiTexLevelParameterivEXT")) + gpGetMultiTexParameterIivEXT = (C.GPGETMULTITEXPARAMETERIIVEXT)(getProcAddr("glGetMultiTexParameterIivEXT")) + gpGetMultiTexParameterIuivEXT = (C.GPGETMULTITEXPARAMETERIUIVEXT)(getProcAddr("glGetMultiTexParameterIuivEXT")) + gpGetMultiTexParameterfvEXT = (C.GPGETMULTITEXPARAMETERFVEXT)(getProcAddr("glGetMultiTexParameterfvEXT")) + gpGetMultiTexParameterivEXT = (C.GPGETMULTITEXPARAMETERIVEXT)(getProcAddr("glGetMultiTexParameterivEXT")) + gpGetMultisamplefv = (C.GPGETMULTISAMPLEFV)(getProcAddr("glGetMultisamplefv")) + if gpGetMultisamplefv == nil { + return errors.New("glGetMultisamplefv") + } + gpGetNamedBufferParameteri64v = (C.GPGETNAMEDBUFFERPARAMETERI64V)(getProcAddr("glGetNamedBufferParameteri64v")) + gpGetNamedBufferParameteriv = (C.GPGETNAMEDBUFFERPARAMETERIV)(getProcAddr("glGetNamedBufferParameteriv")) + gpGetNamedBufferParameterivEXT = (C.GPGETNAMEDBUFFERPARAMETERIVEXT)(getProcAddr("glGetNamedBufferParameterivEXT")) + gpGetNamedBufferParameterui64vNV = (C.GPGETNAMEDBUFFERPARAMETERUI64VNV)(getProcAddr("glGetNamedBufferParameterui64vNV")) + gpGetNamedBufferPointerv = (C.GPGETNAMEDBUFFERPOINTERV)(getProcAddr("glGetNamedBufferPointerv")) + gpGetNamedBufferPointervEXT = (C.GPGETNAMEDBUFFERPOINTERVEXT)(getProcAddr("glGetNamedBufferPointervEXT")) + gpGetNamedBufferSubData = (C.GPGETNAMEDBUFFERSUBDATA)(getProcAddr("glGetNamedBufferSubData")) + gpGetNamedBufferSubDataEXT = (C.GPGETNAMEDBUFFERSUBDATAEXT)(getProcAddr("glGetNamedBufferSubDataEXT")) + gpGetNamedFramebufferAttachmentParameteriv = (C.GPGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIV)(getProcAddr("glGetNamedFramebufferAttachmentParameteriv")) + gpGetNamedFramebufferAttachmentParameterivEXT = (C.GPGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXT)(getProcAddr("glGetNamedFramebufferAttachmentParameterivEXT")) + gpGetNamedFramebufferParameteriv = (C.GPGETNAMEDFRAMEBUFFERPARAMETERIV)(getProcAddr("glGetNamedFramebufferParameteriv")) + gpGetNamedFramebufferParameterivEXT = (C.GPGETNAMEDFRAMEBUFFERPARAMETERIVEXT)(getProcAddr("glGetNamedFramebufferParameterivEXT")) + gpGetNamedProgramLocalParameterIivEXT = (C.GPGETNAMEDPROGRAMLOCALPARAMETERIIVEXT)(getProcAddr("glGetNamedProgramLocalParameterIivEXT")) + gpGetNamedProgramLocalParameterIuivEXT = (C.GPGETNAMEDPROGRAMLOCALPARAMETERIUIVEXT)(getProcAddr("glGetNamedProgramLocalParameterIuivEXT")) + gpGetNamedProgramLocalParameterdvEXT = (C.GPGETNAMEDPROGRAMLOCALPARAMETERDVEXT)(getProcAddr("glGetNamedProgramLocalParameterdvEXT")) + gpGetNamedProgramLocalParameterfvEXT = (C.GPGETNAMEDPROGRAMLOCALPARAMETERFVEXT)(getProcAddr("glGetNamedProgramLocalParameterfvEXT")) + gpGetNamedProgramStringEXT = (C.GPGETNAMEDPROGRAMSTRINGEXT)(getProcAddr("glGetNamedProgramStringEXT")) + gpGetNamedProgramivEXT = (C.GPGETNAMEDPROGRAMIVEXT)(getProcAddr("glGetNamedProgramivEXT")) + gpGetNamedRenderbufferParameteriv = (C.GPGETNAMEDRENDERBUFFERPARAMETERIV)(getProcAddr("glGetNamedRenderbufferParameteriv")) + gpGetNamedRenderbufferParameterivEXT = (C.GPGETNAMEDRENDERBUFFERPARAMETERIVEXT)(getProcAddr("glGetNamedRenderbufferParameterivEXT")) + gpGetNamedStringARB = (C.GPGETNAMEDSTRINGARB)(getProcAddr("glGetNamedStringARB")) + gpGetNamedStringivARB = (C.GPGETNAMEDSTRINGIVARB)(getProcAddr("glGetNamedStringivARB")) + gpGetNextPerfQueryIdINTEL = (C.GPGETNEXTPERFQUERYIDINTEL)(getProcAddr("glGetNextPerfQueryIdINTEL")) + gpGetObjectLabel = (C.GPGETOBJECTLABEL)(getProcAddr("glGetObjectLabel")) + gpGetObjectLabelEXT = (C.GPGETOBJECTLABELEXT)(getProcAddr("glGetObjectLabelEXT")) + gpGetObjectLabelKHR = (C.GPGETOBJECTLABELKHR)(getProcAddr("glGetObjectLabelKHR")) + gpGetObjectPtrLabel = (C.GPGETOBJECTPTRLABEL)(getProcAddr("glGetObjectPtrLabel")) + gpGetObjectPtrLabelKHR = (C.GPGETOBJECTPTRLABELKHR)(getProcAddr("glGetObjectPtrLabelKHR")) + gpGetPathCommandsNV = (C.GPGETPATHCOMMANDSNV)(getProcAddr("glGetPathCommandsNV")) + gpGetPathCoordsNV = (C.GPGETPATHCOORDSNV)(getProcAddr("glGetPathCoordsNV")) + gpGetPathDashArrayNV = (C.GPGETPATHDASHARRAYNV)(getProcAddr("glGetPathDashArrayNV")) + gpGetPathLengthNV = (C.GPGETPATHLENGTHNV)(getProcAddr("glGetPathLengthNV")) + gpGetPathMetricRangeNV = (C.GPGETPATHMETRICRANGENV)(getProcAddr("glGetPathMetricRangeNV")) + gpGetPathMetricsNV = (C.GPGETPATHMETRICSNV)(getProcAddr("glGetPathMetricsNV")) + gpGetPathParameterfvNV = (C.GPGETPATHPARAMETERFVNV)(getProcAddr("glGetPathParameterfvNV")) + gpGetPathParameterivNV = (C.GPGETPATHPARAMETERIVNV)(getProcAddr("glGetPathParameterivNV")) + gpGetPathSpacingNV = (C.GPGETPATHSPACINGNV)(getProcAddr("glGetPathSpacingNV")) + gpGetPerfCounterInfoINTEL = (C.GPGETPERFCOUNTERINFOINTEL)(getProcAddr("glGetPerfCounterInfoINTEL")) + gpGetPerfMonitorCounterDataAMD = (C.GPGETPERFMONITORCOUNTERDATAAMD)(getProcAddr("glGetPerfMonitorCounterDataAMD")) + gpGetPerfMonitorCounterInfoAMD = (C.GPGETPERFMONITORCOUNTERINFOAMD)(getProcAddr("glGetPerfMonitorCounterInfoAMD")) + gpGetPerfMonitorCounterStringAMD = (C.GPGETPERFMONITORCOUNTERSTRINGAMD)(getProcAddr("glGetPerfMonitorCounterStringAMD")) + gpGetPerfMonitorCountersAMD = (C.GPGETPERFMONITORCOUNTERSAMD)(getProcAddr("glGetPerfMonitorCountersAMD")) + gpGetPerfMonitorGroupStringAMD = (C.GPGETPERFMONITORGROUPSTRINGAMD)(getProcAddr("glGetPerfMonitorGroupStringAMD")) + gpGetPerfMonitorGroupsAMD = (C.GPGETPERFMONITORGROUPSAMD)(getProcAddr("glGetPerfMonitorGroupsAMD")) + gpGetPerfQueryDataINTEL = (C.GPGETPERFQUERYDATAINTEL)(getProcAddr("glGetPerfQueryDataINTEL")) + gpGetPerfQueryIdByNameINTEL = (C.GPGETPERFQUERYIDBYNAMEINTEL)(getProcAddr("glGetPerfQueryIdByNameINTEL")) + gpGetPerfQueryInfoINTEL = (C.GPGETPERFQUERYINFOINTEL)(getProcAddr("glGetPerfQueryInfoINTEL")) + gpGetPointerIndexedvEXT = (C.GPGETPOINTERINDEXEDVEXT)(getProcAddr("glGetPointerIndexedvEXT")) + gpGetPointeri_vEXT = (C.GPGETPOINTERI_VEXT)(getProcAddr("glGetPointeri_vEXT")) + gpGetPointerv = (C.GPGETPOINTERV)(getProcAddr("glGetPointerv")) + gpGetPointervKHR = (C.GPGETPOINTERVKHR)(getProcAddr("glGetPointervKHR")) + gpGetProgramBinary = (C.GPGETPROGRAMBINARY)(getProcAddr("glGetProgramBinary")) + if gpGetProgramBinary == nil { + return errors.New("glGetProgramBinary") + } + gpGetProgramInfoLog = (C.GPGETPROGRAMINFOLOG)(getProcAddr("glGetProgramInfoLog")) + if gpGetProgramInfoLog == nil { + return errors.New("glGetProgramInfoLog") + } + gpGetProgramInterfaceiv = (C.GPGETPROGRAMINTERFACEIV)(getProcAddr("glGetProgramInterfaceiv")) + gpGetProgramPipelineInfoLog = (C.GPGETPROGRAMPIPELINEINFOLOG)(getProcAddr("glGetProgramPipelineInfoLog")) + if gpGetProgramPipelineInfoLog == nil { + return errors.New("glGetProgramPipelineInfoLog") + } + gpGetProgramPipelineInfoLogEXT = (C.GPGETPROGRAMPIPELINEINFOLOGEXT)(getProcAddr("glGetProgramPipelineInfoLogEXT")) + gpGetProgramPipelineiv = (C.GPGETPROGRAMPIPELINEIV)(getProcAddr("glGetProgramPipelineiv")) + if gpGetProgramPipelineiv == nil { + return errors.New("glGetProgramPipelineiv") + } + gpGetProgramPipelineivEXT = (C.GPGETPROGRAMPIPELINEIVEXT)(getProcAddr("glGetProgramPipelineivEXT")) + gpGetProgramResourceIndex = (C.GPGETPROGRAMRESOURCEINDEX)(getProcAddr("glGetProgramResourceIndex")) + gpGetProgramResourceLocation = (C.GPGETPROGRAMRESOURCELOCATION)(getProcAddr("glGetProgramResourceLocation")) + gpGetProgramResourceLocationIndex = (C.GPGETPROGRAMRESOURCELOCATIONINDEX)(getProcAddr("glGetProgramResourceLocationIndex")) + gpGetProgramResourceName = (C.GPGETPROGRAMRESOURCENAME)(getProcAddr("glGetProgramResourceName")) + gpGetProgramResourcefvNV = (C.GPGETPROGRAMRESOURCEFVNV)(getProcAddr("glGetProgramResourcefvNV")) + gpGetProgramResourceiv = (C.GPGETPROGRAMRESOURCEIV)(getProcAddr("glGetProgramResourceiv")) + gpGetProgramStageiv = (C.GPGETPROGRAMSTAGEIV)(getProcAddr("glGetProgramStageiv")) + if gpGetProgramStageiv == nil { + return errors.New("glGetProgramStageiv") + } + gpGetProgramiv = (C.GPGETPROGRAMIV)(getProcAddr("glGetProgramiv")) + if gpGetProgramiv == nil { + return errors.New("glGetProgramiv") + } + gpGetQueryBufferObjecti64v = (C.GPGETQUERYBUFFEROBJECTI64V)(getProcAddr("glGetQueryBufferObjecti64v")) + gpGetQueryBufferObjectiv = (C.GPGETQUERYBUFFEROBJECTIV)(getProcAddr("glGetQueryBufferObjectiv")) + gpGetQueryBufferObjectui64v = (C.GPGETQUERYBUFFEROBJECTUI64V)(getProcAddr("glGetQueryBufferObjectui64v")) + gpGetQueryBufferObjectuiv = (C.GPGETQUERYBUFFEROBJECTUIV)(getProcAddr("glGetQueryBufferObjectuiv")) + gpGetQueryIndexediv = (C.GPGETQUERYINDEXEDIV)(getProcAddr("glGetQueryIndexediv")) + if gpGetQueryIndexediv == nil { + return errors.New("glGetQueryIndexediv") + } + gpGetQueryObjecti64v = (C.GPGETQUERYOBJECTI64V)(getProcAddr("glGetQueryObjecti64v")) + if gpGetQueryObjecti64v == nil { + return errors.New("glGetQueryObjecti64v") + } + gpGetQueryObjectiv = (C.GPGETQUERYOBJECTIV)(getProcAddr("glGetQueryObjectiv")) + if gpGetQueryObjectiv == nil { + return errors.New("glGetQueryObjectiv") + } + gpGetQueryObjectui64v = (C.GPGETQUERYOBJECTUI64V)(getProcAddr("glGetQueryObjectui64v")) + if gpGetQueryObjectui64v == nil { + return errors.New("glGetQueryObjectui64v") + } + gpGetQueryObjectuiv = (C.GPGETQUERYOBJECTUIV)(getProcAddr("glGetQueryObjectuiv")) + if gpGetQueryObjectuiv == nil { + return errors.New("glGetQueryObjectuiv") + } + gpGetQueryiv = (C.GPGETQUERYIV)(getProcAddr("glGetQueryiv")) + if gpGetQueryiv == nil { + return errors.New("glGetQueryiv") + } + gpGetRenderbufferParameteriv = (C.GPGETRENDERBUFFERPARAMETERIV)(getProcAddr("glGetRenderbufferParameteriv")) + if gpGetRenderbufferParameteriv == nil { + return errors.New("glGetRenderbufferParameteriv") + } + gpGetSamplerParameterIiv = (C.GPGETSAMPLERPARAMETERIIV)(getProcAddr("glGetSamplerParameterIiv")) + if gpGetSamplerParameterIiv == nil { + return errors.New("glGetSamplerParameterIiv") + } + gpGetSamplerParameterIuiv = (C.GPGETSAMPLERPARAMETERIUIV)(getProcAddr("glGetSamplerParameterIuiv")) + if gpGetSamplerParameterIuiv == nil { + return errors.New("glGetSamplerParameterIuiv") + } + gpGetSamplerParameterfv = (C.GPGETSAMPLERPARAMETERFV)(getProcAddr("glGetSamplerParameterfv")) + if gpGetSamplerParameterfv == nil { + return errors.New("glGetSamplerParameterfv") + } + gpGetSamplerParameteriv = (C.GPGETSAMPLERPARAMETERIV)(getProcAddr("glGetSamplerParameteriv")) + if gpGetSamplerParameteriv == nil { + return errors.New("glGetSamplerParameteriv") + } + gpGetShaderInfoLog = (C.GPGETSHADERINFOLOG)(getProcAddr("glGetShaderInfoLog")) + if gpGetShaderInfoLog == nil { + return errors.New("glGetShaderInfoLog") + } + gpGetShaderPrecisionFormat = (C.GPGETSHADERPRECISIONFORMAT)(getProcAddr("glGetShaderPrecisionFormat")) + if gpGetShaderPrecisionFormat == nil { + return errors.New("glGetShaderPrecisionFormat") + } + gpGetShaderSource = (C.GPGETSHADERSOURCE)(getProcAddr("glGetShaderSource")) + if gpGetShaderSource == nil { + return errors.New("glGetShaderSource") + } + gpGetShaderiv = (C.GPGETSHADERIV)(getProcAddr("glGetShaderiv")) + if gpGetShaderiv == nil { + return errors.New("glGetShaderiv") + } + gpGetStageIndexNV = (C.GPGETSTAGEINDEXNV)(getProcAddr("glGetStageIndexNV")) + gpGetString = (C.GPGETSTRING)(getProcAddr("glGetString")) + if gpGetString == nil { + return errors.New("glGetString") + } + gpGetStringi = (C.GPGETSTRINGI)(getProcAddr("glGetStringi")) + if gpGetStringi == nil { + return errors.New("glGetStringi") + } + gpGetSubroutineIndex = (C.GPGETSUBROUTINEINDEX)(getProcAddr("glGetSubroutineIndex")) + if gpGetSubroutineIndex == nil { + return errors.New("glGetSubroutineIndex") + } + gpGetSubroutineUniformLocation = (C.GPGETSUBROUTINEUNIFORMLOCATION)(getProcAddr("glGetSubroutineUniformLocation")) + if gpGetSubroutineUniformLocation == nil { + return errors.New("glGetSubroutineUniformLocation") + } + gpGetSynciv = (C.GPGETSYNCIV)(getProcAddr("glGetSynciv")) + if gpGetSynciv == nil { + return errors.New("glGetSynciv") + } + gpGetTexImage = (C.GPGETTEXIMAGE)(getProcAddr("glGetTexImage")) + if gpGetTexImage == nil { + return errors.New("glGetTexImage") + } + gpGetTexLevelParameterfv = (C.GPGETTEXLEVELPARAMETERFV)(getProcAddr("glGetTexLevelParameterfv")) + if gpGetTexLevelParameterfv == nil { + return errors.New("glGetTexLevelParameterfv") + } + gpGetTexLevelParameteriv = (C.GPGETTEXLEVELPARAMETERIV)(getProcAddr("glGetTexLevelParameteriv")) + if gpGetTexLevelParameteriv == nil { + return errors.New("glGetTexLevelParameteriv") + } + gpGetTexParameterIiv = (C.GPGETTEXPARAMETERIIV)(getProcAddr("glGetTexParameterIiv")) + if gpGetTexParameterIiv == nil { + return errors.New("glGetTexParameterIiv") + } + gpGetTexParameterIuiv = (C.GPGETTEXPARAMETERIUIV)(getProcAddr("glGetTexParameterIuiv")) + if gpGetTexParameterIuiv == nil { + return errors.New("glGetTexParameterIuiv") + } + gpGetTexParameterfv = (C.GPGETTEXPARAMETERFV)(getProcAddr("glGetTexParameterfv")) + if gpGetTexParameterfv == nil { + return errors.New("glGetTexParameterfv") + } + gpGetTexParameteriv = (C.GPGETTEXPARAMETERIV)(getProcAddr("glGetTexParameteriv")) + if gpGetTexParameteriv == nil { + return errors.New("glGetTexParameteriv") + } + gpGetTextureHandleARB = (C.GPGETTEXTUREHANDLEARB)(getProcAddr("glGetTextureHandleARB")) + gpGetTextureHandleNV = (C.GPGETTEXTUREHANDLENV)(getProcAddr("glGetTextureHandleNV")) + gpGetTextureImage = (C.GPGETTEXTUREIMAGE)(getProcAddr("glGetTextureImage")) + gpGetTextureImageEXT = (C.GPGETTEXTUREIMAGEEXT)(getProcAddr("glGetTextureImageEXT")) + gpGetTextureLevelParameterfv = (C.GPGETTEXTURELEVELPARAMETERFV)(getProcAddr("glGetTextureLevelParameterfv")) + gpGetTextureLevelParameterfvEXT = (C.GPGETTEXTURELEVELPARAMETERFVEXT)(getProcAddr("glGetTextureLevelParameterfvEXT")) + gpGetTextureLevelParameteriv = (C.GPGETTEXTURELEVELPARAMETERIV)(getProcAddr("glGetTextureLevelParameteriv")) + gpGetTextureLevelParameterivEXT = (C.GPGETTEXTURELEVELPARAMETERIVEXT)(getProcAddr("glGetTextureLevelParameterivEXT")) + gpGetTextureParameterIiv = (C.GPGETTEXTUREPARAMETERIIV)(getProcAddr("glGetTextureParameterIiv")) + gpGetTextureParameterIivEXT = (C.GPGETTEXTUREPARAMETERIIVEXT)(getProcAddr("glGetTextureParameterIivEXT")) + gpGetTextureParameterIuiv = (C.GPGETTEXTUREPARAMETERIUIV)(getProcAddr("glGetTextureParameterIuiv")) + gpGetTextureParameterIuivEXT = (C.GPGETTEXTUREPARAMETERIUIVEXT)(getProcAddr("glGetTextureParameterIuivEXT")) + gpGetTextureParameterfv = (C.GPGETTEXTUREPARAMETERFV)(getProcAddr("glGetTextureParameterfv")) + gpGetTextureParameterfvEXT = (C.GPGETTEXTUREPARAMETERFVEXT)(getProcAddr("glGetTextureParameterfvEXT")) + gpGetTextureParameteriv = (C.GPGETTEXTUREPARAMETERIV)(getProcAddr("glGetTextureParameteriv")) + gpGetTextureParameterivEXT = (C.GPGETTEXTUREPARAMETERIVEXT)(getProcAddr("glGetTextureParameterivEXT")) + gpGetTextureSamplerHandleARB = (C.GPGETTEXTURESAMPLERHANDLEARB)(getProcAddr("glGetTextureSamplerHandleARB")) + gpGetTextureSamplerHandleNV = (C.GPGETTEXTURESAMPLERHANDLENV)(getProcAddr("glGetTextureSamplerHandleNV")) + gpGetTextureSubImage = (C.GPGETTEXTURESUBIMAGE)(getProcAddr("glGetTextureSubImage")) + gpGetTransformFeedbackVarying = (C.GPGETTRANSFORMFEEDBACKVARYING)(getProcAddr("glGetTransformFeedbackVarying")) + if gpGetTransformFeedbackVarying == nil { + return errors.New("glGetTransformFeedbackVarying") + } + gpGetTransformFeedbacki64_v = (C.GPGETTRANSFORMFEEDBACKI64_V)(getProcAddr("glGetTransformFeedbacki64_v")) + gpGetTransformFeedbacki_v = (C.GPGETTRANSFORMFEEDBACKI_V)(getProcAddr("glGetTransformFeedbacki_v")) + gpGetTransformFeedbackiv = (C.GPGETTRANSFORMFEEDBACKIV)(getProcAddr("glGetTransformFeedbackiv")) + gpGetUniformBlockIndex = (C.GPGETUNIFORMBLOCKINDEX)(getProcAddr("glGetUniformBlockIndex")) + if gpGetUniformBlockIndex == nil { + return errors.New("glGetUniformBlockIndex") + } + gpGetUniformIndices = (C.GPGETUNIFORMINDICES)(getProcAddr("glGetUniformIndices")) + if gpGetUniformIndices == nil { + return errors.New("glGetUniformIndices") + } + gpGetUniformLocation = (C.GPGETUNIFORMLOCATION)(getProcAddr("glGetUniformLocation")) + if gpGetUniformLocation == nil { + return errors.New("glGetUniformLocation") + } + gpGetUniformSubroutineuiv = (C.GPGETUNIFORMSUBROUTINEUIV)(getProcAddr("glGetUniformSubroutineuiv")) + if gpGetUniformSubroutineuiv == nil { + return errors.New("glGetUniformSubroutineuiv") + } + gpGetUniformdv = (C.GPGETUNIFORMDV)(getProcAddr("glGetUniformdv")) + if gpGetUniformdv == nil { + return errors.New("glGetUniformdv") + } + gpGetUniformfv = (C.GPGETUNIFORMFV)(getProcAddr("glGetUniformfv")) + if gpGetUniformfv == nil { + return errors.New("glGetUniformfv") + } + gpGetUniformi64vARB = (C.GPGETUNIFORMI64VARB)(getProcAddr("glGetUniformi64vARB")) + gpGetUniformi64vNV = (C.GPGETUNIFORMI64VNV)(getProcAddr("glGetUniformi64vNV")) + gpGetUniformiv = (C.GPGETUNIFORMIV)(getProcAddr("glGetUniformiv")) + if gpGetUniformiv == nil { + return errors.New("glGetUniformiv") + } + gpGetUniformui64vARB = (C.GPGETUNIFORMUI64VARB)(getProcAddr("glGetUniformui64vARB")) + gpGetUniformui64vNV = (C.GPGETUNIFORMUI64VNV)(getProcAddr("glGetUniformui64vNV")) + gpGetUniformuiv = (C.GPGETUNIFORMUIV)(getProcAddr("glGetUniformuiv")) + if gpGetUniformuiv == nil { + return errors.New("glGetUniformuiv") + } + gpGetVertexArrayIndexed64iv = (C.GPGETVERTEXARRAYINDEXED64IV)(getProcAddr("glGetVertexArrayIndexed64iv")) + gpGetVertexArrayIndexediv = (C.GPGETVERTEXARRAYINDEXEDIV)(getProcAddr("glGetVertexArrayIndexediv")) + gpGetVertexArrayIntegeri_vEXT = (C.GPGETVERTEXARRAYINTEGERI_VEXT)(getProcAddr("glGetVertexArrayIntegeri_vEXT")) + gpGetVertexArrayIntegervEXT = (C.GPGETVERTEXARRAYINTEGERVEXT)(getProcAddr("glGetVertexArrayIntegervEXT")) + gpGetVertexArrayPointeri_vEXT = (C.GPGETVERTEXARRAYPOINTERI_VEXT)(getProcAddr("glGetVertexArrayPointeri_vEXT")) + gpGetVertexArrayPointervEXT = (C.GPGETVERTEXARRAYPOINTERVEXT)(getProcAddr("glGetVertexArrayPointervEXT")) + gpGetVertexArrayiv = (C.GPGETVERTEXARRAYIV)(getProcAddr("glGetVertexArrayiv")) + gpGetVertexAttribIiv = (C.GPGETVERTEXATTRIBIIV)(getProcAddr("glGetVertexAttribIiv")) + if gpGetVertexAttribIiv == nil { + return errors.New("glGetVertexAttribIiv") + } + gpGetVertexAttribIuiv = (C.GPGETVERTEXATTRIBIUIV)(getProcAddr("glGetVertexAttribIuiv")) + if gpGetVertexAttribIuiv == nil { + return errors.New("glGetVertexAttribIuiv") + } + gpGetVertexAttribLdv = (C.GPGETVERTEXATTRIBLDV)(getProcAddr("glGetVertexAttribLdv")) + if gpGetVertexAttribLdv == nil { + return errors.New("glGetVertexAttribLdv") + } + gpGetVertexAttribLi64vNV = (C.GPGETVERTEXATTRIBLI64VNV)(getProcAddr("glGetVertexAttribLi64vNV")) + gpGetVertexAttribLui64vARB = (C.GPGETVERTEXATTRIBLUI64VARB)(getProcAddr("glGetVertexAttribLui64vARB")) + gpGetVertexAttribLui64vNV = (C.GPGETVERTEXATTRIBLUI64VNV)(getProcAddr("glGetVertexAttribLui64vNV")) + gpGetVertexAttribPointerv = (C.GPGETVERTEXATTRIBPOINTERV)(getProcAddr("glGetVertexAttribPointerv")) + if gpGetVertexAttribPointerv == nil { + return errors.New("glGetVertexAttribPointerv") + } + gpGetVertexAttribdv = (C.GPGETVERTEXATTRIBDV)(getProcAddr("glGetVertexAttribdv")) + if gpGetVertexAttribdv == nil { + return errors.New("glGetVertexAttribdv") + } + gpGetVertexAttribfv = (C.GPGETVERTEXATTRIBFV)(getProcAddr("glGetVertexAttribfv")) + if gpGetVertexAttribfv == nil { + return errors.New("glGetVertexAttribfv") + } + gpGetVertexAttribiv = (C.GPGETVERTEXATTRIBIV)(getProcAddr("glGetVertexAttribiv")) + if gpGetVertexAttribiv == nil { + return errors.New("glGetVertexAttribiv") + } + gpGetVkProcAddrNV = (C.GPGETVKPROCADDRNV)(getProcAddr("glGetVkProcAddrNV")) + gpGetnCompressedTexImageARB = (C.GPGETNCOMPRESSEDTEXIMAGEARB)(getProcAddr("glGetnCompressedTexImageARB")) + gpGetnTexImageARB = (C.GPGETNTEXIMAGEARB)(getProcAddr("glGetnTexImageARB")) + gpGetnUniformdvARB = (C.GPGETNUNIFORMDVARB)(getProcAddr("glGetnUniformdvARB")) + gpGetnUniformfv = (C.GPGETNUNIFORMFV)(getProcAddr("glGetnUniformfv")) + gpGetnUniformfvARB = (C.GPGETNUNIFORMFVARB)(getProcAddr("glGetnUniformfvARB")) + gpGetnUniformfvKHR = (C.GPGETNUNIFORMFVKHR)(getProcAddr("glGetnUniformfvKHR")) + gpGetnUniformi64vARB = (C.GPGETNUNIFORMI64VARB)(getProcAddr("glGetnUniformi64vARB")) + gpGetnUniformiv = (C.GPGETNUNIFORMIV)(getProcAddr("glGetnUniformiv")) + gpGetnUniformivARB = (C.GPGETNUNIFORMIVARB)(getProcAddr("glGetnUniformivARB")) + gpGetnUniformivKHR = (C.GPGETNUNIFORMIVKHR)(getProcAddr("glGetnUniformivKHR")) + gpGetnUniformui64vARB = (C.GPGETNUNIFORMUI64VARB)(getProcAddr("glGetnUniformui64vARB")) + gpGetnUniformuiv = (C.GPGETNUNIFORMUIV)(getProcAddr("glGetnUniformuiv")) + gpGetnUniformuivARB = (C.GPGETNUNIFORMUIVARB)(getProcAddr("glGetnUniformuivARB")) + gpGetnUniformuivKHR = (C.GPGETNUNIFORMUIVKHR)(getProcAddr("glGetnUniformuivKHR")) + gpHint = (C.GPHINT)(getProcAddr("glHint")) + if gpHint == nil { + return errors.New("glHint") + } + gpIndexFormatNV = (C.GPINDEXFORMATNV)(getProcAddr("glIndexFormatNV")) + gpInsertEventMarkerEXT = (C.GPINSERTEVENTMARKEREXT)(getProcAddr("glInsertEventMarkerEXT")) + gpInterpolatePathsNV = (C.GPINTERPOLATEPATHSNV)(getProcAddr("glInterpolatePathsNV")) + gpInvalidateBufferData = (C.GPINVALIDATEBUFFERDATA)(getProcAddr("glInvalidateBufferData")) + gpInvalidateBufferSubData = (C.GPINVALIDATEBUFFERSUBDATA)(getProcAddr("glInvalidateBufferSubData")) + gpInvalidateFramebuffer = (C.GPINVALIDATEFRAMEBUFFER)(getProcAddr("glInvalidateFramebuffer")) + gpInvalidateNamedFramebufferData = (C.GPINVALIDATENAMEDFRAMEBUFFERDATA)(getProcAddr("glInvalidateNamedFramebufferData")) + gpInvalidateNamedFramebufferSubData = (C.GPINVALIDATENAMEDFRAMEBUFFERSUBDATA)(getProcAddr("glInvalidateNamedFramebufferSubData")) + gpInvalidateSubFramebuffer = (C.GPINVALIDATESUBFRAMEBUFFER)(getProcAddr("glInvalidateSubFramebuffer")) + gpInvalidateTexImage = (C.GPINVALIDATETEXIMAGE)(getProcAddr("glInvalidateTexImage")) + gpInvalidateTexSubImage = (C.GPINVALIDATETEXSUBIMAGE)(getProcAddr("glInvalidateTexSubImage")) + gpIsBuffer = (C.GPISBUFFER)(getProcAddr("glIsBuffer")) + if gpIsBuffer == nil { + return errors.New("glIsBuffer") + } + gpIsBufferResidentNV = (C.GPISBUFFERRESIDENTNV)(getProcAddr("glIsBufferResidentNV")) + gpIsCommandListNV = (C.GPISCOMMANDLISTNV)(getProcAddr("glIsCommandListNV")) + gpIsEnabled = (C.GPISENABLED)(getProcAddr("glIsEnabled")) + if gpIsEnabled == nil { + return errors.New("glIsEnabled") + } + gpIsEnabledIndexedEXT = (C.GPISENABLEDINDEXEDEXT)(getProcAddr("glIsEnabledIndexedEXT")) + gpIsEnabledi = (C.GPISENABLEDI)(getProcAddr("glIsEnabledi")) + if gpIsEnabledi == nil { + return errors.New("glIsEnabledi") + } + gpIsFramebuffer = (C.GPISFRAMEBUFFER)(getProcAddr("glIsFramebuffer")) + if gpIsFramebuffer == nil { + return errors.New("glIsFramebuffer") + } + gpIsImageHandleResidentARB = (C.GPISIMAGEHANDLERESIDENTARB)(getProcAddr("glIsImageHandleResidentARB")) + gpIsImageHandleResidentNV = (C.GPISIMAGEHANDLERESIDENTNV)(getProcAddr("glIsImageHandleResidentNV")) + gpIsNamedBufferResidentNV = (C.GPISNAMEDBUFFERRESIDENTNV)(getProcAddr("glIsNamedBufferResidentNV")) + gpIsNamedStringARB = (C.GPISNAMEDSTRINGARB)(getProcAddr("glIsNamedStringARB")) + gpIsPathNV = (C.GPISPATHNV)(getProcAddr("glIsPathNV")) + gpIsPointInFillPathNV = (C.GPISPOINTINFILLPATHNV)(getProcAddr("glIsPointInFillPathNV")) + gpIsPointInStrokePathNV = (C.GPISPOINTINSTROKEPATHNV)(getProcAddr("glIsPointInStrokePathNV")) + gpIsProgram = (C.GPISPROGRAM)(getProcAddr("glIsProgram")) + if gpIsProgram == nil { + return errors.New("glIsProgram") + } + gpIsProgramPipeline = (C.GPISPROGRAMPIPELINE)(getProcAddr("glIsProgramPipeline")) + if gpIsProgramPipeline == nil { + return errors.New("glIsProgramPipeline") + } + gpIsProgramPipelineEXT = (C.GPISPROGRAMPIPELINEEXT)(getProcAddr("glIsProgramPipelineEXT")) + gpIsQuery = (C.GPISQUERY)(getProcAddr("glIsQuery")) + if gpIsQuery == nil { + return errors.New("glIsQuery") + } + gpIsRenderbuffer = (C.GPISRENDERBUFFER)(getProcAddr("glIsRenderbuffer")) + if gpIsRenderbuffer == nil { + return errors.New("glIsRenderbuffer") + } + gpIsSampler = (C.GPISSAMPLER)(getProcAddr("glIsSampler")) + if gpIsSampler == nil { + return errors.New("glIsSampler") + } + gpIsShader = (C.GPISSHADER)(getProcAddr("glIsShader")) + if gpIsShader == nil { + return errors.New("glIsShader") + } + gpIsStateNV = (C.GPISSTATENV)(getProcAddr("glIsStateNV")) + gpIsSync = (C.GPISSYNC)(getProcAddr("glIsSync")) + if gpIsSync == nil { + return errors.New("glIsSync") + } + gpIsTexture = (C.GPISTEXTURE)(getProcAddr("glIsTexture")) + if gpIsTexture == nil { + return errors.New("glIsTexture") + } + gpIsTextureHandleResidentARB = (C.GPISTEXTUREHANDLERESIDENTARB)(getProcAddr("glIsTextureHandleResidentARB")) + gpIsTextureHandleResidentNV = (C.GPISTEXTUREHANDLERESIDENTNV)(getProcAddr("glIsTextureHandleResidentNV")) + gpIsTransformFeedback = (C.GPISTRANSFORMFEEDBACK)(getProcAddr("glIsTransformFeedback")) + if gpIsTransformFeedback == nil { + return errors.New("glIsTransformFeedback") + } + gpIsVertexArray = (C.GPISVERTEXARRAY)(getProcAddr("glIsVertexArray")) + if gpIsVertexArray == nil { + return errors.New("glIsVertexArray") + } + gpLabelObjectEXT = (C.GPLABELOBJECTEXT)(getProcAddr("glLabelObjectEXT")) + gpLineWidth = (C.GPLINEWIDTH)(getProcAddr("glLineWidth")) + if gpLineWidth == nil { + return errors.New("glLineWidth") + } + gpLinkProgram = (C.GPLINKPROGRAM)(getProcAddr("glLinkProgram")) + if gpLinkProgram == nil { + return errors.New("glLinkProgram") + } + gpListDrawCommandsStatesClientNV = (C.GPLISTDRAWCOMMANDSSTATESCLIENTNV)(getProcAddr("glListDrawCommandsStatesClientNV")) + gpLogicOp = (C.GPLOGICOP)(getProcAddr("glLogicOp")) + if gpLogicOp == nil { + return errors.New("glLogicOp") + } + gpMakeBufferNonResidentNV = (C.GPMAKEBUFFERNONRESIDENTNV)(getProcAddr("glMakeBufferNonResidentNV")) + gpMakeBufferResidentNV = (C.GPMAKEBUFFERRESIDENTNV)(getProcAddr("glMakeBufferResidentNV")) + gpMakeImageHandleNonResidentARB = (C.GPMAKEIMAGEHANDLENONRESIDENTARB)(getProcAddr("glMakeImageHandleNonResidentARB")) + gpMakeImageHandleNonResidentNV = (C.GPMAKEIMAGEHANDLENONRESIDENTNV)(getProcAddr("glMakeImageHandleNonResidentNV")) + gpMakeImageHandleResidentARB = (C.GPMAKEIMAGEHANDLERESIDENTARB)(getProcAddr("glMakeImageHandleResidentARB")) + gpMakeImageHandleResidentNV = (C.GPMAKEIMAGEHANDLERESIDENTNV)(getProcAddr("glMakeImageHandleResidentNV")) + gpMakeNamedBufferNonResidentNV = (C.GPMAKENAMEDBUFFERNONRESIDENTNV)(getProcAddr("glMakeNamedBufferNonResidentNV")) + gpMakeNamedBufferResidentNV = (C.GPMAKENAMEDBUFFERRESIDENTNV)(getProcAddr("glMakeNamedBufferResidentNV")) + gpMakeTextureHandleNonResidentARB = (C.GPMAKETEXTUREHANDLENONRESIDENTARB)(getProcAddr("glMakeTextureHandleNonResidentARB")) + gpMakeTextureHandleNonResidentNV = (C.GPMAKETEXTUREHANDLENONRESIDENTNV)(getProcAddr("glMakeTextureHandleNonResidentNV")) + gpMakeTextureHandleResidentARB = (C.GPMAKETEXTUREHANDLERESIDENTARB)(getProcAddr("glMakeTextureHandleResidentARB")) + gpMakeTextureHandleResidentNV = (C.GPMAKETEXTUREHANDLERESIDENTNV)(getProcAddr("glMakeTextureHandleResidentNV")) + gpMapBuffer = (C.GPMAPBUFFER)(getProcAddr("glMapBuffer")) + if gpMapBuffer == nil { + return errors.New("glMapBuffer") + } + gpMapBufferRange = (C.GPMAPBUFFERRANGE)(getProcAddr("glMapBufferRange")) + if gpMapBufferRange == nil { + return errors.New("glMapBufferRange") + } + gpMapNamedBuffer = (C.GPMAPNAMEDBUFFER)(getProcAddr("glMapNamedBuffer")) + gpMapNamedBufferEXT = (C.GPMAPNAMEDBUFFEREXT)(getProcAddr("glMapNamedBufferEXT")) + gpMapNamedBufferRange = (C.GPMAPNAMEDBUFFERRANGE)(getProcAddr("glMapNamedBufferRange")) + gpMapNamedBufferRangeEXT = (C.GPMAPNAMEDBUFFERRANGEEXT)(getProcAddr("glMapNamedBufferRangeEXT")) + gpMatrixFrustumEXT = (C.GPMATRIXFRUSTUMEXT)(getProcAddr("glMatrixFrustumEXT")) + gpMatrixLoad3x2fNV = (C.GPMATRIXLOAD3X2FNV)(getProcAddr("glMatrixLoad3x2fNV")) + gpMatrixLoad3x3fNV = (C.GPMATRIXLOAD3X3FNV)(getProcAddr("glMatrixLoad3x3fNV")) + gpMatrixLoadIdentityEXT = (C.GPMATRIXLOADIDENTITYEXT)(getProcAddr("glMatrixLoadIdentityEXT")) + gpMatrixLoadTranspose3x3fNV = (C.GPMATRIXLOADTRANSPOSE3X3FNV)(getProcAddr("glMatrixLoadTranspose3x3fNV")) + gpMatrixLoadTransposedEXT = (C.GPMATRIXLOADTRANSPOSEDEXT)(getProcAddr("glMatrixLoadTransposedEXT")) + gpMatrixLoadTransposefEXT = (C.GPMATRIXLOADTRANSPOSEFEXT)(getProcAddr("glMatrixLoadTransposefEXT")) + gpMatrixLoaddEXT = (C.GPMATRIXLOADDEXT)(getProcAddr("glMatrixLoaddEXT")) + gpMatrixLoadfEXT = (C.GPMATRIXLOADFEXT)(getProcAddr("glMatrixLoadfEXT")) + gpMatrixMult3x2fNV = (C.GPMATRIXMULT3X2FNV)(getProcAddr("glMatrixMult3x2fNV")) + gpMatrixMult3x3fNV = (C.GPMATRIXMULT3X3FNV)(getProcAddr("glMatrixMult3x3fNV")) + gpMatrixMultTranspose3x3fNV = (C.GPMATRIXMULTTRANSPOSE3X3FNV)(getProcAddr("glMatrixMultTranspose3x3fNV")) + gpMatrixMultTransposedEXT = (C.GPMATRIXMULTTRANSPOSEDEXT)(getProcAddr("glMatrixMultTransposedEXT")) + gpMatrixMultTransposefEXT = (C.GPMATRIXMULTTRANSPOSEFEXT)(getProcAddr("glMatrixMultTransposefEXT")) + gpMatrixMultdEXT = (C.GPMATRIXMULTDEXT)(getProcAddr("glMatrixMultdEXT")) + gpMatrixMultfEXT = (C.GPMATRIXMULTFEXT)(getProcAddr("glMatrixMultfEXT")) + gpMatrixOrthoEXT = (C.GPMATRIXORTHOEXT)(getProcAddr("glMatrixOrthoEXT")) + gpMatrixPopEXT = (C.GPMATRIXPOPEXT)(getProcAddr("glMatrixPopEXT")) + gpMatrixPushEXT = (C.GPMATRIXPUSHEXT)(getProcAddr("glMatrixPushEXT")) + gpMatrixRotatedEXT = (C.GPMATRIXROTATEDEXT)(getProcAddr("glMatrixRotatedEXT")) + gpMatrixRotatefEXT = (C.GPMATRIXROTATEFEXT)(getProcAddr("glMatrixRotatefEXT")) + gpMatrixScaledEXT = (C.GPMATRIXSCALEDEXT)(getProcAddr("glMatrixScaledEXT")) + gpMatrixScalefEXT = (C.GPMATRIXSCALEFEXT)(getProcAddr("glMatrixScalefEXT")) + gpMatrixTranslatedEXT = (C.GPMATRIXTRANSLATEDEXT)(getProcAddr("glMatrixTranslatedEXT")) + gpMatrixTranslatefEXT = (C.GPMATRIXTRANSLATEFEXT)(getProcAddr("glMatrixTranslatefEXT")) + gpMaxShaderCompilerThreadsARB = (C.GPMAXSHADERCOMPILERTHREADSARB)(getProcAddr("glMaxShaderCompilerThreadsARB")) + gpMaxShaderCompilerThreadsKHR = (C.GPMAXSHADERCOMPILERTHREADSKHR)(getProcAddr("glMaxShaderCompilerThreadsKHR")) + gpMemoryBarrier = (C.GPMEMORYBARRIER)(getProcAddr("glMemoryBarrier")) + gpMemoryBarrierByRegion = (C.GPMEMORYBARRIERBYREGION)(getProcAddr("glMemoryBarrierByRegion")) + gpMinSampleShading = (C.GPMINSAMPLESHADING)(getProcAddr("glMinSampleShading")) + if gpMinSampleShading == nil { + return errors.New("glMinSampleShading") + } + gpMinSampleShadingARB = (C.GPMINSAMPLESHADINGARB)(getProcAddr("glMinSampleShadingARB")) + gpMultiDrawArrays = (C.GPMULTIDRAWARRAYS)(getProcAddr("glMultiDrawArrays")) + if gpMultiDrawArrays == nil { + return errors.New("glMultiDrawArrays") + } + gpMultiDrawArraysIndirect = (C.GPMULTIDRAWARRAYSINDIRECT)(getProcAddr("glMultiDrawArraysIndirect")) + gpMultiDrawArraysIndirectBindlessCountNV = (C.GPMULTIDRAWARRAYSINDIRECTBINDLESSCOUNTNV)(getProcAddr("glMultiDrawArraysIndirectBindlessCountNV")) + gpMultiDrawArraysIndirectBindlessNV = (C.GPMULTIDRAWARRAYSINDIRECTBINDLESSNV)(getProcAddr("glMultiDrawArraysIndirectBindlessNV")) + gpMultiDrawArraysIndirectCountARB = (C.GPMULTIDRAWARRAYSINDIRECTCOUNTARB)(getProcAddr("glMultiDrawArraysIndirectCountARB")) + gpMultiDrawElements = (C.GPMULTIDRAWELEMENTS)(getProcAddr("glMultiDrawElements")) + if gpMultiDrawElements == nil { + return errors.New("glMultiDrawElements") + } + gpMultiDrawElementsBaseVertex = (C.GPMULTIDRAWELEMENTSBASEVERTEX)(getProcAddr("glMultiDrawElementsBaseVertex")) + if gpMultiDrawElementsBaseVertex == nil { + return errors.New("glMultiDrawElementsBaseVertex") + } + gpMultiDrawElementsIndirect = (C.GPMULTIDRAWELEMENTSINDIRECT)(getProcAddr("glMultiDrawElementsIndirect")) + gpMultiDrawElementsIndirectBindlessCountNV = (C.GPMULTIDRAWELEMENTSINDIRECTBINDLESSCOUNTNV)(getProcAddr("glMultiDrawElementsIndirectBindlessCountNV")) + gpMultiDrawElementsIndirectBindlessNV = (C.GPMULTIDRAWELEMENTSINDIRECTBINDLESSNV)(getProcAddr("glMultiDrawElementsIndirectBindlessNV")) + gpMultiDrawElementsIndirectCountARB = (C.GPMULTIDRAWELEMENTSINDIRECTCOUNTARB)(getProcAddr("glMultiDrawElementsIndirectCountARB")) + gpMultiTexBufferEXT = (C.GPMULTITEXBUFFEREXT)(getProcAddr("glMultiTexBufferEXT")) + gpMultiTexCoordPointerEXT = (C.GPMULTITEXCOORDPOINTEREXT)(getProcAddr("glMultiTexCoordPointerEXT")) + gpMultiTexEnvfEXT = (C.GPMULTITEXENVFEXT)(getProcAddr("glMultiTexEnvfEXT")) + gpMultiTexEnvfvEXT = (C.GPMULTITEXENVFVEXT)(getProcAddr("glMultiTexEnvfvEXT")) + gpMultiTexEnviEXT = (C.GPMULTITEXENVIEXT)(getProcAddr("glMultiTexEnviEXT")) + gpMultiTexEnvivEXT = (C.GPMULTITEXENVIVEXT)(getProcAddr("glMultiTexEnvivEXT")) + gpMultiTexGendEXT = (C.GPMULTITEXGENDEXT)(getProcAddr("glMultiTexGendEXT")) + gpMultiTexGendvEXT = (C.GPMULTITEXGENDVEXT)(getProcAddr("glMultiTexGendvEXT")) + gpMultiTexGenfEXT = (C.GPMULTITEXGENFEXT)(getProcAddr("glMultiTexGenfEXT")) + gpMultiTexGenfvEXT = (C.GPMULTITEXGENFVEXT)(getProcAddr("glMultiTexGenfvEXT")) + gpMultiTexGeniEXT = (C.GPMULTITEXGENIEXT)(getProcAddr("glMultiTexGeniEXT")) + gpMultiTexGenivEXT = (C.GPMULTITEXGENIVEXT)(getProcAddr("glMultiTexGenivEXT")) + gpMultiTexImage1DEXT = (C.GPMULTITEXIMAGE1DEXT)(getProcAddr("glMultiTexImage1DEXT")) + gpMultiTexImage2DEXT = (C.GPMULTITEXIMAGE2DEXT)(getProcAddr("glMultiTexImage2DEXT")) + gpMultiTexImage3DEXT = (C.GPMULTITEXIMAGE3DEXT)(getProcAddr("glMultiTexImage3DEXT")) + gpMultiTexParameterIivEXT = (C.GPMULTITEXPARAMETERIIVEXT)(getProcAddr("glMultiTexParameterIivEXT")) + gpMultiTexParameterIuivEXT = (C.GPMULTITEXPARAMETERIUIVEXT)(getProcAddr("glMultiTexParameterIuivEXT")) + gpMultiTexParameterfEXT = (C.GPMULTITEXPARAMETERFEXT)(getProcAddr("glMultiTexParameterfEXT")) + gpMultiTexParameterfvEXT = (C.GPMULTITEXPARAMETERFVEXT)(getProcAddr("glMultiTexParameterfvEXT")) + gpMultiTexParameteriEXT = (C.GPMULTITEXPARAMETERIEXT)(getProcAddr("glMultiTexParameteriEXT")) + gpMultiTexParameterivEXT = (C.GPMULTITEXPARAMETERIVEXT)(getProcAddr("glMultiTexParameterivEXT")) + gpMultiTexRenderbufferEXT = (C.GPMULTITEXRENDERBUFFEREXT)(getProcAddr("glMultiTexRenderbufferEXT")) + gpMultiTexSubImage1DEXT = (C.GPMULTITEXSUBIMAGE1DEXT)(getProcAddr("glMultiTexSubImage1DEXT")) + gpMultiTexSubImage2DEXT = (C.GPMULTITEXSUBIMAGE2DEXT)(getProcAddr("glMultiTexSubImage2DEXT")) + gpMultiTexSubImage3DEXT = (C.GPMULTITEXSUBIMAGE3DEXT)(getProcAddr("glMultiTexSubImage3DEXT")) + gpNamedBufferData = (C.GPNAMEDBUFFERDATA)(getProcAddr("glNamedBufferData")) + gpNamedBufferDataEXT = (C.GPNAMEDBUFFERDATAEXT)(getProcAddr("glNamedBufferDataEXT")) + gpNamedBufferPageCommitmentARB = (C.GPNAMEDBUFFERPAGECOMMITMENTARB)(getProcAddr("glNamedBufferPageCommitmentARB")) + gpNamedBufferPageCommitmentEXT = (C.GPNAMEDBUFFERPAGECOMMITMENTEXT)(getProcAddr("glNamedBufferPageCommitmentEXT")) + gpNamedBufferStorage = (C.GPNAMEDBUFFERSTORAGE)(getProcAddr("glNamedBufferStorage")) + gpNamedBufferStorageEXT = (C.GPNAMEDBUFFERSTORAGEEXT)(getProcAddr("glNamedBufferStorageEXT")) + gpNamedBufferSubData = (C.GPNAMEDBUFFERSUBDATA)(getProcAddr("glNamedBufferSubData")) + gpNamedBufferSubDataEXT = (C.GPNAMEDBUFFERSUBDATAEXT)(getProcAddr("glNamedBufferSubDataEXT")) + gpNamedCopyBufferSubDataEXT = (C.GPNAMEDCOPYBUFFERSUBDATAEXT)(getProcAddr("glNamedCopyBufferSubDataEXT")) + gpNamedFramebufferDrawBuffer = (C.GPNAMEDFRAMEBUFFERDRAWBUFFER)(getProcAddr("glNamedFramebufferDrawBuffer")) + gpNamedFramebufferDrawBuffers = (C.GPNAMEDFRAMEBUFFERDRAWBUFFERS)(getProcAddr("glNamedFramebufferDrawBuffers")) + gpNamedFramebufferParameteri = (C.GPNAMEDFRAMEBUFFERPARAMETERI)(getProcAddr("glNamedFramebufferParameteri")) + gpNamedFramebufferParameteriEXT = (C.GPNAMEDFRAMEBUFFERPARAMETERIEXT)(getProcAddr("glNamedFramebufferParameteriEXT")) + gpNamedFramebufferReadBuffer = (C.GPNAMEDFRAMEBUFFERREADBUFFER)(getProcAddr("glNamedFramebufferReadBuffer")) + gpNamedFramebufferRenderbuffer = (C.GPNAMEDFRAMEBUFFERRENDERBUFFER)(getProcAddr("glNamedFramebufferRenderbuffer")) + gpNamedFramebufferRenderbufferEXT = (C.GPNAMEDFRAMEBUFFERRENDERBUFFEREXT)(getProcAddr("glNamedFramebufferRenderbufferEXT")) + gpNamedFramebufferSampleLocationsfvARB = (C.GPNAMEDFRAMEBUFFERSAMPLELOCATIONSFVARB)(getProcAddr("glNamedFramebufferSampleLocationsfvARB")) + gpNamedFramebufferSampleLocationsfvNV = (C.GPNAMEDFRAMEBUFFERSAMPLELOCATIONSFVNV)(getProcAddr("glNamedFramebufferSampleLocationsfvNV")) + gpNamedFramebufferTexture = (C.GPNAMEDFRAMEBUFFERTEXTURE)(getProcAddr("glNamedFramebufferTexture")) + gpNamedFramebufferTexture1DEXT = (C.GPNAMEDFRAMEBUFFERTEXTURE1DEXT)(getProcAddr("glNamedFramebufferTexture1DEXT")) + gpNamedFramebufferTexture2DEXT = (C.GPNAMEDFRAMEBUFFERTEXTURE2DEXT)(getProcAddr("glNamedFramebufferTexture2DEXT")) + gpNamedFramebufferTexture3DEXT = (C.GPNAMEDFRAMEBUFFERTEXTURE3DEXT)(getProcAddr("glNamedFramebufferTexture3DEXT")) + gpNamedFramebufferTextureEXT = (C.GPNAMEDFRAMEBUFFERTEXTUREEXT)(getProcAddr("glNamedFramebufferTextureEXT")) + gpNamedFramebufferTextureFaceEXT = (C.GPNAMEDFRAMEBUFFERTEXTUREFACEEXT)(getProcAddr("glNamedFramebufferTextureFaceEXT")) + gpNamedFramebufferTextureLayer = (C.GPNAMEDFRAMEBUFFERTEXTURELAYER)(getProcAddr("glNamedFramebufferTextureLayer")) + gpNamedFramebufferTextureLayerEXT = (C.GPNAMEDFRAMEBUFFERTEXTURELAYEREXT)(getProcAddr("glNamedFramebufferTextureLayerEXT")) + gpNamedProgramLocalParameter4dEXT = (C.GPNAMEDPROGRAMLOCALPARAMETER4DEXT)(getProcAddr("glNamedProgramLocalParameter4dEXT")) + gpNamedProgramLocalParameter4dvEXT = (C.GPNAMEDPROGRAMLOCALPARAMETER4DVEXT)(getProcAddr("glNamedProgramLocalParameter4dvEXT")) + gpNamedProgramLocalParameter4fEXT = (C.GPNAMEDPROGRAMLOCALPARAMETER4FEXT)(getProcAddr("glNamedProgramLocalParameter4fEXT")) + gpNamedProgramLocalParameter4fvEXT = (C.GPNAMEDPROGRAMLOCALPARAMETER4FVEXT)(getProcAddr("glNamedProgramLocalParameter4fvEXT")) + gpNamedProgramLocalParameterI4iEXT = (C.GPNAMEDPROGRAMLOCALPARAMETERI4IEXT)(getProcAddr("glNamedProgramLocalParameterI4iEXT")) + gpNamedProgramLocalParameterI4ivEXT = (C.GPNAMEDPROGRAMLOCALPARAMETERI4IVEXT)(getProcAddr("glNamedProgramLocalParameterI4ivEXT")) + gpNamedProgramLocalParameterI4uiEXT = (C.GPNAMEDPROGRAMLOCALPARAMETERI4UIEXT)(getProcAddr("glNamedProgramLocalParameterI4uiEXT")) + gpNamedProgramLocalParameterI4uivEXT = (C.GPNAMEDPROGRAMLOCALPARAMETERI4UIVEXT)(getProcAddr("glNamedProgramLocalParameterI4uivEXT")) + gpNamedProgramLocalParameters4fvEXT = (C.GPNAMEDPROGRAMLOCALPARAMETERS4FVEXT)(getProcAddr("glNamedProgramLocalParameters4fvEXT")) + gpNamedProgramLocalParametersI4ivEXT = (C.GPNAMEDPROGRAMLOCALPARAMETERSI4IVEXT)(getProcAddr("glNamedProgramLocalParametersI4ivEXT")) + gpNamedProgramLocalParametersI4uivEXT = (C.GPNAMEDPROGRAMLOCALPARAMETERSI4UIVEXT)(getProcAddr("glNamedProgramLocalParametersI4uivEXT")) + gpNamedProgramStringEXT = (C.GPNAMEDPROGRAMSTRINGEXT)(getProcAddr("glNamedProgramStringEXT")) + gpNamedRenderbufferStorage = (C.GPNAMEDRENDERBUFFERSTORAGE)(getProcAddr("glNamedRenderbufferStorage")) + gpNamedRenderbufferStorageEXT = (C.GPNAMEDRENDERBUFFERSTORAGEEXT)(getProcAddr("glNamedRenderbufferStorageEXT")) + gpNamedRenderbufferStorageMultisample = (C.GPNAMEDRENDERBUFFERSTORAGEMULTISAMPLE)(getProcAddr("glNamedRenderbufferStorageMultisample")) + gpNamedRenderbufferStorageMultisampleCoverageEXT = (C.GPNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXT)(getProcAddr("glNamedRenderbufferStorageMultisampleCoverageEXT")) + gpNamedRenderbufferStorageMultisampleEXT = (C.GPNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXT)(getProcAddr("glNamedRenderbufferStorageMultisampleEXT")) + gpNamedStringARB = (C.GPNAMEDSTRINGARB)(getProcAddr("glNamedStringARB")) + gpNormalFormatNV = (C.GPNORMALFORMATNV)(getProcAddr("glNormalFormatNV")) + gpObjectLabel = (C.GPOBJECTLABEL)(getProcAddr("glObjectLabel")) + gpObjectLabelKHR = (C.GPOBJECTLABELKHR)(getProcAddr("glObjectLabelKHR")) + gpObjectPtrLabel = (C.GPOBJECTPTRLABEL)(getProcAddr("glObjectPtrLabel")) + gpObjectPtrLabelKHR = (C.GPOBJECTPTRLABELKHR)(getProcAddr("glObjectPtrLabelKHR")) + gpPatchParameterfv = (C.GPPATCHPARAMETERFV)(getProcAddr("glPatchParameterfv")) + if gpPatchParameterfv == nil { + return errors.New("glPatchParameterfv") + } + gpPatchParameteri = (C.GPPATCHPARAMETERI)(getProcAddr("glPatchParameteri")) + if gpPatchParameteri == nil { + return errors.New("glPatchParameteri") + } + gpPathCommandsNV = (C.GPPATHCOMMANDSNV)(getProcAddr("glPathCommandsNV")) + gpPathCoordsNV = (C.GPPATHCOORDSNV)(getProcAddr("glPathCoordsNV")) + gpPathCoverDepthFuncNV = (C.GPPATHCOVERDEPTHFUNCNV)(getProcAddr("glPathCoverDepthFuncNV")) + gpPathDashArrayNV = (C.GPPATHDASHARRAYNV)(getProcAddr("glPathDashArrayNV")) + gpPathGlyphIndexArrayNV = (C.GPPATHGLYPHINDEXARRAYNV)(getProcAddr("glPathGlyphIndexArrayNV")) + gpPathGlyphIndexRangeNV = (C.GPPATHGLYPHINDEXRANGENV)(getProcAddr("glPathGlyphIndexRangeNV")) + gpPathGlyphRangeNV = (C.GPPATHGLYPHRANGENV)(getProcAddr("glPathGlyphRangeNV")) + gpPathGlyphsNV = (C.GPPATHGLYPHSNV)(getProcAddr("glPathGlyphsNV")) + gpPathMemoryGlyphIndexArrayNV = (C.GPPATHMEMORYGLYPHINDEXARRAYNV)(getProcAddr("glPathMemoryGlyphIndexArrayNV")) + gpPathParameterfNV = (C.GPPATHPARAMETERFNV)(getProcAddr("glPathParameterfNV")) + gpPathParameterfvNV = (C.GPPATHPARAMETERFVNV)(getProcAddr("glPathParameterfvNV")) + gpPathParameteriNV = (C.GPPATHPARAMETERINV)(getProcAddr("glPathParameteriNV")) + gpPathParameterivNV = (C.GPPATHPARAMETERIVNV)(getProcAddr("glPathParameterivNV")) + gpPathStencilDepthOffsetNV = (C.GPPATHSTENCILDEPTHOFFSETNV)(getProcAddr("glPathStencilDepthOffsetNV")) + gpPathStencilFuncNV = (C.GPPATHSTENCILFUNCNV)(getProcAddr("glPathStencilFuncNV")) + gpPathStringNV = (C.GPPATHSTRINGNV)(getProcAddr("glPathStringNV")) + gpPathSubCommandsNV = (C.GPPATHSUBCOMMANDSNV)(getProcAddr("glPathSubCommandsNV")) + gpPathSubCoordsNV = (C.GPPATHSUBCOORDSNV)(getProcAddr("glPathSubCoordsNV")) + gpPauseTransformFeedback = (C.GPPAUSETRANSFORMFEEDBACK)(getProcAddr("glPauseTransformFeedback")) + if gpPauseTransformFeedback == nil { + return errors.New("glPauseTransformFeedback") + } + gpPixelStoref = (C.GPPIXELSTOREF)(getProcAddr("glPixelStoref")) + if gpPixelStoref == nil { + return errors.New("glPixelStoref") + } + gpPixelStorei = (C.GPPIXELSTOREI)(getProcAddr("glPixelStorei")) + if gpPixelStorei == nil { + return errors.New("glPixelStorei") + } + gpPointAlongPathNV = (C.GPPOINTALONGPATHNV)(getProcAddr("glPointAlongPathNV")) + gpPointParameterf = (C.GPPOINTPARAMETERF)(getProcAddr("glPointParameterf")) + if gpPointParameterf == nil { + return errors.New("glPointParameterf") + } + gpPointParameterfv = (C.GPPOINTPARAMETERFV)(getProcAddr("glPointParameterfv")) + if gpPointParameterfv == nil { + return errors.New("glPointParameterfv") + } + gpPointParameteri = (C.GPPOINTPARAMETERI)(getProcAddr("glPointParameteri")) + if gpPointParameteri == nil { + return errors.New("glPointParameteri") + } + gpPointParameteriv = (C.GPPOINTPARAMETERIV)(getProcAddr("glPointParameteriv")) + if gpPointParameteriv == nil { + return errors.New("glPointParameteriv") + } + gpPointSize = (C.GPPOINTSIZE)(getProcAddr("glPointSize")) + if gpPointSize == nil { + return errors.New("glPointSize") + } + gpPolygonMode = (C.GPPOLYGONMODE)(getProcAddr("glPolygonMode")) + if gpPolygonMode == nil { + return errors.New("glPolygonMode") + } + gpPolygonOffset = (C.GPPOLYGONOFFSET)(getProcAddr("glPolygonOffset")) + if gpPolygonOffset == nil { + return errors.New("glPolygonOffset") + } + gpPolygonOffsetClamp = (C.GPPOLYGONOFFSETCLAMP)(getProcAddr("glPolygonOffsetClamp")) + gpPolygonOffsetClampEXT = (C.GPPOLYGONOFFSETCLAMPEXT)(getProcAddr("glPolygonOffsetClampEXT")) + gpPopDebugGroup = (C.GPPOPDEBUGGROUP)(getProcAddr("glPopDebugGroup")) + gpPopDebugGroupKHR = (C.GPPOPDEBUGGROUPKHR)(getProcAddr("glPopDebugGroupKHR")) + gpPopGroupMarkerEXT = (C.GPPOPGROUPMARKEREXT)(getProcAddr("glPopGroupMarkerEXT")) + gpPrimitiveBoundingBoxARB = (C.GPPRIMITIVEBOUNDINGBOXARB)(getProcAddr("glPrimitiveBoundingBoxARB")) + gpPrimitiveRestartIndex = (C.GPPRIMITIVERESTARTINDEX)(getProcAddr("glPrimitiveRestartIndex")) + if gpPrimitiveRestartIndex == nil { + return errors.New("glPrimitiveRestartIndex") + } + gpProgramBinary = (C.GPPROGRAMBINARY)(getProcAddr("glProgramBinary")) + if gpProgramBinary == nil { + return errors.New("glProgramBinary") + } + gpProgramParameteri = (C.GPPROGRAMPARAMETERI)(getProcAddr("glProgramParameteri")) + if gpProgramParameteri == nil { + return errors.New("glProgramParameteri") + } + gpProgramParameteriARB = (C.GPPROGRAMPARAMETERIARB)(getProcAddr("glProgramParameteriARB")) + gpProgramParameteriEXT = (C.GPPROGRAMPARAMETERIEXT)(getProcAddr("glProgramParameteriEXT")) + gpProgramPathFragmentInputGenNV = (C.GPPROGRAMPATHFRAGMENTINPUTGENNV)(getProcAddr("glProgramPathFragmentInputGenNV")) + gpProgramUniform1d = (C.GPPROGRAMUNIFORM1D)(getProcAddr("glProgramUniform1d")) + if gpProgramUniform1d == nil { + return errors.New("glProgramUniform1d") + } + gpProgramUniform1dEXT = (C.GPPROGRAMUNIFORM1DEXT)(getProcAddr("glProgramUniform1dEXT")) + gpProgramUniform1dv = (C.GPPROGRAMUNIFORM1DV)(getProcAddr("glProgramUniform1dv")) + if gpProgramUniform1dv == nil { + return errors.New("glProgramUniform1dv") + } + gpProgramUniform1dvEXT = (C.GPPROGRAMUNIFORM1DVEXT)(getProcAddr("glProgramUniform1dvEXT")) + gpProgramUniform1f = (C.GPPROGRAMUNIFORM1F)(getProcAddr("glProgramUniform1f")) + if gpProgramUniform1f == nil { + return errors.New("glProgramUniform1f") + } + gpProgramUniform1fEXT = (C.GPPROGRAMUNIFORM1FEXT)(getProcAddr("glProgramUniform1fEXT")) + gpProgramUniform1fv = (C.GPPROGRAMUNIFORM1FV)(getProcAddr("glProgramUniform1fv")) + if gpProgramUniform1fv == nil { + return errors.New("glProgramUniform1fv") + } + gpProgramUniform1fvEXT = (C.GPPROGRAMUNIFORM1FVEXT)(getProcAddr("glProgramUniform1fvEXT")) + gpProgramUniform1i = (C.GPPROGRAMUNIFORM1I)(getProcAddr("glProgramUniform1i")) + if gpProgramUniform1i == nil { + return errors.New("glProgramUniform1i") + } + gpProgramUniform1i64ARB = (C.GPPROGRAMUNIFORM1I64ARB)(getProcAddr("glProgramUniform1i64ARB")) + gpProgramUniform1i64NV = (C.GPPROGRAMUNIFORM1I64NV)(getProcAddr("glProgramUniform1i64NV")) + gpProgramUniform1i64vARB = (C.GPPROGRAMUNIFORM1I64VARB)(getProcAddr("glProgramUniform1i64vARB")) + gpProgramUniform1i64vNV = (C.GPPROGRAMUNIFORM1I64VNV)(getProcAddr("glProgramUniform1i64vNV")) + gpProgramUniform1iEXT = (C.GPPROGRAMUNIFORM1IEXT)(getProcAddr("glProgramUniform1iEXT")) + gpProgramUniform1iv = (C.GPPROGRAMUNIFORM1IV)(getProcAddr("glProgramUniform1iv")) + if gpProgramUniform1iv == nil { + return errors.New("glProgramUniform1iv") + } + gpProgramUniform1ivEXT = (C.GPPROGRAMUNIFORM1IVEXT)(getProcAddr("glProgramUniform1ivEXT")) + gpProgramUniform1ui = (C.GPPROGRAMUNIFORM1UI)(getProcAddr("glProgramUniform1ui")) + if gpProgramUniform1ui == nil { + return errors.New("glProgramUniform1ui") + } + gpProgramUniform1ui64ARB = (C.GPPROGRAMUNIFORM1UI64ARB)(getProcAddr("glProgramUniform1ui64ARB")) + gpProgramUniform1ui64NV = (C.GPPROGRAMUNIFORM1UI64NV)(getProcAddr("glProgramUniform1ui64NV")) + gpProgramUniform1ui64vARB = (C.GPPROGRAMUNIFORM1UI64VARB)(getProcAddr("glProgramUniform1ui64vARB")) + gpProgramUniform1ui64vNV = (C.GPPROGRAMUNIFORM1UI64VNV)(getProcAddr("glProgramUniform1ui64vNV")) + gpProgramUniform1uiEXT = (C.GPPROGRAMUNIFORM1UIEXT)(getProcAddr("glProgramUniform1uiEXT")) + gpProgramUniform1uiv = (C.GPPROGRAMUNIFORM1UIV)(getProcAddr("glProgramUniform1uiv")) + if gpProgramUniform1uiv == nil { + return errors.New("glProgramUniform1uiv") + } + gpProgramUniform1uivEXT = (C.GPPROGRAMUNIFORM1UIVEXT)(getProcAddr("glProgramUniform1uivEXT")) + gpProgramUniform2d = (C.GPPROGRAMUNIFORM2D)(getProcAddr("glProgramUniform2d")) + if gpProgramUniform2d == nil { + return errors.New("glProgramUniform2d") + } + gpProgramUniform2dEXT = (C.GPPROGRAMUNIFORM2DEXT)(getProcAddr("glProgramUniform2dEXT")) + gpProgramUniform2dv = (C.GPPROGRAMUNIFORM2DV)(getProcAddr("glProgramUniform2dv")) + if gpProgramUniform2dv == nil { + return errors.New("glProgramUniform2dv") + } + gpProgramUniform2dvEXT = (C.GPPROGRAMUNIFORM2DVEXT)(getProcAddr("glProgramUniform2dvEXT")) + gpProgramUniform2f = (C.GPPROGRAMUNIFORM2F)(getProcAddr("glProgramUniform2f")) + if gpProgramUniform2f == nil { + return errors.New("glProgramUniform2f") + } + gpProgramUniform2fEXT = (C.GPPROGRAMUNIFORM2FEXT)(getProcAddr("glProgramUniform2fEXT")) + gpProgramUniform2fv = (C.GPPROGRAMUNIFORM2FV)(getProcAddr("glProgramUniform2fv")) + if gpProgramUniform2fv == nil { + return errors.New("glProgramUniform2fv") + } + gpProgramUniform2fvEXT = (C.GPPROGRAMUNIFORM2FVEXT)(getProcAddr("glProgramUniform2fvEXT")) + gpProgramUniform2i = (C.GPPROGRAMUNIFORM2I)(getProcAddr("glProgramUniform2i")) + if gpProgramUniform2i == nil { + return errors.New("glProgramUniform2i") + } + gpProgramUniform2i64ARB = (C.GPPROGRAMUNIFORM2I64ARB)(getProcAddr("glProgramUniform2i64ARB")) + gpProgramUniform2i64NV = (C.GPPROGRAMUNIFORM2I64NV)(getProcAddr("glProgramUniform2i64NV")) + gpProgramUniform2i64vARB = (C.GPPROGRAMUNIFORM2I64VARB)(getProcAddr("glProgramUniform2i64vARB")) + gpProgramUniform2i64vNV = (C.GPPROGRAMUNIFORM2I64VNV)(getProcAddr("glProgramUniform2i64vNV")) + gpProgramUniform2iEXT = (C.GPPROGRAMUNIFORM2IEXT)(getProcAddr("glProgramUniform2iEXT")) + gpProgramUniform2iv = (C.GPPROGRAMUNIFORM2IV)(getProcAddr("glProgramUniform2iv")) + if gpProgramUniform2iv == nil { + return errors.New("glProgramUniform2iv") + } + gpProgramUniform2ivEXT = (C.GPPROGRAMUNIFORM2IVEXT)(getProcAddr("glProgramUniform2ivEXT")) + gpProgramUniform2ui = (C.GPPROGRAMUNIFORM2UI)(getProcAddr("glProgramUniform2ui")) + if gpProgramUniform2ui == nil { + return errors.New("glProgramUniform2ui") + } + gpProgramUniform2ui64ARB = (C.GPPROGRAMUNIFORM2UI64ARB)(getProcAddr("glProgramUniform2ui64ARB")) + gpProgramUniform2ui64NV = (C.GPPROGRAMUNIFORM2UI64NV)(getProcAddr("glProgramUniform2ui64NV")) + gpProgramUniform2ui64vARB = (C.GPPROGRAMUNIFORM2UI64VARB)(getProcAddr("glProgramUniform2ui64vARB")) + gpProgramUniform2ui64vNV = (C.GPPROGRAMUNIFORM2UI64VNV)(getProcAddr("glProgramUniform2ui64vNV")) + gpProgramUniform2uiEXT = (C.GPPROGRAMUNIFORM2UIEXT)(getProcAddr("glProgramUniform2uiEXT")) + gpProgramUniform2uiv = (C.GPPROGRAMUNIFORM2UIV)(getProcAddr("glProgramUniform2uiv")) + if gpProgramUniform2uiv == nil { + return errors.New("glProgramUniform2uiv") + } + gpProgramUniform2uivEXT = (C.GPPROGRAMUNIFORM2UIVEXT)(getProcAddr("glProgramUniform2uivEXT")) + gpProgramUniform3d = (C.GPPROGRAMUNIFORM3D)(getProcAddr("glProgramUniform3d")) + if gpProgramUniform3d == nil { + return errors.New("glProgramUniform3d") + } + gpProgramUniform3dEXT = (C.GPPROGRAMUNIFORM3DEXT)(getProcAddr("glProgramUniform3dEXT")) + gpProgramUniform3dv = (C.GPPROGRAMUNIFORM3DV)(getProcAddr("glProgramUniform3dv")) + if gpProgramUniform3dv == nil { + return errors.New("glProgramUniform3dv") + } + gpProgramUniform3dvEXT = (C.GPPROGRAMUNIFORM3DVEXT)(getProcAddr("glProgramUniform3dvEXT")) + gpProgramUniform3f = (C.GPPROGRAMUNIFORM3F)(getProcAddr("glProgramUniform3f")) + if gpProgramUniform3f == nil { + return errors.New("glProgramUniform3f") + } + gpProgramUniform3fEXT = (C.GPPROGRAMUNIFORM3FEXT)(getProcAddr("glProgramUniform3fEXT")) + gpProgramUniform3fv = (C.GPPROGRAMUNIFORM3FV)(getProcAddr("glProgramUniform3fv")) + if gpProgramUniform3fv == nil { + return errors.New("glProgramUniform3fv") + } + gpProgramUniform3fvEXT = (C.GPPROGRAMUNIFORM3FVEXT)(getProcAddr("glProgramUniform3fvEXT")) + gpProgramUniform3i = (C.GPPROGRAMUNIFORM3I)(getProcAddr("glProgramUniform3i")) + if gpProgramUniform3i == nil { + return errors.New("glProgramUniform3i") + } + gpProgramUniform3i64ARB = (C.GPPROGRAMUNIFORM3I64ARB)(getProcAddr("glProgramUniform3i64ARB")) + gpProgramUniform3i64NV = (C.GPPROGRAMUNIFORM3I64NV)(getProcAddr("glProgramUniform3i64NV")) + gpProgramUniform3i64vARB = (C.GPPROGRAMUNIFORM3I64VARB)(getProcAddr("glProgramUniform3i64vARB")) + gpProgramUniform3i64vNV = (C.GPPROGRAMUNIFORM3I64VNV)(getProcAddr("glProgramUniform3i64vNV")) + gpProgramUniform3iEXT = (C.GPPROGRAMUNIFORM3IEXT)(getProcAddr("glProgramUniform3iEXT")) + gpProgramUniform3iv = (C.GPPROGRAMUNIFORM3IV)(getProcAddr("glProgramUniform3iv")) + if gpProgramUniform3iv == nil { + return errors.New("glProgramUniform3iv") + } + gpProgramUniform3ivEXT = (C.GPPROGRAMUNIFORM3IVEXT)(getProcAddr("glProgramUniform3ivEXT")) + gpProgramUniform3ui = (C.GPPROGRAMUNIFORM3UI)(getProcAddr("glProgramUniform3ui")) + if gpProgramUniform3ui == nil { + return errors.New("glProgramUniform3ui") + } + gpProgramUniform3ui64ARB = (C.GPPROGRAMUNIFORM3UI64ARB)(getProcAddr("glProgramUniform3ui64ARB")) + gpProgramUniform3ui64NV = (C.GPPROGRAMUNIFORM3UI64NV)(getProcAddr("glProgramUniform3ui64NV")) + gpProgramUniform3ui64vARB = (C.GPPROGRAMUNIFORM3UI64VARB)(getProcAddr("glProgramUniform3ui64vARB")) + gpProgramUniform3ui64vNV = (C.GPPROGRAMUNIFORM3UI64VNV)(getProcAddr("glProgramUniform3ui64vNV")) + gpProgramUniform3uiEXT = (C.GPPROGRAMUNIFORM3UIEXT)(getProcAddr("glProgramUniform3uiEXT")) + gpProgramUniform3uiv = (C.GPPROGRAMUNIFORM3UIV)(getProcAddr("glProgramUniform3uiv")) + if gpProgramUniform3uiv == nil { + return errors.New("glProgramUniform3uiv") + } + gpProgramUniform3uivEXT = (C.GPPROGRAMUNIFORM3UIVEXT)(getProcAddr("glProgramUniform3uivEXT")) + gpProgramUniform4d = (C.GPPROGRAMUNIFORM4D)(getProcAddr("glProgramUniform4d")) + if gpProgramUniform4d == nil { + return errors.New("glProgramUniform4d") + } + gpProgramUniform4dEXT = (C.GPPROGRAMUNIFORM4DEXT)(getProcAddr("glProgramUniform4dEXT")) + gpProgramUniform4dv = (C.GPPROGRAMUNIFORM4DV)(getProcAddr("glProgramUniform4dv")) + if gpProgramUniform4dv == nil { + return errors.New("glProgramUniform4dv") + } + gpProgramUniform4dvEXT = (C.GPPROGRAMUNIFORM4DVEXT)(getProcAddr("glProgramUniform4dvEXT")) + gpProgramUniform4f = (C.GPPROGRAMUNIFORM4F)(getProcAddr("glProgramUniform4f")) + if gpProgramUniform4f == nil { + return errors.New("glProgramUniform4f") + } + gpProgramUniform4fEXT = (C.GPPROGRAMUNIFORM4FEXT)(getProcAddr("glProgramUniform4fEXT")) + gpProgramUniform4fv = (C.GPPROGRAMUNIFORM4FV)(getProcAddr("glProgramUniform4fv")) + if gpProgramUniform4fv == nil { + return errors.New("glProgramUniform4fv") + } + gpProgramUniform4fvEXT = (C.GPPROGRAMUNIFORM4FVEXT)(getProcAddr("glProgramUniform4fvEXT")) + gpProgramUniform4i = (C.GPPROGRAMUNIFORM4I)(getProcAddr("glProgramUniform4i")) + if gpProgramUniform4i == nil { + return errors.New("glProgramUniform4i") + } + gpProgramUniform4i64ARB = (C.GPPROGRAMUNIFORM4I64ARB)(getProcAddr("glProgramUniform4i64ARB")) + gpProgramUniform4i64NV = (C.GPPROGRAMUNIFORM4I64NV)(getProcAddr("glProgramUniform4i64NV")) + gpProgramUniform4i64vARB = (C.GPPROGRAMUNIFORM4I64VARB)(getProcAddr("glProgramUniform4i64vARB")) + gpProgramUniform4i64vNV = (C.GPPROGRAMUNIFORM4I64VNV)(getProcAddr("glProgramUniform4i64vNV")) + gpProgramUniform4iEXT = (C.GPPROGRAMUNIFORM4IEXT)(getProcAddr("glProgramUniform4iEXT")) + gpProgramUniform4iv = (C.GPPROGRAMUNIFORM4IV)(getProcAddr("glProgramUniform4iv")) + if gpProgramUniform4iv == nil { + return errors.New("glProgramUniform4iv") + } + gpProgramUniform4ivEXT = (C.GPPROGRAMUNIFORM4IVEXT)(getProcAddr("glProgramUniform4ivEXT")) + gpProgramUniform4ui = (C.GPPROGRAMUNIFORM4UI)(getProcAddr("glProgramUniform4ui")) + if gpProgramUniform4ui == nil { + return errors.New("glProgramUniform4ui") + } + gpProgramUniform4ui64ARB = (C.GPPROGRAMUNIFORM4UI64ARB)(getProcAddr("glProgramUniform4ui64ARB")) + gpProgramUniform4ui64NV = (C.GPPROGRAMUNIFORM4UI64NV)(getProcAddr("glProgramUniform4ui64NV")) + gpProgramUniform4ui64vARB = (C.GPPROGRAMUNIFORM4UI64VARB)(getProcAddr("glProgramUniform4ui64vARB")) + gpProgramUniform4ui64vNV = (C.GPPROGRAMUNIFORM4UI64VNV)(getProcAddr("glProgramUniform4ui64vNV")) + gpProgramUniform4uiEXT = (C.GPPROGRAMUNIFORM4UIEXT)(getProcAddr("glProgramUniform4uiEXT")) + gpProgramUniform4uiv = (C.GPPROGRAMUNIFORM4UIV)(getProcAddr("glProgramUniform4uiv")) + if gpProgramUniform4uiv == nil { + return errors.New("glProgramUniform4uiv") + } + gpProgramUniform4uivEXT = (C.GPPROGRAMUNIFORM4UIVEXT)(getProcAddr("glProgramUniform4uivEXT")) + gpProgramUniformHandleui64ARB = (C.GPPROGRAMUNIFORMHANDLEUI64ARB)(getProcAddr("glProgramUniformHandleui64ARB")) + gpProgramUniformHandleui64NV = (C.GPPROGRAMUNIFORMHANDLEUI64NV)(getProcAddr("glProgramUniformHandleui64NV")) + gpProgramUniformHandleui64vARB = (C.GPPROGRAMUNIFORMHANDLEUI64VARB)(getProcAddr("glProgramUniformHandleui64vARB")) + gpProgramUniformHandleui64vNV = (C.GPPROGRAMUNIFORMHANDLEUI64VNV)(getProcAddr("glProgramUniformHandleui64vNV")) + gpProgramUniformMatrix2dv = (C.GPPROGRAMUNIFORMMATRIX2DV)(getProcAddr("glProgramUniformMatrix2dv")) + if gpProgramUniformMatrix2dv == nil { + return errors.New("glProgramUniformMatrix2dv") + } + gpProgramUniformMatrix2dvEXT = (C.GPPROGRAMUNIFORMMATRIX2DVEXT)(getProcAddr("glProgramUniformMatrix2dvEXT")) + gpProgramUniformMatrix2fv = (C.GPPROGRAMUNIFORMMATRIX2FV)(getProcAddr("glProgramUniformMatrix2fv")) + if gpProgramUniformMatrix2fv == nil { + return errors.New("glProgramUniformMatrix2fv") + } + gpProgramUniformMatrix2fvEXT = (C.GPPROGRAMUNIFORMMATRIX2FVEXT)(getProcAddr("glProgramUniformMatrix2fvEXT")) + gpProgramUniformMatrix2x3dv = (C.GPPROGRAMUNIFORMMATRIX2X3DV)(getProcAddr("glProgramUniformMatrix2x3dv")) + if gpProgramUniformMatrix2x3dv == nil { + return errors.New("glProgramUniformMatrix2x3dv") + } + gpProgramUniformMatrix2x3dvEXT = (C.GPPROGRAMUNIFORMMATRIX2X3DVEXT)(getProcAddr("glProgramUniformMatrix2x3dvEXT")) + gpProgramUniformMatrix2x3fv = (C.GPPROGRAMUNIFORMMATRIX2X3FV)(getProcAddr("glProgramUniformMatrix2x3fv")) + if gpProgramUniformMatrix2x3fv == nil { + return errors.New("glProgramUniformMatrix2x3fv") + } + gpProgramUniformMatrix2x3fvEXT = (C.GPPROGRAMUNIFORMMATRIX2X3FVEXT)(getProcAddr("glProgramUniformMatrix2x3fvEXT")) + gpProgramUniformMatrix2x4dv = (C.GPPROGRAMUNIFORMMATRIX2X4DV)(getProcAddr("glProgramUniformMatrix2x4dv")) + if gpProgramUniformMatrix2x4dv == nil { + return errors.New("glProgramUniformMatrix2x4dv") + } + gpProgramUniformMatrix2x4dvEXT = (C.GPPROGRAMUNIFORMMATRIX2X4DVEXT)(getProcAddr("glProgramUniformMatrix2x4dvEXT")) + gpProgramUniformMatrix2x4fv = (C.GPPROGRAMUNIFORMMATRIX2X4FV)(getProcAddr("glProgramUniformMatrix2x4fv")) + if gpProgramUniformMatrix2x4fv == nil { + return errors.New("glProgramUniformMatrix2x4fv") + } + gpProgramUniformMatrix2x4fvEXT = (C.GPPROGRAMUNIFORMMATRIX2X4FVEXT)(getProcAddr("glProgramUniformMatrix2x4fvEXT")) + gpProgramUniformMatrix3dv = (C.GPPROGRAMUNIFORMMATRIX3DV)(getProcAddr("glProgramUniformMatrix3dv")) + if gpProgramUniformMatrix3dv == nil { + return errors.New("glProgramUniformMatrix3dv") + } + gpProgramUniformMatrix3dvEXT = (C.GPPROGRAMUNIFORMMATRIX3DVEXT)(getProcAddr("glProgramUniformMatrix3dvEXT")) + gpProgramUniformMatrix3fv = (C.GPPROGRAMUNIFORMMATRIX3FV)(getProcAddr("glProgramUniformMatrix3fv")) + if gpProgramUniformMatrix3fv == nil { + return errors.New("glProgramUniformMatrix3fv") + } + gpProgramUniformMatrix3fvEXT = (C.GPPROGRAMUNIFORMMATRIX3FVEXT)(getProcAddr("glProgramUniformMatrix3fvEXT")) + gpProgramUniformMatrix3x2dv = (C.GPPROGRAMUNIFORMMATRIX3X2DV)(getProcAddr("glProgramUniformMatrix3x2dv")) + if gpProgramUniformMatrix3x2dv == nil { + return errors.New("glProgramUniformMatrix3x2dv") + } + gpProgramUniformMatrix3x2dvEXT = (C.GPPROGRAMUNIFORMMATRIX3X2DVEXT)(getProcAddr("glProgramUniformMatrix3x2dvEXT")) + gpProgramUniformMatrix3x2fv = (C.GPPROGRAMUNIFORMMATRIX3X2FV)(getProcAddr("glProgramUniformMatrix3x2fv")) + if gpProgramUniformMatrix3x2fv == nil { + return errors.New("glProgramUniformMatrix3x2fv") + } + gpProgramUniformMatrix3x2fvEXT = (C.GPPROGRAMUNIFORMMATRIX3X2FVEXT)(getProcAddr("glProgramUniformMatrix3x2fvEXT")) + gpProgramUniformMatrix3x4dv = (C.GPPROGRAMUNIFORMMATRIX3X4DV)(getProcAddr("glProgramUniformMatrix3x4dv")) + if gpProgramUniformMatrix3x4dv == nil { + return errors.New("glProgramUniformMatrix3x4dv") + } + gpProgramUniformMatrix3x4dvEXT = (C.GPPROGRAMUNIFORMMATRIX3X4DVEXT)(getProcAddr("glProgramUniformMatrix3x4dvEXT")) + gpProgramUniformMatrix3x4fv = (C.GPPROGRAMUNIFORMMATRIX3X4FV)(getProcAddr("glProgramUniformMatrix3x4fv")) + if gpProgramUniformMatrix3x4fv == nil { + return errors.New("glProgramUniformMatrix3x4fv") + } + gpProgramUniformMatrix3x4fvEXT = (C.GPPROGRAMUNIFORMMATRIX3X4FVEXT)(getProcAddr("glProgramUniformMatrix3x4fvEXT")) + gpProgramUniformMatrix4dv = (C.GPPROGRAMUNIFORMMATRIX4DV)(getProcAddr("glProgramUniformMatrix4dv")) + if gpProgramUniformMatrix4dv == nil { + return errors.New("glProgramUniformMatrix4dv") + } + gpProgramUniformMatrix4dvEXT = (C.GPPROGRAMUNIFORMMATRIX4DVEXT)(getProcAddr("glProgramUniformMatrix4dvEXT")) + gpProgramUniformMatrix4fv = (C.GPPROGRAMUNIFORMMATRIX4FV)(getProcAddr("glProgramUniformMatrix4fv")) + if gpProgramUniformMatrix4fv == nil { + return errors.New("glProgramUniformMatrix4fv") + } + gpProgramUniformMatrix4fvEXT = (C.GPPROGRAMUNIFORMMATRIX4FVEXT)(getProcAddr("glProgramUniformMatrix4fvEXT")) + gpProgramUniformMatrix4x2dv = (C.GPPROGRAMUNIFORMMATRIX4X2DV)(getProcAddr("glProgramUniformMatrix4x2dv")) + if gpProgramUniformMatrix4x2dv == nil { + return errors.New("glProgramUniformMatrix4x2dv") + } + gpProgramUniformMatrix4x2dvEXT = (C.GPPROGRAMUNIFORMMATRIX4X2DVEXT)(getProcAddr("glProgramUniformMatrix4x2dvEXT")) + gpProgramUniformMatrix4x2fv = (C.GPPROGRAMUNIFORMMATRIX4X2FV)(getProcAddr("glProgramUniformMatrix4x2fv")) + if gpProgramUniformMatrix4x2fv == nil { + return errors.New("glProgramUniformMatrix4x2fv") + } + gpProgramUniformMatrix4x2fvEXT = (C.GPPROGRAMUNIFORMMATRIX4X2FVEXT)(getProcAddr("glProgramUniformMatrix4x2fvEXT")) + gpProgramUniformMatrix4x3dv = (C.GPPROGRAMUNIFORMMATRIX4X3DV)(getProcAddr("glProgramUniformMatrix4x3dv")) + if gpProgramUniformMatrix4x3dv == nil { + return errors.New("glProgramUniformMatrix4x3dv") + } + gpProgramUniformMatrix4x3dvEXT = (C.GPPROGRAMUNIFORMMATRIX4X3DVEXT)(getProcAddr("glProgramUniformMatrix4x3dvEXT")) + gpProgramUniformMatrix4x3fv = (C.GPPROGRAMUNIFORMMATRIX4X3FV)(getProcAddr("glProgramUniformMatrix4x3fv")) + if gpProgramUniformMatrix4x3fv == nil { + return errors.New("glProgramUniformMatrix4x3fv") + } + gpProgramUniformMatrix4x3fvEXT = (C.GPPROGRAMUNIFORMMATRIX4X3FVEXT)(getProcAddr("glProgramUniformMatrix4x3fvEXT")) + gpProgramUniformui64NV = (C.GPPROGRAMUNIFORMUI64NV)(getProcAddr("glProgramUniformui64NV")) + gpProgramUniformui64vNV = (C.GPPROGRAMUNIFORMUI64VNV)(getProcAddr("glProgramUniformui64vNV")) + gpProvokingVertex = (C.GPPROVOKINGVERTEX)(getProcAddr("glProvokingVertex")) + if gpProvokingVertex == nil { + return errors.New("glProvokingVertex") + } + gpPushClientAttribDefaultEXT = (C.GPPUSHCLIENTATTRIBDEFAULTEXT)(getProcAddr("glPushClientAttribDefaultEXT")) + gpPushDebugGroup = (C.GPPUSHDEBUGGROUP)(getProcAddr("glPushDebugGroup")) + gpPushDebugGroupKHR = (C.GPPUSHDEBUGGROUPKHR)(getProcAddr("glPushDebugGroupKHR")) + gpPushGroupMarkerEXT = (C.GPPUSHGROUPMARKEREXT)(getProcAddr("glPushGroupMarkerEXT")) + gpQueryCounter = (C.GPQUERYCOUNTER)(getProcAddr("glQueryCounter")) + if gpQueryCounter == nil { + return errors.New("glQueryCounter") + } + gpRasterSamplesEXT = (C.GPRASTERSAMPLESEXT)(getProcAddr("glRasterSamplesEXT")) + gpReadBuffer = (C.GPREADBUFFER)(getProcAddr("glReadBuffer")) + if gpReadBuffer == nil { + return errors.New("glReadBuffer") + } + gpReadPixels = (C.GPREADPIXELS)(getProcAddr("glReadPixels")) + if gpReadPixels == nil { + return errors.New("glReadPixels") + } + gpReadnPixels = (C.GPREADNPIXELS)(getProcAddr("glReadnPixels")) + gpReadnPixelsARB = (C.GPREADNPIXELSARB)(getProcAddr("glReadnPixelsARB")) + gpReadnPixelsKHR = (C.GPREADNPIXELSKHR)(getProcAddr("glReadnPixelsKHR")) + gpReleaseShaderCompiler = (C.GPRELEASESHADERCOMPILER)(getProcAddr("glReleaseShaderCompiler")) + if gpReleaseShaderCompiler == nil { + return errors.New("glReleaseShaderCompiler") + } + gpRenderbufferStorage = (C.GPRENDERBUFFERSTORAGE)(getProcAddr("glRenderbufferStorage")) + if gpRenderbufferStorage == nil { + return errors.New("glRenderbufferStorage") + } + gpRenderbufferStorageMultisample = (C.GPRENDERBUFFERSTORAGEMULTISAMPLE)(getProcAddr("glRenderbufferStorageMultisample")) + if gpRenderbufferStorageMultisample == nil { + return errors.New("glRenderbufferStorageMultisample") + } + gpRenderbufferStorageMultisampleCoverageNV = (C.GPRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENV)(getProcAddr("glRenderbufferStorageMultisampleCoverageNV")) + gpResolveDepthValuesNV = (C.GPRESOLVEDEPTHVALUESNV)(getProcAddr("glResolveDepthValuesNV")) + gpResumeTransformFeedback = (C.GPRESUMETRANSFORMFEEDBACK)(getProcAddr("glResumeTransformFeedback")) + if gpResumeTransformFeedback == nil { + return errors.New("glResumeTransformFeedback") + } + gpSampleCoverage = (C.GPSAMPLECOVERAGE)(getProcAddr("glSampleCoverage")) + if gpSampleCoverage == nil { + return errors.New("glSampleCoverage") + } + gpSampleMaski = (C.GPSAMPLEMASKI)(getProcAddr("glSampleMaski")) + if gpSampleMaski == nil { + return errors.New("glSampleMaski") + } + gpSamplerParameterIiv = (C.GPSAMPLERPARAMETERIIV)(getProcAddr("glSamplerParameterIiv")) + if gpSamplerParameterIiv == nil { + return errors.New("glSamplerParameterIiv") + } + gpSamplerParameterIuiv = (C.GPSAMPLERPARAMETERIUIV)(getProcAddr("glSamplerParameterIuiv")) + if gpSamplerParameterIuiv == nil { + return errors.New("glSamplerParameterIuiv") + } + gpSamplerParameterf = (C.GPSAMPLERPARAMETERF)(getProcAddr("glSamplerParameterf")) + if gpSamplerParameterf == nil { + return errors.New("glSamplerParameterf") + } + gpSamplerParameterfv = (C.GPSAMPLERPARAMETERFV)(getProcAddr("glSamplerParameterfv")) + if gpSamplerParameterfv == nil { + return errors.New("glSamplerParameterfv") + } + gpSamplerParameteri = (C.GPSAMPLERPARAMETERI)(getProcAddr("glSamplerParameteri")) + if gpSamplerParameteri == nil { + return errors.New("glSamplerParameteri") + } + gpSamplerParameteriv = (C.GPSAMPLERPARAMETERIV)(getProcAddr("glSamplerParameteriv")) + if gpSamplerParameteriv == nil { + return errors.New("glSamplerParameteriv") + } + gpScissor = (C.GPSCISSOR)(getProcAddr("glScissor")) + if gpScissor == nil { + return errors.New("glScissor") + } + gpScissorArrayv = (C.GPSCISSORARRAYV)(getProcAddr("glScissorArrayv")) + if gpScissorArrayv == nil { + return errors.New("glScissorArrayv") + } + gpScissorIndexed = (C.GPSCISSORINDEXED)(getProcAddr("glScissorIndexed")) + if gpScissorIndexed == nil { + return errors.New("glScissorIndexed") + } + gpScissorIndexedv = (C.GPSCISSORINDEXEDV)(getProcAddr("glScissorIndexedv")) + if gpScissorIndexedv == nil { + return errors.New("glScissorIndexedv") + } + gpSecondaryColorFormatNV = (C.GPSECONDARYCOLORFORMATNV)(getProcAddr("glSecondaryColorFormatNV")) + gpSelectPerfMonitorCountersAMD = (C.GPSELECTPERFMONITORCOUNTERSAMD)(getProcAddr("glSelectPerfMonitorCountersAMD")) + gpShaderBinary = (C.GPSHADERBINARY)(getProcAddr("glShaderBinary")) + if gpShaderBinary == nil { + return errors.New("glShaderBinary") + } + gpShaderSource = (C.GPSHADERSOURCE)(getProcAddr("glShaderSource")) + if gpShaderSource == nil { + return errors.New("glShaderSource") + } + gpShaderStorageBlockBinding = (C.GPSHADERSTORAGEBLOCKBINDING)(getProcAddr("glShaderStorageBlockBinding")) + gpSignalVkFenceNV = (C.GPSIGNALVKFENCENV)(getProcAddr("glSignalVkFenceNV")) + gpSignalVkSemaphoreNV = (C.GPSIGNALVKSEMAPHORENV)(getProcAddr("glSignalVkSemaphoreNV")) + gpSpecializeShaderARB = (C.GPSPECIALIZESHADERARB)(getProcAddr("glSpecializeShaderARB")) + gpStateCaptureNV = (C.GPSTATECAPTURENV)(getProcAddr("glStateCaptureNV")) + gpStencilFillPathInstancedNV = (C.GPSTENCILFILLPATHINSTANCEDNV)(getProcAddr("glStencilFillPathInstancedNV")) + gpStencilFillPathNV = (C.GPSTENCILFILLPATHNV)(getProcAddr("glStencilFillPathNV")) + gpStencilFunc = (C.GPSTENCILFUNC)(getProcAddr("glStencilFunc")) + if gpStencilFunc == nil { + return errors.New("glStencilFunc") + } + gpStencilFuncSeparate = (C.GPSTENCILFUNCSEPARATE)(getProcAddr("glStencilFuncSeparate")) + if gpStencilFuncSeparate == nil { + return errors.New("glStencilFuncSeparate") + } + gpStencilMask = (C.GPSTENCILMASK)(getProcAddr("glStencilMask")) + if gpStencilMask == nil { + return errors.New("glStencilMask") + } + gpStencilMaskSeparate = (C.GPSTENCILMASKSEPARATE)(getProcAddr("glStencilMaskSeparate")) + if gpStencilMaskSeparate == nil { + return errors.New("glStencilMaskSeparate") + } + gpStencilOp = (C.GPSTENCILOP)(getProcAddr("glStencilOp")) + if gpStencilOp == nil { + return errors.New("glStencilOp") + } + gpStencilOpSeparate = (C.GPSTENCILOPSEPARATE)(getProcAddr("glStencilOpSeparate")) + if gpStencilOpSeparate == nil { + return errors.New("glStencilOpSeparate") + } + gpStencilStrokePathInstancedNV = (C.GPSTENCILSTROKEPATHINSTANCEDNV)(getProcAddr("glStencilStrokePathInstancedNV")) + gpStencilStrokePathNV = (C.GPSTENCILSTROKEPATHNV)(getProcAddr("glStencilStrokePathNV")) + gpStencilThenCoverFillPathInstancedNV = (C.GPSTENCILTHENCOVERFILLPATHINSTANCEDNV)(getProcAddr("glStencilThenCoverFillPathInstancedNV")) + gpStencilThenCoverFillPathNV = (C.GPSTENCILTHENCOVERFILLPATHNV)(getProcAddr("glStencilThenCoverFillPathNV")) + gpStencilThenCoverStrokePathInstancedNV = (C.GPSTENCILTHENCOVERSTROKEPATHINSTANCEDNV)(getProcAddr("glStencilThenCoverStrokePathInstancedNV")) + gpStencilThenCoverStrokePathNV = (C.GPSTENCILTHENCOVERSTROKEPATHNV)(getProcAddr("glStencilThenCoverStrokePathNV")) + gpSubpixelPrecisionBiasNV = (C.GPSUBPIXELPRECISIONBIASNV)(getProcAddr("glSubpixelPrecisionBiasNV")) + gpTexBuffer = (C.GPTEXBUFFER)(getProcAddr("glTexBuffer")) + if gpTexBuffer == nil { + return errors.New("glTexBuffer") + } + gpTexBufferARB = (C.GPTEXBUFFERARB)(getProcAddr("glTexBufferARB")) + gpTexBufferRange = (C.GPTEXBUFFERRANGE)(getProcAddr("glTexBufferRange")) + gpTexCoordFormatNV = (C.GPTEXCOORDFORMATNV)(getProcAddr("glTexCoordFormatNV")) + gpTexImage1D = (C.GPTEXIMAGE1D)(getProcAddr("glTexImage1D")) + if gpTexImage1D == nil { + return errors.New("glTexImage1D") + } + gpTexImage2D = (C.GPTEXIMAGE2D)(getProcAddr("glTexImage2D")) + if gpTexImage2D == nil { + return errors.New("glTexImage2D") + } + gpTexImage2DMultisample = (C.GPTEXIMAGE2DMULTISAMPLE)(getProcAddr("glTexImage2DMultisample")) + if gpTexImage2DMultisample == nil { + return errors.New("glTexImage2DMultisample") + } + gpTexImage3D = (C.GPTEXIMAGE3D)(getProcAddr("glTexImage3D")) + if gpTexImage3D == nil { + return errors.New("glTexImage3D") + } + gpTexImage3DMultisample = (C.GPTEXIMAGE3DMULTISAMPLE)(getProcAddr("glTexImage3DMultisample")) + if gpTexImage3DMultisample == nil { + return errors.New("glTexImage3DMultisample") + } + gpTexPageCommitmentARB = (C.GPTEXPAGECOMMITMENTARB)(getProcAddr("glTexPageCommitmentARB")) + gpTexParameterIiv = (C.GPTEXPARAMETERIIV)(getProcAddr("glTexParameterIiv")) + if gpTexParameterIiv == nil { + return errors.New("glTexParameterIiv") + } + gpTexParameterIuiv = (C.GPTEXPARAMETERIUIV)(getProcAddr("glTexParameterIuiv")) + if gpTexParameterIuiv == nil { + return errors.New("glTexParameterIuiv") + } + gpTexParameterf = (C.GPTEXPARAMETERF)(getProcAddr("glTexParameterf")) + if gpTexParameterf == nil { + return errors.New("glTexParameterf") + } + gpTexParameterfv = (C.GPTEXPARAMETERFV)(getProcAddr("glTexParameterfv")) + if gpTexParameterfv == nil { + return errors.New("glTexParameterfv") + } + gpTexParameteri = (C.GPTEXPARAMETERI)(getProcAddr("glTexParameteri")) + if gpTexParameteri == nil { + return errors.New("glTexParameteri") + } + gpTexParameteriv = (C.GPTEXPARAMETERIV)(getProcAddr("glTexParameteriv")) + if gpTexParameteriv == nil { + return errors.New("glTexParameteriv") + } + gpTexStorage1D = (C.GPTEXSTORAGE1D)(getProcAddr("glTexStorage1D")) + gpTexStorage2D = (C.GPTEXSTORAGE2D)(getProcAddr("glTexStorage2D")) + gpTexStorage2DMultisample = (C.GPTEXSTORAGE2DMULTISAMPLE)(getProcAddr("glTexStorage2DMultisample")) + gpTexStorage3D = (C.GPTEXSTORAGE3D)(getProcAddr("glTexStorage3D")) + gpTexStorage3DMultisample = (C.GPTEXSTORAGE3DMULTISAMPLE)(getProcAddr("glTexStorage3DMultisample")) + gpTexSubImage1D = (C.GPTEXSUBIMAGE1D)(getProcAddr("glTexSubImage1D")) + if gpTexSubImage1D == nil { + return errors.New("glTexSubImage1D") + } + gpTexSubImage2D = (C.GPTEXSUBIMAGE2D)(getProcAddr("glTexSubImage2D")) + if gpTexSubImage2D == nil { + return errors.New("glTexSubImage2D") + } + gpTexSubImage3D = (C.GPTEXSUBIMAGE3D)(getProcAddr("glTexSubImage3D")) + if gpTexSubImage3D == nil { + return errors.New("glTexSubImage3D") + } + gpTextureBarrier = (C.GPTEXTUREBARRIER)(getProcAddr("glTextureBarrier")) + gpTextureBarrierNV = (C.GPTEXTUREBARRIERNV)(getProcAddr("glTextureBarrierNV")) + gpTextureBuffer = (C.GPTEXTUREBUFFER)(getProcAddr("glTextureBuffer")) + gpTextureBufferEXT = (C.GPTEXTUREBUFFEREXT)(getProcAddr("glTextureBufferEXT")) + gpTextureBufferRange = (C.GPTEXTUREBUFFERRANGE)(getProcAddr("glTextureBufferRange")) + gpTextureBufferRangeEXT = (C.GPTEXTUREBUFFERRANGEEXT)(getProcAddr("glTextureBufferRangeEXT")) + gpTextureImage1DEXT = (C.GPTEXTUREIMAGE1DEXT)(getProcAddr("glTextureImage1DEXT")) + gpTextureImage2DEXT = (C.GPTEXTUREIMAGE2DEXT)(getProcAddr("glTextureImage2DEXT")) + gpTextureImage3DEXT = (C.GPTEXTUREIMAGE3DEXT)(getProcAddr("glTextureImage3DEXT")) + gpTexturePageCommitmentEXT = (C.GPTEXTUREPAGECOMMITMENTEXT)(getProcAddr("glTexturePageCommitmentEXT")) + gpTextureParameterIiv = (C.GPTEXTUREPARAMETERIIV)(getProcAddr("glTextureParameterIiv")) + gpTextureParameterIivEXT = (C.GPTEXTUREPARAMETERIIVEXT)(getProcAddr("glTextureParameterIivEXT")) + gpTextureParameterIuiv = (C.GPTEXTUREPARAMETERIUIV)(getProcAddr("glTextureParameterIuiv")) + gpTextureParameterIuivEXT = (C.GPTEXTUREPARAMETERIUIVEXT)(getProcAddr("glTextureParameterIuivEXT")) + gpTextureParameterf = (C.GPTEXTUREPARAMETERF)(getProcAddr("glTextureParameterf")) + gpTextureParameterfEXT = (C.GPTEXTUREPARAMETERFEXT)(getProcAddr("glTextureParameterfEXT")) + gpTextureParameterfv = (C.GPTEXTUREPARAMETERFV)(getProcAddr("glTextureParameterfv")) + gpTextureParameterfvEXT = (C.GPTEXTUREPARAMETERFVEXT)(getProcAddr("glTextureParameterfvEXT")) + gpTextureParameteri = (C.GPTEXTUREPARAMETERI)(getProcAddr("glTextureParameteri")) + gpTextureParameteriEXT = (C.GPTEXTUREPARAMETERIEXT)(getProcAddr("glTextureParameteriEXT")) + gpTextureParameteriv = (C.GPTEXTUREPARAMETERIV)(getProcAddr("glTextureParameteriv")) + gpTextureParameterivEXT = (C.GPTEXTUREPARAMETERIVEXT)(getProcAddr("glTextureParameterivEXT")) + gpTextureRenderbufferEXT = (C.GPTEXTURERENDERBUFFEREXT)(getProcAddr("glTextureRenderbufferEXT")) + gpTextureStorage1D = (C.GPTEXTURESTORAGE1D)(getProcAddr("glTextureStorage1D")) + gpTextureStorage1DEXT = (C.GPTEXTURESTORAGE1DEXT)(getProcAddr("glTextureStorage1DEXT")) + gpTextureStorage2D = (C.GPTEXTURESTORAGE2D)(getProcAddr("glTextureStorage2D")) + gpTextureStorage2DEXT = (C.GPTEXTURESTORAGE2DEXT)(getProcAddr("glTextureStorage2DEXT")) + gpTextureStorage2DMultisample = (C.GPTEXTURESTORAGE2DMULTISAMPLE)(getProcAddr("glTextureStorage2DMultisample")) + gpTextureStorage2DMultisampleEXT = (C.GPTEXTURESTORAGE2DMULTISAMPLEEXT)(getProcAddr("glTextureStorage2DMultisampleEXT")) + gpTextureStorage3D = (C.GPTEXTURESTORAGE3D)(getProcAddr("glTextureStorage3D")) + gpTextureStorage3DEXT = (C.GPTEXTURESTORAGE3DEXT)(getProcAddr("glTextureStorage3DEXT")) + gpTextureStorage3DMultisample = (C.GPTEXTURESTORAGE3DMULTISAMPLE)(getProcAddr("glTextureStorage3DMultisample")) + gpTextureStorage3DMultisampleEXT = (C.GPTEXTURESTORAGE3DMULTISAMPLEEXT)(getProcAddr("glTextureStorage3DMultisampleEXT")) + gpTextureSubImage1D = (C.GPTEXTURESUBIMAGE1D)(getProcAddr("glTextureSubImage1D")) + gpTextureSubImage1DEXT = (C.GPTEXTURESUBIMAGE1DEXT)(getProcAddr("glTextureSubImage1DEXT")) + gpTextureSubImage2D = (C.GPTEXTURESUBIMAGE2D)(getProcAddr("glTextureSubImage2D")) + gpTextureSubImage2DEXT = (C.GPTEXTURESUBIMAGE2DEXT)(getProcAddr("glTextureSubImage2DEXT")) + gpTextureSubImage3D = (C.GPTEXTURESUBIMAGE3D)(getProcAddr("glTextureSubImage3D")) + gpTextureSubImage3DEXT = (C.GPTEXTURESUBIMAGE3DEXT)(getProcAddr("glTextureSubImage3DEXT")) + gpTextureView = (C.GPTEXTUREVIEW)(getProcAddr("glTextureView")) + gpTransformFeedbackBufferBase = (C.GPTRANSFORMFEEDBACKBUFFERBASE)(getProcAddr("glTransformFeedbackBufferBase")) + gpTransformFeedbackBufferRange = (C.GPTRANSFORMFEEDBACKBUFFERRANGE)(getProcAddr("glTransformFeedbackBufferRange")) + gpTransformFeedbackVaryings = (C.GPTRANSFORMFEEDBACKVARYINGS)(getProcAddr("glTransformFeedbackVaryings")) + if gpTransformFeedbackVaryings == nil { + return errors.New("glTransformFeedbackVaryings") + } + gpTransformPathNV = (C.GPTRANSFORMPATHNV)(getProcAddr("glTransformPathNV")) + gpUniform1d = (C.GPUNIFORM1D)(getProcAddr("glUniform1d")) + if gpUniform1d == nil { + return errors.New("glUniform1d") + } + gpUniform1dv = (C.GPUNIFORM1DV)(getProcAddr("glUniform1dv")) + if gpUniform1dv == nil { + return errors.New("glUniform1dv") + } + gpUniform1f = (C.GPUNIFORM1F)(getProcAddr("glUniform1f")) + if gpUniform1f == nil { + return errors.New("glUniform1f") + } + gpUniform1fv = (C.GPUNIFORM1FV)(getProcAddr("glUniform1fv")) + if gpUniform1fv == nil { + return errors.New("glUniform1fv") + } + gpUniform1i = (C.GPUNIFORM1I)(getProcAddr("glUniform1i")) + if gpUniform1i == nil { + return errors.New("glUniform1i") + } + gpUniform1i64ARB = (C.GPUNIFORM1I64ARB)(getProcAddr("glUniform1i64ARB")) + gpUniform1i64NV = (C.GPUNIFORM1I64NV)(getProcAddr("glUniform1i64NV")) + gpUniform1i64vARB = (C.GPUNIFORM1I64VARB)(getProcAddr("glUniform1i64vARB")) + gpUniform1i64vNV = (C.GPUNIFORM1I64VNV)(getProcAddr("glUniform1i64vNV")) + gpUniform1iv = (C.GPUNIFORM1IV)(getProcAddr("glUniform1iv")) + if gpUniform1iv == nil { + return errors.New("glUniform1iv") + } + gpUniform1ui = (C.GPUNIFORM1UI)(getProcAddr("glUniform1ui")) + if gpUniform1ui == nil { + return errors.New("glUniform1ui") + } + gpUniform1ui64ARB = (C.GPUNIFORM1UI64ARB)(getProcAddr("glUniform1ui64ARB")) + gpUniform1ui64NV = (C.GPUNIFORM1UI64NV)(getProcAddr("glUniform1ui64NV")) + gpUniform1ui64vARB = (C.GPUNIFORM1UI64VARB)(getProcAddr("glUniform1ui64vARB")) + gpUniform1ui64vNV = (C.GPUNIFORM1UI64VNV)(getProcAddr("glUniform1ui64vNV")) + gpUniform1uiv = (C.GPUNIFORM1UIV)(getProcAddr("glUniform1uiv")) + if gpUniform1uiv == nil { + return errors.New("glUniform1uiv") + } + gpUniform2d = (C.GPUNIFORM2D)(getProcAddr("glUniform2d")) + if gpUniform2d == nil { + return errors.New("glUniform2d") + } + gpUniform2dv = (C.GPUNIFORM2DV)(getProcAddr("glUniform2dv")) + if gpUniform2dv == nil { + return errors.New("glUniform2dv") + } + gpUniform2f = (C.GPUNIFORM2F)(getProcAddr("glUniform2f")) + if gpUniform2f == nil { + return errors.New("glUniform2f") + } + gpUniform2fv = (C.GPUNIFORM2FV)(getProcAddr("glUniform2fv")) + if gpUniform2fv == nil { + return errors.New("glUniform2fv") + } + gpUniform2i = (C.GPUNIFORM2I)(getProcAddr("glUniform2i")) + if gpUniform2i == nil { + return errors.New("glUniform2i") + } + gpUniform2i64ARB = (C.GPUNIFORM2I64ARB)(getProcAddr("glUniform2i64ARB")) + gpUniform2i64NV = (C.GPUNIFORM2I64NV)(getProcAddr("glUniform2i64NV")) + gpUniform2i64vARB = (C.GPUNIFORM2I64VARB)(getProcAddr("glUniform2i64vARB")) + gpUniform2i64vNV = (C.GPUNIFORM2I64VNV)(getProcAddr("glUniform2i64vNV")) + gpUniform2iv = (C.GPUNIFORM2IV)(getProcAddr("glUniform2iv")) + if gpUniform2iv == nil { + return errors.New("glUniform2iv") + } + gpUniform2ui = (C.GPUNIFORM2UI)(getProcAddr("glUniform2ui")) + if gpUniform2ui == nil { + return errors.New("glUniform2ui") + } + gpUniform2ui64ARB = (C.GPUNIFORM2UI64ARB)(getProcAddr("glUniform2ui64ARB")) + gpUniform2ui64NV = (C.GPUNIFORM2UI64NV)(getProcAddr("glUniform2ui64NV")) + gpUniform2ui64vARB = (C.GPUNIFORM2UI64VARB)(getProcAddr("glUniform2ui64vARB")) + gpUniform2ui64vNV = (C.GPUNIFORM2UI64VNV)(getProcAddr("glUniform2ui64vNV")) + gpUniform2uiv = (C.GPUNIFORM2UIV)(getProcAddr("glUniform2uiv")) + if gpUniform2uiv == nil { + return errors.New("glUniform2uiv") + } + gpUniform3d = (C.GPUNIFORM3D)(getProcAddr("glUniform3d")) + if gpUniform3d == nil { + return errors.New("glUniform3d") + } + gpUniform3dv = (C.GPUNIFORM3DV)(getProcAddr("glUniform3dv")) + if gpUniform3dv == nil { + return errors.New("glUniform3dv") + } + gpUniform3f = (C.GPUNIFORM3F)(getProcAddr("glUniform3f")) + if gpUniform3f == nil { + return errors.New("glUniform3f") + } + gpUniform3fv = (C.GPUNIFORM3FV)(getProcAddr("glUniform3fv")) + if gpUniform3fv == nil { + return errors.New("glUniform3fv") + } + gpUniform3i = (C.GPUNIFORM3I)(getProcAddr("glUniform3i")) + if gpUniform3i == nil { + return errors.New("glUniform3i") + } + gpUniform3i64ARB = (C.GPUNIFORM3I64ARB)(getProcAddr("glUniform3i64ARB")) + gpUniform3i64NV = (C.GPUNIFORM3I64NV)(getProcAddr("glUniform3i64NV")) + gpUniform3i64vARB = (C.GPUNIFORM3I64VARB)(getProcAddr("glUniform3i64vARB")) + gpUniform3i64vNV = (C.GPUNIFORM3I64VNV)(getProcAddr("glUniform3i64vNV")) + gpUniform3iv = (C.GPUNIFORM3IV)(getProcAddr("glUniform3iv")) + if gpUniform3iv == nil { + return errors.New("glUniform3iv") + } + gpUniform3ui = (C.GPUNIFORM3UI)(getProcAddr("glUniform3ui")) + if gpUniform3ui == nil { + return errors.New("glUniform3ui") + } + gpUniform3ui64ARB = (C.GPUNIFORM3UI64ARB)(getProcAddr("glUniform3ui64ARB")) + gpUniform3ui64NV = (C.GPUNIFORM3UI64NV)(getProcAddr("glUniform3ui64NV")) + gpUniform3ui64vARB = (C.GPUNIFORM3UI64VARB)(getProcAddr("glUniform3ui64vARB")) + gpUniform3ui64vNV = (C.GPUNIFORM3UI64VNV)(getProcAddr("glUniform3ui64vNV")) + gpUniform3uiv = (C.GPUNIFORM3UIV)(getProcAddr("glUniform3uiv")) + if gpUniform3uiv == nil { + return errors.New("glUniform3uiv") + } + gpUniform4d = (C.GPUNIFORM4D)(getProcAddr("glUniform4d")) + if gpUniform4d == nil { + return errors.New("glUniform4d") + } + gpUniform4dv = (C.GPUNIFORM4DV)(getProcAddr("glUniform4dv")) + if gpUniform4dv == nil { + return errors.New("glUniform4dv") + } + gpUniform4f = (C.GPUNIFORM4F)(getProcAddr("glUniform4f")) + if gpUniform4f == nil { + return errors.New("glUniform4f") + } + gpUniform4fv = (C.GPUNIFORM4FV)(getProcAddr("glUniform4fv")) + if gpUniform4fv == nil { + return errors.New("glUniform4fv") + } + gpUniform4i = (C.GPUNIFORM4I)(getProcAddr("glUniform4i")) + if gpUniform4i == nil { + return errors.New("glUniform4i") + } + gpUniform4i64ARB = (C.GPUNIFORM4I64ARB)(getProcAddr("glUniform4i64ARB")) + gpUniform4i64NV = (C.GPUNIFORM4I64NV)(getProcAddr("glUniform4i64NV")) + gpUniform4i64vARB = (C.GPUNIFORM4I64VARB)(getProcAddr("glUniform4i64vARB")) + gpUniform4i64vNV = (C.GPUNIFORM4I64VNV)(getProcAddr("glUniform4i64vNV")) + gpUniform4iv = (C.GPUNIFORM4IV)(getProcAddr("glUniform4iv")) + if gpUniform4iv == nil { + return errors.New("glUniform4iv") + } + gpUniform4ui = (C.GPUNIFORM4UI)(getProcAddr("glUniform4ui")) + if gpUniform4ui == nil { + return errors.New("glUniform4ui") + } + gpUniform4ui64ARB = (C.GPUNIFORM4UI64ARB)(getProcAddr("glUniform4ui64ARB")) + gpUniform4ui64NV = (C.GPUNIFORM4UI64NV)(getProcAddr("glUniform4ui64NV")) + gpUniform4ui64vARB = (C.GPUNIFORM4UI64VARB)(getProcAddr("glUniform4ui64vARB")) + gpUniform4ui64vNV = (C.GPUNIFORM4UI64VNV)(getProcAddr("glUniform4ui64vNV")) + gpUniform4uiv = (C.GPUNIFORM4UIV)(getProcAddr("glUniform4uiv")) + if gpUniform4uiv == nil { + return errors.New("glUniform4uiv") + } + gpUniformBlockBinding = (C.GPUNIFORMBLOCKBINDING)(getProcAddr("glUniformBlockBinding")) + if gpUniformBlockBinding == nil { + return errors.New("glUniformBlockBinding") + } + gpUniformHandleui64ARB = (C.GPUNIFORMHANDLEUI64ARB)(getProcAddr("glUniformHandleui64ARB")) + gpUniformHandleui64NV = (C.GPUNIFORMHANDLEUI64NV)(getProcAddr("glUniformHandleui64NV")) + gpUniformHandleui64vARB = (C.GPUNIFORMHANDLEUI64VARB)(getProcAddr("glUniformHandleui64vARB")) + gpUniformHandleui64vNV = (C.GPUNIFORMHANDLEUI64VNV)(getProcAddr("glUniformHandleui64vNV")) + gpUniformMatrix2dv = (C.GPUNIFORMMATRIX2DV)(getProcAddr("glUniformMatrix2dv")) + if gpUniformMatrix2dv == nil { + return errors.New("glUniformMatrix2dv") + } + gpUniformMatrix2fv = (C.GPUNIFORMMATRIX2FV)(getProcAddr("glUniformMatrix2fv")) + if gpUniformMatrix2fv == nil { + return errors.New("glUniformMatrix2fv") + } + gpUniformMatrix2x3dv = (C.GPUNIFORMMATRIX2X3DV)(getProcAddr("glUniformMatrix2x3dv")) + if gpUniformMatrix2x3dv == nil { + return errors.New("glUniformMatrix2x3dv") + } + gpUniformMatrix2x3fv = (C.GPUNIFORMMATRIX2X3FV)(getProcAddr("glUniformMatrix2x3fv")) + if gpUniformMatrix2x3fv == nil { + return errors.New("glUniformMatrix2x3fv") + } + gpUniformMatrix2x4dv = (C.GPUNIFORMMATRIX2X4DV)(getProcAddr("glUniformMatrix2x4dv")) + if gpUniformMatrix2x4dv == nil { + return errors.New("glUniformMatrix2x4dv") + } + gpUniformMatrix2x4fv = (C.GPUNIFORMMATRIX2X4FV)(getProcAddr("glUniformMatrix2x4fv")) + if gpUniformMatrix2x4fv == nil { + return errors.New("glUniformMatrix2x4fv") + } + gpUniformMatrix3dv = (C.GPUNIFORMMATRIX3DV)(getProcAddr("glUniformMatrix3dv")) + if gpUniformMatrix3dv == nil { + return errors.New("glUniformMatrix3dv") + } + gpUniformMatrix3fv = (C.GPUNIFORMMATRIX3FV)(getProcAddr("glUniformMatrix3fv")) + if gpUniformMatrix3fv == nil { + return errors.New("glUniformMatrix3fv") + } + gpUniformMatrix3x2dv = (C.GPUNIFORMMATRIX3X2DV)(getProcAddr("glUniformMatrix3x2dv")) + if gpUniformMatrix3x2dv == nil { + return errors.New("glUniformMatrix3x2dv") + } + gpUniformMatrix3x2fv = (C.GPUNIFORMMATRIX3X2FV)(getProcAddr("glUniformMatrix3x2fv")) + if gpUniformMatrix3x2fv == nil { + return errors.New("glUniformMatrix3x2fv") + } + gpUniformMatrix3x4dv = (C.GPUNIFORMMATRIX3X4DV)(getProcAddr("glUniformMatrix3x4dv")) + if gpUniformMatrix3x4dv == nil { + return errors.New("glUniformMatrix3x4dv") + } + gpUniformMatrix3x4fv = (C.GPUNIFORMMATRIX3X4FV)(getProcAddr("glUniformMatrix3x4fv")) + if gpUniformMatrix3x4fv == nil { + return errors.New("glUniformMatrix3x4fv") + } + gpUniformMatrix4dv = (C.GPUNIFORMMATRIX4DV)(getProcAddr("glUniformMatrix4dv")) + if gpUniformMatrix4dv == nil { + return errors.New("glUniformMatrix4dv") + } + gpUniformMatrix4fv = (C.GPUNIFORMMATRIX4FV)(getProcAddr("glUniformMatrix4fv")) + if gpUniformMatrix4fv == nil { + return errors.New("glUniformMatrix4fv") + } + gpUniformMatrix4x2dv = (C.GPUNIFORMMATRIX4X2DV)(getProcAddr("glUniformMatrix4x2dv")) + if gpUniformMatrix4x2dv == nil { + return errors.New("glUniformMatrix4x2dv") + } + gpUniformMatrix4x2fv = (C.GPUNIFORMMATRIX4X2FV)(getProcAddr("glUniformMatrix4x2fv")) + if gpUniformMatrix4x2fv == nil { + return errors.New("glUniformMatrix4x2fv") + } + gpUniformMatrix4x3dv = (C.GPUNIFORMMATRIX4X3DV)(getProcAddr("glUniformMatrix4x3dv")) + if gpUniformMatrix4x3dv == nil { + return errors.New("glUniformMatrix4x3dv") + } + gpUniformMatrix4x3fv = (C.GPUNIFORMMATRIX4X3FV)(getProcAddr("glUniformMatrix4x3fv")) + if gpUniformMatrix4x3fv == nil { + return errors.New("glUniformMatrix4x3fv") + } + gpUniformSubroutinesuiv = (C.GPUNIFORMSUBROUTINESUIV)(getProcAddr("glUniformSubroutinesuiv")) + if gpUniformSubroutinesuiv == nil { + return errors.New("glUniformSubroutinesuiv") + } + gpUniformui64NV = (C.GPUNIFORMUI64NV)(getProcAddr("glUniformui64NV")) + gpUniformui64vNV = (C.GPUNIFORMUI64VNV)(getProcAddr("glUniformui64vNV")) + gpUnmapBuffer = (C.GPUNMAPBUFFER)(getProcAddr("glUnmapBuffer")) + if gpUnmapBuffer == nil { + return errors.New("glUnmapBuffer") + } + gpUnmapNamedBuffer = (C.GPUNMAPNAMEDBUFFER)(getProcAddr("glUnmapNamedBuffer")) + gpUnmapNamedBufferEXT = (C.GPUNMAPNAMEDBUFFEREXT)(getProcAddr("glUnmapNamedBufferEXT")) + gpUseProgram = (C.GPUSEPROGRAM)(getProcAddr("glUseProgram")) + if gpUseProgram == nil { + return errors.New("glUseProgram") + } + gpUseProgramStages = (C.GPUSEPROGRAMSTAGES)(getProcAddr("glUseProgramStages")) + if gpUseProgramStages == nil { + return errors.New("glUseProgramStages") + } + gpUseProgramStagesEXT = (C.GPUSEPROGRAMSTAGESEXT)(getProcAddr("glUseProgramStagesEXT")) + gpUseShaderProgramEXT = (C.GPUSESHADERPROGRAMEXT)(getProcAddr("glUseShaderProgramEXT")) + gpValidateProgram = (C.GPVALIDATEPROGRAM)(getProcAddr("glValidateProgram")) + if gpValidateProgram == nil { + return errors.New("glValidateProgram") + } + gpValidateProgramPipeline = (C.GPVALIDATEPROGRAMPIPELINE)(getProcAddr("glValidateProgramPipeline")) + if gpValidateProgramPipeline == nil { + return errors.New("glValidateProgramPipeline") + } + gpValidateProgramPipelineEXT = (C.GPVALIDATEPROGRAMPIPELINEEXT)(getProcAddr("glValidateProgramPipelineEXT")) + gpVertexArrayAttribBinding = (C.GPVERTEXARRAYATTRIBBINDING)(getProcAddr("glVertexArrayAttribBinding")) + gpVertexArrayAttribFormat = (C.GPVERTEXARRAYATTRIBFORMAT)(getProcAddr("glVertexArrayAttribFormat")) + gpVertexArrayAttribIFormat = (C.GPVERTEXARRAYATTRIBIFORMAT)(getProcAddr("glVertexArrayAttribIFormat")) + gpVertexArrayAttribLFormat = (C.GPVERTEXARRAYATTRIBLFORMAT)(getProcAddr("glVertexArrayAttribLFormat")) + gpVertexArrayBindVertexBufferEXT = (C.GPVERTEXARRAYBINDVERTEXBUFFEREXT)(getProcAddr("glVertexArrayBindVertexBufferEXT")) + gpVertexArrayBindingDivisor = (C.GPVERTEXARRAYBINDINGDIVISOR)(getProcAddr("glVertexArrayBindingDivisor")) + gpVertexArrayColorOffsetEXT = (C.GPVERTEXARRAYCOLOROFFSETEXT)(getProcAddr("glVertexArrayColorOffsetEXT")) + gpVertexArrayEdgeFlagOffsetEXT = (C.GPVERTEXARRAYEDGEFLAGOFFSETEXT)(getProcAddr("glVertexArrayEdgeFlagOffsetEXT")) + gpVertexArrayElementBuffer = (C.GPVERTEXARRAYELEMENTBUFFER)(getProcAddr("glVertexArrayElementBuffer")) + gpVertexArrayFogCoordOffsetEXT = (C.GPVERTEXARRAYFOGCOORDOFFSETEXT)(getProcAddr("glVertexArrayFogCoordOffsetEXT")) + gpVertexArrayIndexOffsetEXT = (C.GPVERTEXARRAYINDEXOFFSETEXT)(getProcAddr("glVertexArrayIndexOffsetEXT")) + gpVertexArrayMultiTexCoordOffsetEXT = (C.GPVERTEXARRAYMULTITEXCOORDOFFSETEXT)(getProcAddr("glVertexArrayMultiTexCoordOffsetEXT")) + gpVertexArrayNormalOffsetEXT = (C.GPVERTEXARRAYNORMALOFFSETEXT)(getProcAddr("glVertexArrayNormalOffsetEXT")) + gpVertexArraySecondaryColorOffsetEXT = (C.GPVERTEXARRAYSECONDARYCOLOROFFSETEXT)(getProcAddr("glVertexArraySecondaryColorOffsetEXT")) + gpVertexArrayTexCoordOffsetEXT = (C.GPVERTEXARRAYTEXCOORDOFFSETEXT)(getProcAddr("glVertexArrayTexCoordOffsetEXT")) + gpVertexArrayVertexAttribBindingEXT = (C.GPVERTEXARRAYVERTEXATTRIBBINDINGEXT)(getProcAddr("glVertexArrayVertexAttribBindingEXT")) + gpVertexArrayVertexAttribDivisorEXT = (C.GPVERTEXARRAYVERTEXATTRIBDIVISOREXT)(getProcAddr("glVertexArrayVertexAttribDivisorEXT")) + gpVertexArrayVertexAttribFormatEXT = (C.GPVERTEXARRAYVERTEXATTRIBFORMATEXT)(getProcAddr("glVertexArrayVertexAttribFormatEXT")) + gpVertexArrayVertexAttribIFormatEXT = (C.GPVERTEXARRAYVERTEXATTRIBIFORMATEXT)(getProcAddr("glVertexArrayVertexAttribIFormatEXT")) + gpVertexArrayVertexAttribIOffsetEXT = (C.GPVERTEXARRAYVERTEXATTRIBIOFFSETEXT)(getProcAddr("glVertexArrayVertexAttribIOffsetEXT")) + gpVertexArrayVertexAttribLFormatEXT = (C.GPVERTEXARRAYVERTEXATTRIBLFORMATEXT)(getProcAddr("glVertexArrayVertexAttribLFormatEXT")) + gpVertexArrayVertexAttribLOffsetEXT = (C.GPVERTEXARRAYVERTEXATTRIBLOFFSETEXT)(getProcAddr("glVertexArrayVertexAttribLOffsetEXT")) + gpVertexArrayVertexAttribOffsetEXT = (C.GPVERTEXARRAYVERTEXATTRIBOFFSETEXT)(getProcAddr("glVertexArrayVertexAttribOffsetEXT")) + gpVertexArrayVertexBindingDivisorEXT = (C.GPVERTEXARRAYVERTEXBINDINGDIVISOREXT)(getProcAddr("glVertexArrayVertexBindingDivisorEXT")) + gpVertexArrayVertexBuffer = (C.GPVERTEXARRAYVERTEXBUFFER)(getProcAddr("glVertexArrayVertexBuffer")) + gpVertexArrayVertexBuffers = (C.GPVERTEXARRAYVERTEXBUFFERS)(getProcAddr("glVertexArrayVertexBuffers")) + gpVertexArrayVertexOffsetEXT = (C.GPVERTEXARRAYVERTEXOFFSETEXT)(getProcAddr("glVertexArrayVertexOffsetEXT")) + gpVertexAttrib1d = (C.GPVERTEXATTRIB1D)(getProcAddr("glVertexAttrib1d")) + if gpVertexAttrib1d == nil { + return errors.New("glVertexAttrib1d") + } + gpVertexAttrib1dv = (C.GPVERTEXATTRIB1DV)(getProcAddr("glVertexAttrib1dv")) + if gpVertexAttrib1dv == nil { + return errors.New("glVertexAttrib1dv") + } + gpVertexAttrib1f = (C.GPVERTEXATTRIB1F)(getProcAddr("glVertexAttrib1f")) + if gpVertexAttrib1f == nil { + return errors.New("glVertexAttrib1f") + } + gpVertexAttrib1fv = (C.GPVERTEXATTRIB1FV)(getProcAddr("glVertexAttrib1fv")) + if gpVertexAttrib1fv == nil { + return errors.New("glVertexAttrib1fv") + } + gpVertexAttrib1s = (C.GPVERTEXATTRIB1S)(getProcAddr("glVertexAttrib1s")) + if gpVertexAttrib1s == nil { + return errors.New("glVertexAttrib1s") + } + gpVertexAttrib1sv = (C.GPVERTEXATTRIB1SV)(getProcAddr("glVertexAttrib1sv")) + if gpVertexAttrib1sv == nil { + return errors.New("glVertexAttrib1sv") + } + gpVertexAttrib2d = (C.GPVERTEXATTRIB2D)(getProcAddr("glVertexAttrib2d")) + if gpVertexAttrib2d == nil { + return errors.New("glVertexAttrib2d") + } + gpVertexAttrib2dv = (C.GPVERTEXATTRIB2DV)(getProcAddr("glVertexAttrib2dv")) + if gpVertexAttrib2dv == nil { + return errors.New("glVertexAttrib2dv") + } + gpVertexAttrib2f = (C.GPVERTEXATTRIB2F)(getProcAddr("glVertexAttrib2f")) + if gpVertexAttrib2f == nil { + return errors.New("glVertexAttrib2f") + } + gpVertexAttrib2fv = (C.GPVERTEXATTRIB2FV)(getProcAddr("glVertexAttrib2fv")) + if gpVertexAttrib2fv == nil { + return errors.New("glVertexAttrib2fv") + } + gpVertexAttrib2s = (C.GPVERTEXATTRIB2S)(getProcAddr("glVertexAttrib2s")) + if gpVertexAttrib2s == nil { + return errors.New("glVertexAttrib2s") + } + gpVertexAttrib2sv = (C.GPVERTEXATTRIB2SV)(getProcAddr("glVertexAttrib2sv")) + if gpVertexAttrib2sv == nil { + return errors.New("glVertexAttrib2sv") + } + gpVertexAttrib3d = (C.GPVERTEXATTRIB3D)(getProcAddr("glVertexAttrib3d")) + if gpVertexAttrib3d == nil { + return errors.New("glVertexAttrib3d") + } + gpVertexAttrib3dv = (C.GPVERTEXATTRIB3DV)(getProcAddr("glVertexAttrib3dv")) + if gpVertexAttrib3dv == nil { + return errors.New("glVertexAttrib3dv") + } + gpVertexAttrib3f = (C.GPVERTEXATTRIB3F)(getProcAddr("glVertexAttrib3f")) + if gpVertexAttrib3f == nil { + return errors.New("glVertexAttrib3f") + } + gpVertexAttrib3fv = (C.GPVERTEXATTRIB3FV)(getProcAddr("glVertexAttrib3fv")) + if gpVertexAttrib3fv == nil { + return errors.New("glVertexAttrib3fv") + } + gpVertexAttrib3s = (C.GPVERTEXATTRIB3S)(getProcAddr("glVertexAttrib3s")) + if gpVertexAttrib3s == nil { + return errors.New("glVertexAttrib3s") + } + gpVertexAttrib3sv = (C.GPVERTEXATTRIB3SV)(getProcAddr("glVertexAttrib3sv")) + if gpVertexAttrib3sv == nil { + return errors.New("glVertexAttrib3sv") + } + gpVertexAttrib4Nbv = (C.GPVERTEXATTRIB4NBV)(getProcAddr("glVertexAttrib4Nbv")) + if gpVertexAttrib4Nbv == nil { + return errors.New("glVertexAttrib4Nbv") + } + gpVertexAttrib4Niv = (C.GPVERTEXATTRIB4NIV)(getProcAddr("glVertexAttrib4Niv")) + if gpVertexAttrib4Niv == nil { + return errors.New("glVertexAttrib4Niv") + } + gpVertexAttrib4Nsv = (C.GPVERTEXATTRIB4NSV)(getProcAddr("glVertexAttrib4Nsv")) + if gpVertexAttrib4Nsv == nil { + return errors.New("glVertexAttrib4Nsv") + } + gpVertexAttrib4Nub = (C.GPVERTEXATTRIB4NUB)(getProcAddr("glVertexAttrib4Nub")) + if gpVertexAttrib4Nub == nil { + return errors.New("glVertexAttrib4Nub") + } + gpVertexAttrib4Nubv = (C.GPVERTEXATTRIB4NUBV)(getProcAddr("glVertexAttrib4Nubv")) + if gpVertexAttrib4Nubv == nil { + return errors.New("glVertexAttrib4Nubv") + } + gpVertexAttrib4Nuiv = (C.GPVERTEXATTRIB4NUIV)(getProcAddr("glVertexAttrib4Nuiv")) + if gpVertexAttrib4Nuiv == nil { + return errors.New("glVertexAttrib4Nuiv") + } + gpVertexAttrib4Nusv = (C.GPVERTEXATTRIB4NUSV)(getProcAddr("glVertexAttrib4Nusv")) + if gpVertexAttrib4Nusv == nil { + return errors.New("glVertexAttrib4Nusv") + } + gpVertexAttrib4bv = (C.GPVERTEXATTRIB4BV)(getProcAddr("glVertexAttrib4bv")) + if gpVertexAttrib4bv == nil { + return errors.New("glVertexAttrib4bv") + } + gpVertexAttrib4d = (C.GPVERTEXATTRIB4D)(getProcAddr("glVertexAttrib4d")) + if gpVertexAttrib4d == nil { + return errors.New("glVertexAttrib4d") + } + gpVertexAttrib4dv = (C.GPVERTEXATTRIB4DV)(getProcAddr("glVertexAttrib4dv")) + if gpVertexAttrib4dv == nil { + return errors.New("glVertexAttrib4dv") + } + gpVertexAttrib4f = (C.GPVERTEXATTRIB4F)(getProcAddr("glVertexAttrib4f")) + if gpVertexAttrib4f == nil { + return errors.New("glVertexAttrib4f") + } + gpVertexAttrib4fv = (C.GPVERTEXATTRIB4FV)(getProcAddr("glVertexAttrib4fv")) + if gpVertexAttrib4fv == nil { + return errors.New("glVertexAttrib4fv") + } + gpVertexAttrib4iv = (C.GPVERTEXATTRIB4IV)(getProcAddr("glVertexAttrib4iv")) + if gpVertexAttrib4iv == nil { + return errors.New("glVertexAttrib4iv") + } + gpVertexAttrib4s = (C.GPVERTEXATTRIB4S)(getProcAddr("glVertexAttrib4s")) + if gpVertexAttrib4s == nil { + return errors.New("glVertexAttrib4s") + } + gpVertexAttrib4sv = (C.GPVERTEXATTRIB4SV)(getProcAddr("glVertexAttrib4sv")) + if gpVertexAttrib4sv == nil { + return errors.New("glVertexAttrib4sv") + } + gpVertexAttrib4ubv = (C.GPVERTEXATTRIB4UBV)(getProcAddr("glVertexAttrib4ubv")) + if gpVertexAttrib4ubv == nil { + return errors.New("glVertexAttrib4ubv") + } + gpVertexAttrib4uiv = (C.GPVERTEXATTRIB4UIV)(getProcAddr("glVertexAttrib4uiv")) + if gpVertexAttrib4uiv == nil { + return errors.New("glVertexAttrib4uiv") + } + gpVertexAttrib4usv = (C.GPVERTEXATTRIB4USV)(getProcAddr("glVertexAttrib4usv")) + if gpVertexAttrib4usv == nil { + return errors.New("glVertexAttrib4usv") + } + gpVertexAttribBinding = (C.GPVERTEXATTRIBBINDING)(getProcAddr("glVertexAttribBinding")) + gpVertexAttribDivisor = (C.GPVERTEXATTRIBDIVISOR)(getProcAddr("glVertexAttribDivisor")) + if gpVertexAttribDivisor == nil { + return errors.New("glVertexAttribDivisor") + } + gpVertexAttribDivisorARB = (C.GPVERTEXATTRIBDIVISORARB)(getProcAddr("glVertexAttribDivisorARB")) + gpVertexAttribFormat = (C.GPVERTEXATTRIBFORMAT)(getProcAddr("glVertexAttribFormat")) + gpVertexAttribFormatNV = (C.GPVERTEXATTRIBFORMATNV)(getProcAddr("glVertexAttribFormatNV")) + gpVertexAttribI1i = (C.GPVERTEXATTRIBI1I)(getProcAddr("glVertexAttribI1i")) + if gpVertexAttribI1i == nil { + return errors.New("glVertexAttribI1i") + } + gpVertexAttribI1iv = (C.GPVERTEXATTRIBI1IV)(getProcAddr("glVertexAttribI1iv")) + if gpVertexAttribI1iv == nil { + return errors.New("glVertexAttribI1iv") + } + gpVertexAttribI1ui = (C.GPVERTEXATTRIBI1UI)(getProcAddr("glVertexAttribI1ui")) + if gpVertexAttribI1ui == nil { + return errors.New("glVertexAttribI1ui") + } + gpVertexAttribI1uiv = (C.GPVERTEXATTRIBI1UIV)(getProcAddr("glVertexAttribI1uiv")) + if gpVertexAttribI1uiv == nil { + return errors.New("glVertexAttribI1uiv") + } + gpVertexAttribI2i = (C.GPVERTEXATTRIBI2I)(getProcAddr("glVertexAttribI2i")) + if gpVertexAttribI2i == nil { + return errors.New("glVertexAttribI2i") + } + gpVertexAttribI2iv = (C.GPVERTEXATTRIBI2IV)(getProcAddr("glVertexAttribI2iv")) + if gpVertexAttribI2iv == nil { + return errors.New("glVertexAttribI2iv") + } + gpVertexAttribI2ui = (C.GPVERTEXATTRIBI2UI)(getProcAddr("glVertexAttribI2ui")) + if gpVertexAttribI2ui == nil { + return errors.New("glVertexAttribI2ui") + } + gpVertexAttribI2uiv = (C.GPVERTEXATTRIBI2UIV)(getProcAddr("glVertexAttribI2uiv")) + if gpVertexAttribI2uiv == nil { + return errors.New("glVertexAttribI2uiv") + } + gpVertexAttribI3i = (C.GPVERTEXATTRIBI3I)(getProcAddr("glVertexAttribI3i")) + if gpVertexAttribI3i == nil { + return errors.New("glVertexAttribI3i") + } + gpVertexAttribI3iv = (C.GPVERTEXATTRIBI3IV)(getProcAddr("glVertexAttribI3iv")) + if gpVertexAttribI3iv == nil { + return errors.New("glVertexAttribI3iv") + } + gpVertexAttribI3ui = (C.GPVERTEXATTRIBI3UI)(getProcAddr("glVertexAttribI3ui")) + if gpVertexAttribI3ui == nil { + return errors.New("glVertexAttribI3ui") + } + gpVertexAttribI3uiv = (C.GPVERTEXATTRIBI3UIV)(getProcAddr("glVertexAttribI3uiv")) + if gpVertexAttribI3uiv == nil { + return errors.New("glVertexAttribI3uiv") + } + gpVertexAttribI4bv = (C.GPVERTEXATTRIBI4BV)(getProcAddr("glVertexAttribI4bv")) + if gpVertexAttribI4bv == nil { + return errors.New("glVertexAttribI4bv") + } + gpVertexAttribI4i = (C.GPVERTEXATTRIBI4I)(getProcAddr("glVertexAttribI4i")) + if gpVertexAttribI4i == nil { + return errors.New("glVertexAttribI4i") + } + gpVertexAttribI4iv = (C.GPVERTEXATTRIBI4IV)(getProcAddr("glVertexAttribI4iv")) + if gpVertexAttribI4iv == nil { + return errors.New("glVertexAttribI4iv") + } + gpVertexAttribI4sv = (C.GPVERTEXATTRIBI4SV)(getProcAddr("glVertexAttribI4sv")) + if gpVertexAttribI4sv == nil { + return errors.New("glVertexAttribI4sv") + } + gpVertexAttribI4ubv = (C.GPVERTEXATTRIBI4UBV)(getProcAddr("glVertexAttribI4ubv")) + if gpVertexAttribI4ubv == nil { + return errors.New("glVertexAttribI4ubv") + } + gpVertexAttribI4ui = (C.GPVERTEXATTRIBI4UI)(getProcAddr("glVertexAttribI4ui")) + if gpVertexAttribI4ui == nil { + return errors.New("glVertexAttribI4ui") + } + gpVertexAttribI4uiv = (C.GPVERTEXATTRIBI4UIV)(getProcAddr("glVertexAttribI4uiv")) + if gpVertexAttribI4uiv == nil { + return errors.New("glVertexAttribI4uiv") + } + gpVertexAttribI4usv = (C.GPVERTEXATTRIBI4USV)(getProcAddr("glVertexAttribI4usv")) + if gpVertexAttribI4usv == nil { + return errors.New("glVertexAttribI4usv") + } + gpVertexAttribIFormat = (C.GPVERTEXATTRIBIFORMAT)(getProcAddr("glVertexAttribIFormat")) + gpVertexAttribIFormatNV = (C.GPVERTEXATTRIBIFORMATNV)(getProcAddr("glVertexAttribIFormatNV")) + gpVertexAttribIPointer = (C.GPVERTEXATTRIBIPOINTER)(getProcAddr("glVertexAttribIPointer")) + if gpVertexAttribIPointer == nil { + return errors.New("glVertexAttribIPointer") + } + gpVertexAttribL1d = (C.GPVERTEXATTRIBL1D)(getProcAddr("glVertexAttribL1d")) + if gpVertexAttribL1d == nil { + return errors.New("glVertexAttribL1d") + } + gpVertexAttribL1dv = (C.GPVERTEXATTRIBL1DV)(getProcAddr("glVertexAttribL1dv")) + if gpVertexAttribL1dv == nil { + return errors.New("glVertexAttribL1dv") + } + gpVertexAttribL1i64NV = (C.GPVERTEXATTRIBL1I64NV)(getProcAddr("glVertexAttribL1i64NV")) + gpVertexAttribL1i64vNV = (C.GPVERTEXATTRIBL1I64VNV)(getProcAddr("glVertexAttribL1i64vNV")) + gpVertexAttribL1ui64ARB = (C.GPVERTEXATTRIBL1UI64ARB)(getProcAddr("glVertexAttribL1ui64ARB")) + gpVertexAttribL1ui64NV = (C.GPVERTEXATTRIBL1UI64NV)(getProcAddr("glVertexAttribL1ui64NV")) + gpVertexAttribL1ui64vARB = (C.GPVERTEXATTRIBL1UI64VARB)(getProcAddr("glVertexAttribL1ui64vARB")) + gpVertexAttribL1ui64vNV = (C.GPVERTEXATTRIBL1UI64VNV)(getProcAddr("glVertexAttribL1ui64vNV")) + gpVertexAttribL2d = (C.GPVERTEXATTRIBL2D)(getProcAddr("glVertexAttribL2d")) + if gpVertexAttribL2d == nil { + return errors.New("glVertexAttribL2d") + } + gpVertexAttribL2dv = (C.GPVERTEXATTRIBL2DV)(getProcAddr("glVertexAttribL2dv")) + if gpVertexAttribL2dv == nil { + return errors.New("glVertexAttribL2dv") + } + gpVertexAttribL2i64NV = (C.GPVERTEXATTRIBL2I64NV)(getProcAddr("glVertexAttribL2i64NV")) + gpVertexAttribL2i64vNV = (C.GPVERTEXATTRIBL2I64VNV)(getProcAddr("glVertexAttribL2i64vNV")) + gpVertexAttribL2ui64NV = (C.GPVERTEXATTRIBL2UI64NV)(getProcAddr("glVertexAttribL2ui64NV")) + gpVertexAttribL2ui64vNV = (C.GPVERTEXATTRIBL2UI64VNV)(getProcAddr("glVertexAttribL2ui64vNV")) + gpVertexAttribL3d = (C.GPVERTEXATTRIBL3D)(getProcAddr("glVertexAttribL3d")) + if gpVertexAttribL3d == nil { + return errors.New("glVertexAttribL3d") + } + gpVertexAttribL3dv = (C.GPVERTEXATTRIBL3DV)(getProcAddr("glVertexAttribL3dv")) + if gpVertexAttribL3dv == nil { + return errors.New("glVertexAttribL3dv") + } + gpVertexAttribL3i64NV = (C.GPVERTEXATTRIBL3I64NV)(getProcAddr("glVertexAttribL3i64NV")) + gpVertexAttribL3i64vNV = (C.GPVERTEXATTRIBL3I64VNV)(getProcAddr("glVertexAttribL3i64vNV")) + gpVertexAttribL3ui64NV = (C.GPVERTEXATTRIBL3UI64NV)(getProcAddr("glVertexAttribL3ui64NV")) + gpVertexAttribL3ui64vNV = (C.GPVERTEXATTRIBL3UI64VNV)(getProcAddr("glVertexAttribL3ui64vNV")) + gpVertexAttribL4d = (C.GPVERTEXATTRIBL4D)(getProcAddr("glVertexAttribL4d")) + if gpVertexAttribL4d == nil { + return errors.New("glVertexAttribL4d") + } + gpVertexAttribL4dv = (C.GPVERTEXATTRIBL4DV)(getProcAddr("glVertexAttribL4dv")) + if gpVertexAttribL4dv == nil { + return errors.New("glVertexAttribL4dv") + } + gpVertexAttribL4i64NV = (C.GPVERTEXATTRIBL4I64NV)(getProcAddr("glVertexAttribL4i64NV")) + gpVertexAttribL4i64vNV = (C.GPVERTEXATTRIBL4I64VNV)(getProcAddr("glVertexAttribL4i64vNV")) + gpVertexAttribL4ui64NV = (C.GPVERTEXATTRIBL4UI64NV)(getProcAddr("glVertexAttribL4ui64NV")) + gpVertexAttribL4ui64vNV = (C.GPVERTEXATTRIBL4UI64VNV)(getProcAddr("glVertexAttribL4ui64vNV")) + gpVertexAttribLFormat = (C.GPVERTEXATTRIBLFORMAT)(getProcAddr("glVertexAttribLFormat")) + gpVertexAttribLFormatNV = (C.GPVERTEXATTRIBLFORMATNV)(getProcAddr("glVertexAttribLFormatNV")) + gpVertexAttribLPointer = (C.GPVERTEXATTRIBLPOINTER)(getProcAddr("glVertexAttribLPointer")) + if gpVertexAttribLPointer == nil { + return errors.New("glVertexAttribLPointer") + } + gpVertexAttribP1ui = (C.GPVERTEXATTRIBP1UI)(getProcAddr("glVertexAttribP1ui")) + if gpVertexAttribP1ui == nil { + return errors.New("glVertexAttribP1ui") + } + gpVertexAttribP1uiv = (C.GPVERTEXATTRIBP1UIV)(getProcAddr("glVertexAttribP1uiv")) + if gpVertexAttribP1uiv == nil { + return errors.New("glVertexAttribP1uiv") + } + gpVertexAttribP2ui = (C.GPVERTEXATTRIBP2UI)(getProcAddr("glVertexAttribP2ui")) + if gpVertexAttribP2ui == nil { + return errors.New("glVertexAttribP2ui") + } + gpVertexAttribP2uiv = (C.GPVERTEXATTRIBP2UIV)(getProcAddr("glVertexAttribP2uiv")) + if gpVertexAttribP2uiv == nil { + return errors.New("glVertexAttribP2uiv") + } + gpVertexAttribP3ui = (C.GPVERTEXATTRIBP3UI)(getProcAddr("glVertexAttribP3ui")) + if gpVertexAttribP3ui == nil { + return errors.New("glVertexAttribP3ui") + } + gpVertexAttribP3uiv = (C.GPVERTEXATTRIBP3UIV)(getProcAddr("glVertexAttribP3uiv")) + if gpVertexAttribP3uiv == nil { + return errors.New("glVertexAttribP3uiv") + } + gpVertexAttribP4ui = (C.GPVERTEXATTRIBP4UI)(getProcAddr("glVertexAttribP4ui")) + if gpVertexAttribP4ui == nil { + return errors.New("glVertexAttribP4ui") + } + gpVertexAttribP4uiv = (C.GPVERTEXATTRIBP4UIV)(getProcAddr("glVertexAttribP4uiv")) + if gpVertexAttribP4uiv == nil { + return errors.New("glVertexAttribP4uiv") + } + gpVertexAttribPointer = (C.GPVERTEXATTRIBPOINTER)(getProcAddr("glVertexAttribPointer")) + if gpVertexAttribPointer == nil { + return errors.New("glVertexAttribPointer") + } + gpVertexBindingDivisor = (C.GPVERTEXBINDINGDIVISOR)(getProcAddr("glVertexBindingDivisor")) + gpVertexFormatNV = (C.GPVERTEXFORMATNV)(getProcAddr("glVertexFormatNV")) + gpViewport = (C.GPVIEWPORT)(getProcAddr("glViewport")) + if gpViewport == nil { + return errors.New("glViewport") + } + gpViewportArrayv = (C.GPVIEWPORTARRAYV)(getProcAddr("glViewportArrayv")) + if gpViewportArrayv == nil { + return errors.New("glViewportArrayv") + } + gpViewportIndexedf = (C.GPVIEWPORTINDEXEDF)(getProcAddr("glViewportIndexedf")) + if gpViewportIndexedf == nil { + return errors.New("glViewportIndexedf") + } + gpViewportIndexedfv = (C.GPVIEWPORTINDEXEDFV)(getProcAddr("glViewportIndexedfv")) + if gpViewportIndexedfv == nil { + return errors.New("glViewportIndexedfv") + } + gpViewportPositionWScaleNV = (C.GPVIEWPORTPOSITIONWSCALENV)(getProcAddr("glViewportPositionWScaleNV")) + gpViewportSwizzleNV = (C.GPVIEWPORTSWIZZLENV)(getProcAddr("glViewportSwizzleNV")) + gpWaitSync = (C.GPWAITSYNC)(getProcAddr("glWaitSync")) + if gpWaitSync == nil { + return errors.New("glWaitSync") + } + gpWaitVkSemaphoreNV = (C.GPWAITVKSEMAPHORENV)(getProcAddr("glWaitVkSemaphoreNV")) + gpWeightPathsNV = (C.GPWEIGHTPATHSNV)(getProcAddr("glWeightPathsNV")) + gpWindowRectanglesEXT = (C.GPWINDOWRECTANGLESEXT)(getProcAddr("glWindowRectanglesEXT")) + return nil +} diff --git a/vendor/github.com/go-gl/gl/v4.1-core/gl/procaddr.go b/vendor/github.com/go-gl/gl/v4.1-core/gl/procaddr.go new file mode 100644 index 0000000..687bae6 --- /dev/null +++ b/vendor/github.com/go-gl/gl/v4.1-core/gl/procaddr.go @@ -0,0 +1,65 @@ +// This file implements GlowGetProcAddress for every supported platform. The +// correct version is chosen automatically based on build tags: +// windows: WGL +// darwin: CGL +// linux freebsd: GLX +// Use of EGL instead of the platform's default (listed above) is made possible +// via the "egl" build tag. +// It is also possible to install your own function outside this package for +// retrieving OpenGL function pointers, to do this see InitWithProcAddrFunc. +package gl + +/* +#cgo windows CFLAGS: -DTAG_WINDOWS +#cgo windows LDFLAGS: -lopengl32 +#cgo darwin CFLAGS: -DTAG_DARWIN +#cgo darwin LDFLAGS: -framework OpenGL +#cgo linux freebsd CFLAGS: -DTAG_POSIX +#cgo linux freebsd LDFLAGS: -lGL +#cgo egl CFLAGS: -DTAG_EGL +#cgo egl LDFLAGS: -lEGL +// Check the EGL tag first as it takes priority over the platform's default +// configuration of WGL/GLX/CGL. +#if defined(TAG_EGL) + #include + #include + void* GlowGetProcAddress_glcore41(const char* name) { + return eglGetProcAddress(name); + } +#elif defined(TAG_WINDOWS) + #define WIN32_LEAN_AND_MEAN 1 + #include + #include + static HMODULE ogl32dll = NULL; + void* GlowGetProcAddress_glcore41(const char* name) { + void* pf = wglGetProcAddress((LPCSTR) name); + if (pf) { + return pf; + } + if (ogl32dll == NULL) { + ogl32dll = LoadLibraryA("opengl32.dll"); + } + return GetProcAddress(ogl32dll, (LPCSTR) name); + } +#elif defined(TAG_DARWIN) + #include + #include + void* GlowGetProcAddress_glcore41(const char* name) { + return dlsym(RTLD_DEFAULT, name); + } +#elif defined(TAG_POSIX) + #include + #include + void* GlowGetProcAddress_glcore41(const char* name) { + return glXGetProcAddress((const GLubyte *) name); + } +#endif +*/ +import "C" +import "unsafe" + +func getProcAddress(namea string) unsafe.Pointer { + cname := C.CString(namea) + defer C.free(unsafe.Pointer(cname)) + return C.GlowGetProcAddress_glcore41(cname) +} diff --git a/vendor/github.com/go-gl/glfw/AUTHORS b/vendor/github.com/go-gl/glfw/AUTHORS new file mode 100644 index 0000000..852c0da --- /dev/null +++ b/vendor/github.com/go-gl/glfw/AUTHORS @@ -0,0 +1,10 @@ +# This is the official list of glfw3-go authors for copyright purposes. + +# Please keep the list sorted. + +Coşku Baş +Dmitri Shuralyov +James Gray +Peter Waller (github:pwaller) +Robin Eklind +Stephen Gutekanst diff --git a/vendor/github.com/go-gl/glfw/LICENSE b/vendor/github.com/go-gl/glfw/LICENSE new file mode 100644 index 0000000..d3afbe2 --- /dev/null +++ b/vendor/github.com/go-gl/glfw/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 The glfw3-go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/go-gl/glfw/v3.1/glfw/glfw/COPYING.txt b/vendor/github.com/go-gl/glfw/v3.1/glfw/glfw/COPYING.txt new file mode 100644 index 0000000..b30c701 --- /dev/null +++ b/vendor/github.com/go-gl/glfw/v3.1/glfw/glfw/COPYING.txt @@ -0,0 +1,22 @@ +Copyright (c) 2002-2006 Marcus Geelnard +Copyright (c) 2006-2010 Camilla Berglund + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would + be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source + distribution. + diff --git a/vendor/github.com/go-gl/glfw/v3.2/glfw/GLFW_C_REVISION.txt b/vendor/github.com/go-gl/glfw/v3.2/glfw/GLFW_C_REVISION.txt new file mode 100644 index 0000000..9a14f86 --- /dev/null +++ b/vendor/github.com/go-gl/glfw/v3.2/glfw/GLFW_C_REVISION.txt @@ -0,0 +1 @@ +999f3556fdd80983b10051746264489f2cb1ef16 diff --git a/vendor/github.com/go-gl/glfw/v3.2/glfw/build.go b/vendor/github.com/go-gl/glfw/v3.2/glfw/build.go new file mode 100644 index 0000000..0f62dc2 --- /dev/null +++ b/vendor/github.com/go-gl/glfw/v3.2/glfw/build.go @@ -0,0 +1,43 @@ +package glfw + +/* +// Windows Build Tags +// ---------------- +// GLFW Options: +#cgo windows CFLAGS: -D_GLFW_WIN32 -Iglfw/deps/mingw + +// Linker Options: +#cgo windows LDFLAGS: -lopengl32 -lgdi32 + + +// Darwin Build Tags +// ---------------- +// GLFW Options: +#cgo darwin CFLAGS: -D_GLFW_COCOA -D_GLFW_USE_CHDIR -D_GLFW_USE_MENUBAR -D_GLFW_USE_RETINA -Wno-deprecated-declarations + +// Linker Options: +#cgo darwin LDFLAGS: -framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo + + +// Linux Build Tags +// ---------------- +// GLFW Options: +#cgo linux,!wayland CFLAGS: -D_GLFW_X11 +#cgo linux,wayland CFLAGS: -D_GLFW_WAYLAND -D_GNU_SOURCE + +// Linker Options: +#cgo linux,!wayland LDFLAGS: -lGL -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -lm -lXinerama -ldl -lrt +#cgo linux,wayland LDFLAGS: -lGL -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon -lm -ldl -lrt + + +// FreeBSD Build Tags +// ---------------- +// GLFW Options: +#cgo freebsd,!wayland CFLAGS: -D_GLFW_X11 -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN +#cgo freebsd,wayland CFLAGS: -D_GLFW_WAYLAND -D_GLFW_HAS_DLOPEN + +// Linker Options: +#cgo freebsd,!wayland LDFLAGS: -lGL -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -lm -lXinerama +#cgo freebsd,wayland LDFLAGS: -lGL -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon -lm +*/ +import "C" diff --git a/vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw.go b/vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw.go new file mode 100644 index 0000000..e7912b7 --- /dev/null +++ b/vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw.go @@ -0,0 +1,11 @@ +package glfw + +/* +#include "glfw/src/context.c" +#include "glfw/src/init.c" +#include "glfw/src/input.c" +#include "glfw/src/monitor.c" +#include "glfw/src/vulkan.c" +#include "glfw/src/window.c" +*/ +import "C" diff --git a/vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw_darwin.go b/vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw_darwin.go new file mode 100644 index 0000000..49e6527 --- /dev/null +++ b/vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw_darwin.go @@ -0,0 +1,13 @@ +package glfw + +/* +#cgo CFLAGS: -x objective-c +#include "glfw/src/cocoa_init.m" +#include "glfw/src/cocoa_joystick.m" +#include "glfw/src/cocoa_monitor.m" +#include "glfw/src/cocoa_window.m" +#include "glfw/src/cocoa_time.c" +#include "glfw/src/posix_tls.c" +#include "glfw/src/nsgl_context.m" +*/ +import "C" diff --git a/vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw_linbsd.go b/vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw_linbsd.go new file mode 100644 index 0000000..90c6cbc --- /dev/null +++ b/vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw_linbsd.go @@ -0,0 +1,30 @@ +// +build linux freebsd + +package glfw + +/* +#ifdef _GLFW_MIR + #include "glfw/src/mir_init.c" + #include "glfw/src/mir_monitor.c" + #include "glfw/src/mir_window.c" +#endif +#ifdef _GLFW_WAYLAND + #include "glfw/src/wl_init.c" + #include "glfw/src/wl_monitor.c" + #include "glfw/src/wl_window.c" + #include "glfw/src/wayland-pointer-constraints-unstable-v1-client-protocol.c" + #include "glfw/src/wayland-relative-pointer-unstable-v1-client-protocol.c" +#endif +#ifdef _GLFW_X11 + #include "glfw/src/x11_init.c" + #include "glfw/src/x11_monitor.c" + #include "glfw/src/x11_window.c" + #include "glfw/src/glx_context.c" +#endif +#include "glfw/src/linux_joystick.c" +#include "glfw/src/posix_time.c" +#include "glfw/src/posix_tls.c" +#include "glfw/src/xkb_unicode.c" +#include "glfw/src/egl_context.c" +*/ +import "C" diff --git a/vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw_windows.go b/vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw_windows.go new file mode 100644 index 0000000..a410ee5 --- /dev/null +++ b/vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw_windows.go @@ -0,0 +1,13 @@ +package glfw + +/* +#include "glfw/src/win32_init.c" +#include "glfw/src/win32_joystick.c" +#include "glfw/src/win32_monitor.c" +#include "glfw/src/win32_time.c" +#include "glfw/src/win32_tls.c" +#include "glfw/src/win32_window.c" +#include "glfw/src/wgl_context.c" +#include "glfw/src/egl_context.c" +*/ +import "C" diff --git a/vendor/github.com/go-gl/glfw/v3.2/glfw/context.go b/vendor/github.com/go-gl/glfw/v3.2/glfw/context.go new file mode 100644 index 0000000..52ccd5d --- /dev/null +++ b/vendor/github.com/go-gl/glfw/v3.2/glfw/context.go @@ -0,0 +1,77 @@ +package glfw + +//#include +//#include "glfw/include/GLFW/glfw3.h" +import "C" + +import ( + "unsafe" +) + +// MakeContextCurrent makes the context of the window current. +// Originally GLFW 3 passes a null pointer to detach the context. +// But since we're using receievers, DetachCurrentContext should +// be used instead. +func (w *Window) MakeContextCurrent() { + C.glfwMakeContextCurrent(w.data) + panicError() +} + +// DetachCurrentContext detaches the current context. +func DetachCurrentContext() { + C.glfwMakeContextCurrent(nil) + panicError() +} + +// GetCurrentContext returns the window whose context is current. +func GetCurrentContext() *Window { + w := C.glfwGetCurrentContext() + panicError() + if w == nil { + return nil + } + return windows.get(w) +} + +// SwapBuffers swaps the front and back buffers of the window. If the +// swap interval is greater than zero, the GPU driver waits the specified number +// of screen updates before swapping the buffers. +func (w *Window) SwapBuffers() { + C.glfwSwapBuffers(w.data) + panicError() +} + +// SwapInterval sets the swap interval for the current context, i.e. the number +// of screen updates to wait before swapping the buffers of a window and +// returning from SwapBuffers. This is sometimes called +// 'vertical synchronization', 'vertical retrace synchronization' or 'vsync'. +// +// Contexts that support either of the WGL_EXT_swap_control_tear and +// GLX_EXT_swap_control_tear extensions also accept negative swap intervals, +// which allow the driver to swap even if a frame arrives a little bit late. +// You can check for the presence of these extensions using +// ExtensionSupported. For more information about swap tearing, +// see the extension specifications. +// +// Some GPU drivers do not honor the requested swap interval, either because of +// user settings that override the request or due to bugs in the driver. +func SwapInterval(interval int) { + C.glfwSwapInterval(C.int(interval)) + panicError() +} + +// ExtensionSupported reports whether the specified OpenGL or context creation +// API extension is supported by the current context. For example, on Windows +// both the OpenGL and WGL extension strings are checked. +// +// As this functions searches one or more extension strings on each call, it is +// recommended that you cache its results if it's going to be used frequently. +// The extension strings will not change during the lifetime of a context, so +// there is no danger in doing this. +func ExtensionSupported(extension string) bool { + e := C.CString(extension) + defer C.free(unsafe.Pointer(e)) + ret := glfwbool(C.glfwExtensionSupported(e)) + panicError() + return ret +} diff --git a/vendor/github.com/go-gl/glfw/v3.2/glfw/error.c b/vendor/github.com/go-gl/glfw/v3.2/glfw/error.c new file mode 100644 index 0000000..cb20a30 --- /dev/null +++ b/vendor/github.com/go-gl/glfw/v3.2/glfw/error.c @@ -0,0 +1,9 @@ +#include "_cgo_export.h" + +void glfwErrorCB(int code, const char *desc) { + goErrorCB(code, (char*)desc); +} + +void glfwSetErrorCallbackCB() { + glfwSetErrorCallback(glfwErrorCB); +} diff --git a/vendor/github.com/go-gl/glfw/v3.2/glfw/error.go b/vendor/github.com/go-gl/glfw/v3.2/glfw/error.go new file mode 100644 index 0000000..d7127c3 --- /dev/null +++ b/vendor/github.com/go-gl/glfw/v3.2/glfw/error.go @@ -0,0 +1,199 @@ +package glfw + +//#include "glfw/include/GLFW/glfw3.h" +//void glfwSetErrorCallbackCB(); +import "C" + +import ( + "fmt" + "log" +) + +// ErrorCode corresponds to an error code. +type ErrorCode int + +// Error codes that are translated to panics and the programmer should not +// expect to handle. +const ( + notInitialized ErrorCode = C.GLFW_NOT_INITIALIZED // GLFW has not been initialized. + noCurrentContext ErrorCode = C.GLFW_NO_CURRENT_CONTEXT // No context is current. + invalidEnum ErrorCode = C.GLFW_INVALID_ENUM // One of the enum parameters for the function was given an invalid enum. + invalidValue ErrorCode = C.GLFW_INVALID_VALUE // One of the parameters for the function was given an invalid value. + outOfMemory ErrorCode = C.GLFW_OUT_OF_MEMORY // A memory allocation failed. + platformError ErrorCode = C.GLFW_PLATFORM_ERROR // A platform-specific error occurred that does not match any of the more specific categories. +) + +const ( + // APIUnavailable is the error code used when GLFW could not find support + // for the requested client API on the system. + // + // The installed graphics driver does not support the requested client API, + // or does not support it via the chosen context creation backend. Below + // are a few examples. + // + // Some pre-installed Windows graphics drivers do not support OpenGL. AMD + // only supports OpenGL ES via EGL, while Nvidia and Intel only supports it + // via a WGL or GLX extension. OS X does not provide OpenGL ES at all. The + // Mesa EGL, OpenGL and OpenGL ES libraries do not interface with the + // Nvidia binary driver. + APIUnavailable ErrorCode = C.GLFW_API_UNAVAILABLE + + // VersionUnavailable is the error code used when the requested OpenGL or + // OpenGL ES (including any requested profile or context option) is not + // available on this machine. + // + // The machine does not support your requirements. If your application is + // sufficiently flexible, downgrade your requirements and try again. + // Otherwise, inform the user that their machine does not match your + // requirements. + // + // Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if + // 5.0 comes out before the 4.x series gets that far, also fail with this + // error and not GLFW_INVALID_VALUE, because GLFW cannot know what future + // versions will exist. + VersionUnavailable ErrorCode = C.GLFW_VERSION_UNAVAILABLE + + // FormatUnavailable is the error code used for both window creation and + // clipboard querying format errors. + // + // If emitted during window creation, the requested pixel format is not + // supported. This means one or more hard constraints did not match any of + // the available pixel formats. If your application is sufficiently + // flexible, downgrade your requirements and try again. Otherwise, inform + // the user that their machine does not match your requirements. + // + // If emitted when querying the clipboard, the contents of the clipboard + // could not be converted to the requested format. You should ignore the + // error or report it to the user, as appropriate. + FormatUnavailable ErrorCode = C.GLFW_FORMAT_UNAVAILABLE +) + +func (e ErrorCode) String() string { + switch e { + case notInitialized: + return "NotInitialized" + case noCurrentContext: + return "NoCurrentContext" + case invalidEnum: + return "InvalidEnum" + case invalidValue: + return "InvalidValue" + case outOfMemory: + return "OutOfMemory" + case platformError: + return "PlatformError" + case APIUnavailable: + return "APIUnavailable" + case VersionUnavailable: + return "VersionUnavailable" + case FormatUnavailable: + return "FormatUnavailable" + default: + return fmt.Sprintf("ErrorCode(%d)", e) + } +} + +// Error holds error code and description. +type Error struct { + Code ErrorCode + Desc string +} + +// Error prints the error code and description in a readable format. +func (e *Error) Error() string { + return fmt.Sprintf("%s: %s", e.Code.String(), e.Desc) +} + +// Note: There are many cryptic caveats to proper error handling here. +// See: https://github.com/go-gl/glfw3/pull/86 + +// Holds the value of the last error. +var lastError = make(chan *Error, 1) + +//export goErrorCB +func goErrorCB(code C.int, desc *C.char) { + flushErrors() + err := &Error{ErrorCode(code), C.GoString(desc)} + select { + case lastError <- err: + default: + fmt.Println("GLFW: An uncaught error has occurred:", err) + fmt.Println("GLFW: Please report this bug in the Go package immediately.") + } +} + +// Set the glfw callback internally +func init() { + C.glfwSetErrorCallbackCB() +} + +// flushErrors is called by Terminate before it actually calls C.glfwTerminate, +// this ensures that any uncaught errors buffered in lastError are printed +// before the program exits. +func flushErrors() { + err := fetchError() + if err != nil { + fmt.Println("GLFW: An uncaught error has occurred:", err) + fmt.Println("GLFW: Please report this bug in the Go package immediately.") + } +} + +// acceptError fetches the next error from the error channel, it accepts only +// errors with one of the given error codes. If any other error is encountered, +// a panic will occur. +// +// Platform errors are always printed, for information why please see: +// +// https://github.com/go-gl/glfw/issues/127 +// +func acceptError(codes ...ErrorCode) error { + // Grab the next error, if there is one. + err := fetchError() + if err == nil { + return nil + } + + // Only if the error has the specific error code accepted by the caller, do + // we return the error. + for _, code := range codes { + if err.Code == code { + return err + } + } + + // The error isn't accepted by the caller. If the error code is not a code + // defined in the GLFW C documentation as a programmer error, then the + // caller should have accepted it. This is effectively a bug in this + // package. + switch err.Code { + case platformError: + log.Println(err) + return nil + case notInitialized, noCurrentContext, invalidEnum, invalidValue, outOfMemory: + panic(err) + default: + fmt.Println("GLFW: An invalid error was not accepted by the caller:", err) + fmt.Println("GLFW: Please report this bug in the Go package immediately.") + panic(err) + } +} + +// panicError is a helper used by functions which expect no errors (except +// programmer errors) to occur. It will panic if it finds any such error. +func panicError() { + err := acceptError() + if err != nil { + panic(err) + } +} + +// fetchError fetches the next error from the error channel, it does not block +// and returns nil if there is no error present. +func fetchError() *Error { + select { + case err := <-lastError: + return err + default: + return nil + } +} diff --git a/vendor/github.com/go-gl/glfw/v3.2/glfw/glfw.go b/vendor/github.com/go-gl/glfw/v3.2/glfw/glfw.go new file mode 100644 index 0000000..1c3c076 --- /dev/null +++ b/vendor/github.com/go-gl/glfw/v3.2/glfw/glfw.go @@ -0,0 +1,76 @@ +package glfw + +//#include "glfw/include/GLFW/glfw3.h" +import "C" + +// Version constants. +const ( + VersionMajor = C.GLFW_VERSION_MAJOR // This is incremented when the API is changed in non-compatible ways. + VersionMinor = C.GLFW_VERSION_MINOR // This is incremented when features are added to the API but it remains backward-compatible. + VersionRevision = C.GLFW_VERSION_REVISION // This is incremented when a bug fix release is made that does not contain any API changes. +) + +// Init initializes the GLFW library. Before most GLFW functions can be used, +// GLFW must be initialized, and before a program terminates GLFW should be +// terminated in order to free any resources allocated during or after +// initialization. +// +// If this function fails, it calls Terminate before returning. If it succeeds, +// you should call Terminate before the program exits. +// +// Additional calls to this function after successful initialization but before +// termination will succeed but will do nothing. +// +// This function may take several seconds to complete on some systems, while on +// other systems it may take only a fraction of a second to complete. +// +// On Mac OS X, this function will change the current directory of the +// application to the Contents/Resources subdirectory of the application's +// bundle, if present. +// +// This function may only be called from the main thread. +func Init() error { + C.glfwInit() + return acceptError(APIUnavailable) +} + +// Terminate destroys all remaining windows, frees any allocated resources and +// sets the library to an uninitialized state. Once this is called, you must +// again call Init successfully before you will be able to use most GLFW +// functions. +// +// If GLFW has been successfully initialized, this function should be called +// before the program exits. If initialization fails, there is no need to call +// this function, as it is called by Init before it returns failure. +// +// This function may only be called from the main thread. +func Terminate() { + flushErrors() + C.glfwTerminate() +} + +// GetVersion retrieves the major, minor and revision numbers of the GLFW +// library. It is intended for when you are using GLFW as a shared library and +// want to ensure that you are using the minimum required version. +// +// This function may be called before Init. +func GetVersion() (major, minor, revision int) { + var ( + maj C.int + min C.int + rev C.int + ) + + C.glfwGetVersion(&maj, &min, &rev) + return int(maj), int(min), int(rev) +} + +// GetVersionString returns a static string generated at compile-time according +// to which configuration macros were defined. This is intended for use when +// submitting bug reports, to allow developers to see which code paths are +// enabled in a binary. +// +// This function may be called before Init. +func GetVersionString() string { + return C.GoString(C.glfwGetVersionString()) +} diff --git a/vendor/github.com/go-gl/glfw/v3.2/glfw/glfw/COPYING.txt b/vendor/github.com/go-gl/glfw/v3.2/glfw/glfw/COPYING.txt new file mode 100644 index 0000000..ad16462 --- /dev/null +++ b/vendor/github.com/go-gl/glfw/v3.2/glfw/glfw/COPYING.txt @@ -0,0 +1,22 @@ +Copyright (c) 2002-2006 Marcus Geelnard +Copyright (c) 2006-2016 Camilla Berglund + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would + be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source + distribution. + diff --git a/vendor/github.com/go-gl/glfw/v3.2/glfw/input.c b/vendor/github.com/go-gl/glfw/v3.2/glfw/input.c new file mode 100644 index 0000000..0b59286 --- /dev/null +++ b/vendor/github.com/go-gl/glfw/v3.2/glfw/input.c @@ -0,0 +1,81 @@ +#include "_cgo_export.h" + +void glfwJoystickCB(int joy, int event) { + goJoystickCB(joy, event); +} + +void glfwMouseButtonCB(GLFWwindow* window, int button, int action, int mods) { + goMouseButtonCB(window, button, action, mods); +} + +void glfwCursorPosCB(GLFWwindow* window, double xpos, double ypos) { + goCursorPosCB(window, xpos, ypos); +} + +void glfwCursorEnterCB(GLFWwindow* window, int entered) { + goCursorEnterCB(window, entered); +} + +void glfwScrollCB(GLFWwindow* window, double xoff, double yoff) { + goScrollCB(window, xoff, yoff); +} + +void glfwKeyCB(GLFWwindow* window, int key, int scancode, int action, int mods) { + goKeyCB(window, key, scancode, action, mods); +} + +void glfwCharCB(GLFWwindow* window, unsigned int character) { + goCharCB(window, character); +} + +void glfwCharModsCB(GLFWwindow* window, unsigned int character, int mods) { + goCharModsCB(window, character, mods); +} + +void glfwDropCB(GLFWwindow* window, int count, const char **names) { + goDropCB(window, count, (char**)names); +} + +void glfwSetJoystickCallbackCB() { + glfwSetJoystickCallback(glfwJoystickCB); +} + +void glfwSetKeyCallbackCB(GLFWwindow *window) { + glfwSetKeyCallback(window, glfwKeyCB); +} + +void glfwSetCharCallbackCB(GLFWwindow *window) { + glfwSetCharCallback(window, glfwCharCB); +} + +void glfwSetCharModsCallbackCB(GLFWwindow *window) { + glfwSetCharModsCallback(window, glfwCharModsCB); +} + +void glfwSetMouseButtonCallbackCB(GLFWwindow *window) { + glfwSetMouseButtonCallback(window, glfwMouseButtonCB); +} + +void glfwSetCursorPosCallbackCB(GLFWwindow *window) { + glfwSetCursorPosCallback(window, glfwCursorPosCB); +} + +void glfwSetCursorEnterCallbackCB(GLFWwindow *window) { + glfwSetCursorEnterCallback(window, glfwCursorEnterCB); +} + +void glfwSetScrollCallbackCB(GLFWwindow *window) { + glfwSetScrollCallback(window, glfwScrollCB); +} + +void glfwSetDropCallbackCB(GLFWwindow *window) { + glfwSetDropCallback(window, glfwDropCB); +} + +float GetAxisAtIndex(float *axis, int i) { + return axis[i]; +} + +unsigned char GetButtonsAtIndex(unsigned char *buttons, int i) { + return buttons[i]; +} diff --git a/vendor/github.com/go-gl/glfw/v3.2/glfw/input.go b/vendor/github.com/go-gl/glfw/v3.2/glfw/input.go new file mode 100644 index 0000000..fd21fed --- /dev/null +++ b/vendor/github.com/go-gl/glfw/v3.2/glfw/input.go @@ -0,0 +1,696 @@ +package glfw + +//#include "glfw/include/GLFW/glfw3.h" +//void glfwSetJoystickCallbackCB(); +//void glfwSetKeyCallbackCB(GLFWwindow *window); +//void glfwSetCharCallbackCB(GLFWwindow *window); +//void glfwSetCharModsCallbackCB(GLFWwindow *window); +//void glfwSetMouseButtonCallbackCB(GLFWwindow *window); +//void glfwSetCursorPosCallbackCB(GLFWwindow *window); +//void glfwSetCursorEnterCallbackCB(GLFWwindow *window); +//void glfwSetScrollCallbackCB(GLFWwindow *window); +//void glfwSetDropCallbackCB(GLFWwindow *window); +//float GetAxisAtIndex(float *axis, int i); +//unsigned char GetButtonsAtIndex(unsigned char *buttons, int i); +import "C" + +import ( + "image" + "image/draw" + "unsafe" +) + +var fJoystickHolder func(joy, event int) + +// Joystick corresponds to a joystick. +type Joystick int + +// Joystick IDs. +const ( + Joystick1 Joystick = C.GLFW_JOYSTICK_1 + Joystick2 Joystick = C.GLFW_JOYSTICK_2 + Joystick3 Joystick = C.GLFW_JOYSTICK_3 + Joystick4 Joystick = C.GLFW_JOYSTICK_4 + Joystick5 Joystick = C.GLFW_JOYSTICK_5 + Joystick6 Joystick = C.GLFW_JOYSTICK_6 + Joystick7 Joystick = C.GLFW_JOYSTICK_7 + Joystick8 Joystick = C.GLFW_JOYSTICK_8 + Joystick9 Joystick = C.GLFW_JOYSTICK_9 + Joystick10 Joystick = C.GLFW_JOYSTICK_10 + Joystick11 Joystick = C.GLFW_JOYSTICK_11 + Joystick12 Joystick = C.GLFW_JOYSTICK_12 + Joystick13 Joystick = C.GLFW_JOYSTICK_13 + Joystick14 Joystick = C.GLFW_JOYSTICK_14 + Joystick15 Joystick = C.GLFW_JOYSTICK_15 + Joystick16 Joystick = C.GLFW_JOYSTICK_16 + JoystickLast Joystick = C.GLFW_JOYSTICK_LAST +) + +// Key corresponds to a keyboard key. +type Key int + +// These key codes are inspired by the USB HID Usage Tables v1.12 (p. 53-60), +// but re-arranged to map to 7-bit ASCII for printable keys (function keys are +// put in the 256+ range). +const ( + KeyUnknown Key = C.GLFW_KEY_UNKNOWN + KeySpace Key = C.GLFW_KEY_SPACE + KeyApostrophe Key = C.GLFW_KEY_APOSTROPHE + KeyComma Key = C.GLFW_KEY_COMMA + KeyMinus Key = C.GLFW_KEY_MINUS + KeyPeriod Key = C.GLFW_KEY_PERIOD + KeySlash Key = C.GLFW_KEY_SLASH + Key0 Key = C.GLFW_KEY_0 + Key1 Key = C.GLFW_KEY_1 + Key2 Key = C.GLFW_KEY_2 + Key3 Key = C.GLFW_KEY_3 + Key4 Key = C.GLFW_KEY_4 + Key5 Key = C.GLFW_KEY_5 + Key6 Key = C.GLFW_KEY_6 + Key7 Key = C.GLFW_KEY_7 + Key8 Key = C.GLFW_KEY_8 + Key9 Key = C.GLFW_KEY_9 + KeySemicolon Key = C.GLFW_KEY_SEMICOLON + KeyEqual Key = C.GLFW_KEY_EQUAL + KeyA Key = C.GLFW_KEY_A + KeyB Key = C.GLFW_KEY_B + KeyC Key = C.GLFW_KEY_C + KeyD Key = C.GLFW_KEY_D + KeyE Key = C.GLFW_KEY_E + KeyF Key = C.GLFW_KEY_F + KeyG Key = C.GLFW_KEY_G + KeyH Key = C.GLFW_KEY_H + KeyI Key = C.GLFW_KEY_I + KeyJ Key = C.GLFW_KEY_J + KeyK Key = C.GLFW_KEY_K + KeyL Key = C.GLFW_KEY_L + KeyM Key = C.GLFW_KEY_M + KeyN Key = C.GLFW_KEY_N + KeyO Key = C.GLFW_KEY_O + KeyP Key = C.GLFW_KEY_P + KeyQ Key = C.GLFW_KEY_Q + KeyR Key = C.GLFW_KEY_R + KeyS Key = C.GLFW_KEY_S + KeyT Key = C.GLFW_KEY_T + KeyU Key = C.GLFW_KEY_U + KeyV Key = C.GLFW_KEY_V + KeyW Key = C.GLFW_KEY_W + KeyX Key = C.GLFW_KEY_X + KeyY Key = C.GLFW_KEY_Y + KeyZ Key = C.GLFW_KEY_Z + KeyLeftBracket Key = C.GLFW_KEY_LEFT_BRACKET + KeyBackslash Key = C.GLFW_KEY_BACKSLASH + KeyRightBracket Key = C.GLFW_KEY_RIGHT_BRACKET + KeyGraveAccent Key = C.GLFW_KEY_GRAVE_ACCENT + KeyWorld1 Key = C.GLFW_KEY_WORLD_1 + KeyWorld2 Key = C.GLFW_KEY_WORLD_2 + KeyEscape Key = C.GLFW_KEY_ESCAPE + KeyEnter Key = C.GLFW_KEY_ENTER + KeyTab Key = C.GLFW_KEY_TAB + KeyBackspace Key = C.GLFW_KEY_BACKSPACE + KeyInsert Key = C.GLFW_KEY_INSERT + KeyDelete Key = C.GLFW_KEY_DELETE + KeyRight Key = C.GLFW_KEY_RIGHT + KeyLeft Key = C.GLFW_KEY_LEFT + KeyDown Key = C.GLFW_KEY_DOWN + KeyUp Key = C.GLFW_KEY_UP + KeyPageUp Key = C.GLFW_KEY_PAGE_UP + KeyPageDown Key = C.GLFW_KEY_PAGE_DOWN + KeyHome Key = C.GLFW_KEY_HOME + KeyEnd Key = C.GLFW_KEY_END + KeyCapsLock Key = C.GLFW_KEY_CAPS_LOCK + KeyScrollLock Key = C.GLFW_KEY_SCROLL_LOCK + KeyNumLock Key = C.GLFW_KEY_NUM_LOCK + KeyPrintScreen Key = C.GLFW_KEY_PRINT_SCREEN + KeyPause Key = C.GLFW_KEY_PAUSE + KeyF1 Key = C.GLFW_KEY_F1 + KeyF2 Key = C.GLFW_KEY_F2 + KeyF3 Key = C.GLFW_KEY_F3 + KeyF4 Key = C.GLFW_KEY_F4 + KeyF5 Key = C.GLFW_KEY_F5 + KeyF6 Key = C.GLFW_KEY_F6 + KeyF7 Key = C.GLFW_KEY_F7 + KeyF8 Key = C.GLFW_KEY_F8 + KeyF9 Key = C.GLFW_KEY_F9 + KeyF10 Key = C.GLFW_KEY_F10 + KeyF11 Key = C.GLFW_KEY_F11 + KeyF12 Key = C.GLFW_KEY_F12 + KeyF13 Key = C.GLFW_KEY_F13 + KeyF14 Key = C.GLFW_KEY_F14 + KeyF15 Key = C.GLFW_KEY_F15 + KeyF16 Key = C.GLFW_KEY_F16 + KeyF17 Key = C.GLFW_KEY_F17 + KeyF18 Key = C.GLFW_KEY_F18 + KeyF19 Key = C.GLFW_KEY_F19 + KeyF20 Key = C.GLFW_KEY_F20 + KeyF21 Key = C.GLFW_KEY_F21 + KeyF22 Key = C.GLFW_KEY_F22 + KeyF23 Key = C.GLFW_KEY_F23 + KeyF24 Key = C.GLFW_KEY_F24 + KeyF25 Key = C.GLFW_KEY_F25 + KeyKP0 Key = C.GLFW_KEY_KP_0 + KeyKP1 Key = C.GLFW_KEY_KP_1 + KeyKP2 Key = C.GLFW_KEY_KP_2 + KeyKP3 Key = C.GLFW_KEY_KP_3 + KeyKP4 Key = C.GLFW_KEY_KP_4 + KeyKP5 Key = C.GLFW_KEY_KP_5 + KeyKP6 Key = C.GLFW_KEY_KP_6 + KeyKP7 Key = C.GLFW_KEY_KP_7 + KeyKP8 Key = C.GLFW_KEY_KP_8 + KeyKP9 Key = C.GLFW_KEY_KP_9 + KeyKPDecimal Key = C.GLFW_KEY_KP_DECIMAL + KeyKPDivide Key = C.GLFW_KEY_KP_DIVIDE + KeyKPMultiply Key = C.GLFW_KEY_KP_MULTIPLY + KeyKPSubtract Key = C.GLFW_KEY_KP_SUBTRACT + KeyKPAdd Key = C.GLFW_KEY_KP_ADD + KeyKPEnter Key = C.GLFW_KEY_KP_ENTER + KeyKPEqual Key = C.GLFW_KEY_KP_EQUAL + KeyLeftShift Key = C.GLFW_KEY_LEFT_SHIFT + KeyLeftControl Key = C.GLFW_KEY_LEFT_CONTROL + KeyLeftAlt Key = C.GLFW_KEY_LEFT_ALT + KeyLeftSuper Key = C.GLFW_KEY_LEFT_SUPER + KeyRightShift Key = C.GLFW_KEY_RIGHT_SHIFT + KeyRightControl Key = C.GLFW_KEY_RIGHT_CONTROL + KeyRightAlt Key = C.GLFW_KEY_RIGHT_ALT + KeyRightSuper Key = C.GLFW_KEY_RIGHT_SUPER + KeyMenu Key = C.GLFW_KEY_MENU + KeyLast Key = C.GLFW_KEY_LAST +) + +// ModifierKey corresponds to a modifier key. +type ModifierKey int + +// Modifier keys. +const ( + ModShift ModifierKey = C.GLFW_MOD_SHIFT + ModControl ModifierKey = C.GLFW_MOD_CONTROL + ModAlt ModifierKey = C.GLFW_MOD_ALT + ModSuper ModifierKey = C.GLFW_MOD_SUPER +) + +// MouseButton corresponds to a mouse button. +type MouseButton int + +// Mouse buttons. +const ( + MouseButton1 MouseButton = C.GLFW_MOUSE_BUTTON_1 + MouseButton2 MouseButton = C.GLFW_MOUSE_BUTTON_2 + MouseButton3 MouseButton = C.GLFW_MOUSE_BUTTON_3 + MouseButton4 MouseButton = C.GLFW_MOUSE_BUTTON_4 + MouseButton5 MouseButton = C.GLFW_MOUSE_BUTTON_5 + MouseButton6 MouseButton = C.GLFW_MOUSE_BUTTON_6 + MouseButton7 MouseButton = C.GLFW_MOUSE_BUTTON_7 + MouseButton8 MouseButton = C.GLFW_MOUSE_BUTTON_8 + MouseButtonLast MouseButton = C.GLFW_MOUSE_BUTTON_LAST + MouseButtonLeft MouseButton = C.GLFW_MOUSE_BUTTON_LEFT + MouseButtonRight MouseButton = C.GLFW_MOUSE_BUTTON_RIGHT + MouseButtonMiddle MouseButton = C.GLFW_MOUSE_BUTTON_MIDDLE +) + +// StandardCursor corresponds to a standard cursor icon. +type StandardCursor int + +// Standard cursors +const ( + ArrowCursor StandardCursor = C.GLFW_ARROW_CURSOR + IBeamCursor StandardCursor = C.GLFW_IBEAM_CURSOR + CrosshairCursor StandardCursor = C.GLFW_CROSSHAIR_CURSOR + HandCursor StandardCursor = C.GLFW_HAND_CURSOR + HResizeCursor StandardCursor = C.GLFW_HRESIZE_CURSOR + VResizeCursor StandardCursor = C.GLFW_VRESIZE_CURSOR +) + +// Action corresponds to a key or button action. +type Action int + +// Action types. +const ( + Release Action = C.GLFW_RELEASE // The key or button was released. + Press Action = C.GLFW_PRESS // The key or button was pressed. + Repeat Action = C.GLFW_REPEAT // The key was held down until it repeated. +) + +// InputMode corresponds to an input mode. +type InputMode int + +// Input modes. +const ( + CursorMode InputMode = C.GLFW_CURSOR // See Cursor mode values + StickyKeysMode InputMode = C.GLFW_STICKY_KEYS // Value can be either 1 or 0 + StickyMouseButtonsMode InputMode = C.GLFW_STICKY_MOUSE_BUTTONS // Value can be either 1 or 0 +) + +// Cursor mode values. +const ( + CursorNormal int = C.GLFW_CURSOR_NORMAL + CursorHidden int = C.GLFW_CURSOR_HIDDEN + CursorDisabled int = C.GLFW_CURSOR_DISABLED +) + +// Cursor represents a cursor. +type Cursor struct { + data *C.GLFWcursor +} + +//export goJoystickCB +func goJoystickCB(joy, event C.int) { + fJoystickHolder(int(joy), int(event)) +} + +//export goMouseButtonCB +func goMouseButtonCB(window unsafe.Pointer, button, action, mods C.int) { + w := windows.get((*C.GLFWwindow)(window)) + w.fMouseButtonHolder(w, MouseButton(button), Action(action), ModifierKey(mods)) +} + +//export goCursorPosCB +func goCursorPosCB(window unsafe.Pointer, xpos, ypos C.double) { + w := windows.get((*C.GLFWwindow)(window)) + w.fCursorPosHolder(w, float64(xpos), float64(ypos)) +} + +//export goCursorEnterCB +func goCursorEnterCB(window unsafe.Pointer, entered C.int) { + w := windows.get((*C.GLFWwindow)(window)) + hasEntered := glfwbool(entered) + w.fCursorEnterHolder(w, hasEntered) +} + +//export goScrollCB +func goScrollCB(window unsafe.Pointer, xoff, yoff C.double) { + w := windows.get((*C.GLFWwindow)(window)) + w.fScrollHolder(w, float64(xoff), float64(yoff)) +} + +//export goKeyCB +func goKeyCB(window unsafe.Pointer, key, scancode, action, mods C.int) { + w := windows.get((*C.GLFWwindow)(window)) + w.fKeyHolder(w, Key(key), int(scancode), Action(action), ModifierKey(mods)) +} + +//export goCharCB +func goCharCB(window unsafe.Pointer, character C.uint) { + w := windows.get((*C.GLFWwindow)(window)) + w.fCharHolder(w, rune(character)) +} + +//export goCharModsCB +func goCharModsCB(window unsafe.Pointer, character C.uint, mods C.int) { + w := windows.get((*C.GLFWwindow)(window)) + w.fCharModsHolder(w, rune(character), ModifierKey(mods)) +} + +//export goDropCB +func goDropCB(window unsafe.Pointer, count C.int, names **C.char) { // TODO: The types of name can be `**C.char` or `unsafe.Pointer`, use whichever is better. + w := windows.get((*C.GLFWwindow)(window)) + namesSlice := make([]string, int(count)) // TODO: Make this better. This part is unfinished, hacky, probably not correct, and not idiomatic. + for i := 0; i < int(count); i++ { // TODO: Make this better. It should be cleaned up and vetted. + var x *C.char // TODO: Make this better. + p := (**C.char)(unsafe.Pointer(uintptr(unsafe.Pointer(names)) + uintptr(i)*unsafe.Sizeof(x))) // TODO: Make this better. + namesSlice[i] = C.GoString(*p) // TODO: Make this better. + } + w.fDropHolder(w, namesSlice) +} + +// GetInputMode returns the value of an input option of the window. +func (w *Window) GetInputMode(mode InputMode) int { + ret := int(C.glfwGetInputMode(w.data, C.int(mode))) + panicError() + return ret +} + +// SetInputMode sets an input option for the window. +func (w *Window) SetInputMode(mode InputMode, value int) { + C.glfwSetInputMode(w.data, C.int(mode), C.int(value)) + panicError() +} + +// GetKey returns the last reported state of a keyboard key. The returned state +// is one of Press or Release. The higher-level state Repeat is only reported to +// the key callback. +// +// If the StickyKeys input mode is enabled, this function returns Press the first +// time you call this function after a key has been pressed, even if the key has +// already been released. +// +// The key functions deal with physical keys, with key tokens named after their +// use on the standard US keyboard layout. If you want to input text, use the +// Unicode character callback instead. +func (w *Window) GetKey(key Key) Action { + ret := Action(C.glfwGetKey(w.data, C.int(key))) + panicError() + return ret +} + +// GetKeyName returns the localized name of the specified printable key. +// +// If the key is glfw.KeyUnknown, the scancode is used, otherwise the scancode is ignored. +func GetKeyName(key Key, scancode int) string { + ret := C.glfwGetKeyName(C.int(key), C.int(scancode)) + panicError() + return C.GoString(ret) +} + +// GetMouseButton returns the last state reported for the specified mouse button. +// +// If the StickyMouseButtons input mode is enabled, this function returns Press +// the first time you call this function after a mouse button has been pressed, +// even if the mouse button has already been released. +func (w *Window) GetMouseButton(button MouseButton) Action { + ret := Action(C.glfwGetMouseButton(w.data, C.int(button))) + panicError() + return ret +} + +// GetCursorPos returns the last reported position of the cursor. +// +// If the cursor is disabled (with CursorDisabled) then the cursor position is +// unbounded and limited only by the minimum and maximum values of a double. +// +// The coordinate can be converted to their integer equivalents with the floor +// function. Casting directly to an integer type works for positive coordinates, +// but fails for negative ones. +func (w *Window) GetCursorPos() (x, y float64) { + var xpos, ypos C.double + C.glfwGetCursorPos(w.data, &xpos, &ypos) + panicError() + return float64(xpos), float64(ypos) +} + +// SetCursorPos sets the position of the cursor. The specified window must +// be focused. If the window does not have focus when this function is called, +// it fails silently. +// +// If the cursor is disabled (with CursorDisabled) then the cursor position is +// unbounded and limited only by the minimum and maximum values of a double. +func (w *Window) SetCursorPos(xpos, ypos float64) { + C.glfwSetCursorPos(w.data, C.double(xpos), C.double(ypos)) + panicError() +} + +// CreateCursor creates a new custom cursor image that can be set for a window with SetCursor. +// The cursor can be destroyed with Destroy. Any remaining cursors are destroyed by Terminate. +// +// The image is ideally provided in the form of *image.NRGBA. +// The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight +// bits per channel with the red channel first. They are arranged canonically +// as packed sequential rows, starting from the top-left corner. If the image +// type is not *image.NRGBA, it will be converted to it. +// +// The cursor hotspot is specified in pixels, relative to the upper-left corner of the cursor image. +// Like all other coordinate systems in GLFW, the X-axis points to the right and the Y-axis points down. +func CreateCursor(img image.Image, xhot, yhot int) *Cursor { + var imgC C.GLFWimage + var pixels []uint8 + b := img.Bounds() + + switch img := img.(type) { + case *image.NRGBA: + pixels = img.Pix + default: + m := image.NewNRGBA(image.Rect(0, 0, b.Dx(), b.Dy())) + draw.Draw(m, m.Bounds(), img, b.Min, draw.Src) + pixels = m.Pix + } + + pix, free := bytes(pixels) + + imgC.width = C.int(b.Dx()) + imgC.height = C.int(b.Dy()) + imgC.pixels = (*C.uchar)(pix) + + c := C.glfwCreateCursor(&imgC, C.int(xhot), C.int(yhot)) + + free() + panicError() + + return &Cursor{c} +} + +// CreateStandardCursor returns a cursor with a standard shape, +// that can be set for a window with SetCursor. +func CreateStandardCursor(shape StandardCursor) *Cursor { + c := C.glfwCreateStandardCursor(C.int(shape)) + panicError() + return &Cursor{c} +} + +// Destroy destroys a cursor previously created with CreateCursor. +// Any remaining cursors will be destroyed by Terminate. +func (c *Cursor) Destroy() { + C.glfwDestroyCursor(c.data) + panicError() +} + +// SetCursor sets the cursor image to be used when the cursor is over the client area +// of the specified window. The set cursor will only be visible when the cursor mode of the +// window is CursorNormal. +// +// On some platforms, the set cursor may not be visible unless the window also has input focus. +func (w *Window) SetCursor(c *Cursor) { + if c == nil { + C.glfwSetCursor(w.data, nil) + } else { + C.glfwSetCursor(w.data, c.data) + } + panicError() +} + +// JoystickCallback is the joystick configuration callback. +type JoystickCallback func(joy, event int) + +// SetJoystickCallback sets the joystick configuration callback, or removes the +// currently set callback. This is called when a joystick is connected to or +// disconnected from the system. +func SetJoystickCallback(cbfun JoystickCallback) (previous JoystickCallback) { + previous = fJoystickHolder + fJoystickHolder = cbfun + if cbfun == nil { + C.glfwSetJoystickCallback(nil) + } else { + C.glfwSetJoystickCallbackCB() + } + panicError() + return previous +} + +// KeyCallback is the key callback. +type KeyCallback func(w *Window, key Key, scancode int, action Action, mods ModifierKey) + +// SetKeyCallback sets the key callback which is called when a key is pressed, +// repeated or released. +// +// The key functions deal with physical keys, with layout independent key tokens +// named after their values in the standard US keyboard layout. If you want to +// input text, use the SetCharCallback instead. +// +// When a window loses focus, it will generate synthetic key release events for +// all pressed keys. You can tell these events from user-generated events by the +// fact that the synthetic ones are generated after the window has lost focus, +// i.e. Focused will be false and the focus callback will have already been +// called. +func (w *Window) SetKeyCallback(cbfun KeyCallback) (previous KeyCallback) { + previous = w.fKeyHolder + w.fKeyHolder = cbfun + if cbfun == nil { + C.glfwSetKeyCallback(w.data, nil) + } else { + C.glfwSetKeyCallbackCB(w.data) + } + panicError() + return previous +} + +// CharCallback is the character callback. +type CharCallback func(w *Window, char rune) + +// SetCharCallback sets the character callback which is called when a +// Unicode character is input. +// +// The character callback is intended for Unicode text input. As it deals with +// characters, it is keyboard layout dependent, whereas the +// key callback is not. Characters do not map 1:1 +// to physical keys, as a key may produce zero, one or more characters. If you +// want to know whether a specific physical key was pressed or released, see +// the key callback instead. +// +// The character callback behaves as system text input normally does and will +// not be called if modifier keys are held down that would prevent normal text +// input on that platform, for example a Super (Command) key on OS X or Alt key +// on Windows. There is a character with modifiers callback that receives these events. +func (w *Window) SetCharCallback(cbfun CharCallback) (previous CharCallback) { + previous = w.fCharHolder + w.fCharHolder = cbfun + if cbfun == nil { + C.glfwSetCharCallback(w.data, nil) + } else { + C.glfwSetCharCallbackCB(w.data) + } + panicError() + return previous +} + +// CharModsCallback is the character with modifiers callback. +type CharModsCallback func(w *Window, char rune, mods ModifierKey) + +// SetCharModsCallback sets the character with modifiers callback which is called when a +// Unicode character is input regardless of what modifier keys are used. +// +// The character with modifiers callback is intended for implementing custom +// Unicode character input. For regular Unicode text input, see the +// character callback. Like the character callback, the character with modifiers callback +// deals with characters and is keyboard layout dependent. Characters do not +// map 1:1 to physical keys, as a key may produce zero, one or more characters. +// If you want to know whether a specific physical key was pressed or released, +// see the key callback instead. +func (w *Window) SetCharModsCallback(cbfun CharModsCallback) (previous CharModsCallback) { + previous = w.fCharModsHolder + w.fCharModsHolder = cbfun + if cbfun == nil { + C.glfwSetCharModsCallback(w.data, nil) + } else { + C.glfwSetCharModsCallbackCB(w.data) + } + panicError() + return previous +} + +// MouseButtonCallback is the mouse button callback. +type MouseButtonCallback func(w *Window, button MouseButton, action Action, mod ModifierKey) + +// SetMouseButtonCallback sets the mouse button callback which is called when a +// mouse button is pressed or released. +// +// When a window loses focus, it will generate synthetic mouse button release +// events for all pressed mouse buttons. You can tell these events from +// user-generated events by the fact that the synthetic ones are generated after +// the window has lost focus, i.e. Focused will be false and the focus +// callback will have already been called. +func (w *Window) SetMouseButtonCallback(cbfun MouseButtonCallback) (previous MouseButtonCallback) { + previous = w.fMouseButtonHolder + w.fMouseButtonHolder = cbfun + if cbfun == nil { + C.glfwSetMouseButtonCallback(w.data, nil) + } else { + C.glfwSetMouseButtonCallbackCB(w.data) + } + panicError() + return previous +} + +// CursorPosCallback the cursor position callback. +type CursorPosCallback func(w *Window, xpos float64, ypos float64) + +// SetCursorPosCallback sets the cursor position callback which is called +// when the cursor is moved. The callback is provided with the position relative +// to the upper-left corner of the client area of the window. +func (w *Window) SetCursorPosCallback(cbfun CursorPosCallback) (previous CursorPosCallback) { + previous = w.fCursorPosHolder + w.fCursorPosHolder = cbfun + if cbfun == nil { + C.glfwSetCursorPosCallback(w.data, nil) + } else { + C.glfwSetCursorPosCallbackCB(w.data) + } + panicError() + return previous +} + +// CursorEnterCallback is the cursor boundary crossing callback. +type CursorEnterCallback func(w *Window, entered bool) + +// SetCursorEnterCallback the cursor boundary crossing callback which is called +// when the cursor enters or leaves the client area of the window. +func (w *Window) SetCursorEnterCallback(cbfun CursorEnterCallback) (previous CursorEnterCallback) { + previous = w.fCursorEnterHolder + w.fCursorEnterHolder = cbfun + if cbfun == nil { + C.glfwSetCursorEnterCallback(w.data, nil) + } else { + C.glfwSetCursorEnterCallbackCB(w.data) + } + panicError() + return previous +} + +// ScrollCallback is the scroll callback. +type ScrollCallback func(w *Window, xoff float64, yoff float64) + +// SetScrollCallback sets the scroll callback which is called when a scrolling +// device is used, such as a mouse wheel or scrolling area of a touchpad. +func (w *Window) SetScrollCallback(cbfun ScrollCallback) (previous ScrollCallback) { + previous = w.fScrollHolder + w.fScrollHolder = cbfun + if cbfun == nil { + C.glfwSetScrollCallback(w.data, nil) + } else { + C.glfwSetScrollCallbackCB(w.data) + } + panicError() + return previous +} + +// DropCallback is the drop callback. +type DropCallback func(w *Window, names []string) + +// SetDropCallback sets the drop callback which is called when an object +// is dropped over the window. +func (w *Window) SetDropCallback(cbfun DropCallback) (previous DropCallback) { + previous = w.fDropHolder + w.fDropHolder = cbfun + if cbfun == nil { + C.glfwSetDropCallback(w.data, nil) + } else { + C.glfwSetDropCallbackCB(w.data) + } + panicError() + return previous +} + +// JoystickPresent reports whether the specified joystick is present. +func JoystickPresent(joy Joystick) bool { + ret := glfwbool(C.glfwJoystickPresent(C.int(joy))) + panicError() + return ret +} + +// GetJoystickAxes returns a slice of axis values. +func GetJoystickAxes(joy Joystick) []float32 { + var length int + + axis := C.glfwGetJoystickAxes(C.int(joy), (*C.int)(unsafe.Pointer(&length))) + panicError() + if axis == nil { + return nil + } + + a := make([]float32, length) + for i := 0; i < length; i++ { + a[i] = float32(C.GetAxisAtIndex(axis, C.int(i))) + } + return a +} + +// GetJoystickButtons returns a slice of button values. +func GetJoystickButtons(joy Joystick) []byte { + var length int + + buttons := C.glfwGetJoystickButtons(C.int(joy), (*C.int)(unsafe.Pointer(&length))) + panicError() + if buttons == nil { + return nil + } + + b := make([]byte, length) + for i := 0; i < length; i++ { + b[i] = byte(C.GetButtonsAtIndex(buttons, C.int(i))) + } + return b +} + +// GetJoystickName returns the name, encoded as UTF-8, of the specified joystick. +func GetJoystickName(joy Joystick) string { + jn := C.glfwGetJoystickName(C.int(joy)) + panicError() + return C.GoString(jn) +} diff --git a/vendor/github.com/go-gl/glfw/v3.2/glfw/monitor.c b/vendor/github.com/go-gl/glfw/v3.2/glfw/monitor.c new file mode 100644 index 0000000..6ae35aa --- /dev/null +++ b/vendor/github.com/go-gl/glfw/v3.2/glfw/monitor.c @@ -0,0 +1,25 @@ +#include "_cgo_export.h" + +GLFWmonitor *GetMonitorAtIndex(GLFWmonitor **monitors, int index) { + return monitors[index]; +} + +GLFWvidmode GetVidmodeAtIndex(GLFWvidmode *vidmodes, int index) { + return vidmodes[index]; +} + +void glfwMonitorCB(GLFWmonitor* monitor, int event) { + goMonitorCB(monitor, event); +} + +void glfwSetMonitorCallbackCB() { + glfwSetMonitorCallback(glfwMonitorCB); +} + +unsigned int GetGammaAtIndex(unsigned short *color, int i) { + return color[i]; +} + +void SetGammaAtIndex(unsigned short *color, int i, unsigned short value) { + color[i] = value; +} diff --git a/vendor/github.com/go-gl/glfw/v3.2/glfw/monitor.go b/vendor/github.com/go-gl/glfw/v3.2/glfw/monitor.go new file mode 100644 index 0000000..5428189 --- /dev/null +++ b/vendor/github.com/go-gl/glfw/v3.2/glfw/monitor.go @@ -0,0 +1,208 @@ +package glfw + +//#include "glfw/include/GLFW/glfw3.h" +//GLFWmonitor* GetMonitorAtIndex(GLFWmonitor **monitors, int index); +//GLFWvidmode GetVidmodeAtIndex(GLFWvidmode *vidmodes, int index); +//void glfwSetMonitorCallbackCB(); +//unsigned int GetGammaAtIndex(unsigned short *color, int i); +//void SetGammaAtIndex(unsigned short *color, int i, unsigned short value); +import "C" + +import ( + "unsafe" +) + +// Monitor represents a monitor. +type Monitor struct { + data *C.GLFWmonitor +} + +// MonitorEvent corresponds to a monitor configuration event. +type MonitorEvent int + +// GammaRamp describes the gamma ramp for a monitor. +type GammaRamp struct { + Red []uint16 // A slice of value describing the response of the red channel. + Green []uint16 // A slice of value describing the response of the green channel. + Blue []uint16 // A slice of value describing the response of the blue channel. +} + +// Monitor events. +const ( + Connected MonitorEvent = C.GLFW_CONNECTED + Disconnected MonitorEvent = C.GLFW_DISCONNECTED +) + +// VidMode describes a single video mode. +type VidMode struct { + Width int // The width, in pixels, of the video mode. + Height int // The height, in pixels, of the video mode. + RedBits int // The bit depth of the red channel of the video mode. + GreenBits int // The bit depth of the green channel of the video mode. + BlueBits int // The bit depth of the blue channel of the video mode. + RefreshRate int // The refresh rate, in Hz, of the video mode. +} + +var fMonitorHolder func(monitor *Monitor, event MonitorEvent) + +//export goMonitorCB +func goMonitorCB(monitor unsafe.Pointer, event C.int) { + fMonitorHolder(&Monitor{(*C.GLFWmonitor)(monitor)}, MonitorEvent(event)) +} + +// GetMonitors returns a slice of handles for all currently connected monitors. +func GetMonitors() []*Monitor { + var length int + + mC := C.glfwGetMonitors((*C.int)(unsafe.Pointer(&length))) + panicError() + if mC == nil { + return nil + } + + m := make([]*Monitor, length) + + for i := 0; i < length; i++ { + m[i] = &Monitor{C.GetMonitorAtIndex(mC, C.int(i))} + } + + return m +} + +// GetPrimaryMonitor returns the primary monitor. This is usually the monitor +// where elements like the Windows task bar or the OS X menu bar is located. +func GetPrimaryMonitor() *Monitor { + m := C.glfwGetPrimaryMonitor() + panicError() + if m == nil { + return nil + } + return &Monitor{m} +} + +// GetPos returns the position, in screen coordinates, of the upper-left +// corner of the monitor. +func (m *Monitor) GetPos() (x, y int) { + var xpos, ypos C.int + C.glfwGetMonitorPos(m.data, &xpos, &ypos) + panicError() + return int(xpos), int(ypos) +} + +// GetPhysicalSize returns the size, in millimetres, of the display area of the +// monitor. +// +// Note: Some operating systems do not provide accurate information, either +// because the monitor's EDID data is incorrect, or because the driver does not +// report it accurately. +func (m *Monitor) GetPhysicalSize() (width, height int) { + var wi, h C.int + C.glfwGetMonitorPhysicalSize(m.data, &wi, &h) + panicError() + return int(wi), int(h) +} + +// GetName returns a human-readable name of the monitor, encoded as UTF-8. +func (m *Monitor) GetName() string { + mn := C.glfwGetMonitorName(m.data) + panicError() + if mn == nil { + return "" + } + return C.GoString(mn) +} + +// SetMonitorCallback sets the monitor configuration callback, or removes the +// currently set callback. This is called when a monitor is connected to or +// disconnected from the system. +func SetMonitorCallback(cbfun func(monitor *Monitor, event MonitorEvent)) { + if cbfun == nil { + C.glfwSetMonitorCallback(nil) + } else { + fMonitorHolder = cbfun + C.glfwSetMonitorCallbackCB() + } + panicError() +} + +// GetVideoModes returns an array of all video modes supported by the monitor. +// The returned array is sorted in ascending order, first by color bit depth +// (the sum of all channel depths) and then by resolution area (the product of +// width and height). +func (m *Monitor) GetVideoModes() []*VidMode { + var length int + + vC := C.glfwGetVideoModes(m.data, (*C.int)(unsafe.Pointer(&length))) + panicError() + if vC == nil { + return nil + } + + v := make([]*VidMode, length) + + for i := 0; i < length; i++ { + t := C.GetVidmodeAtIndex(vC, C.int(i)) + v[i] = &VidMode{int(t.width), int(t.height), int(t.redBits), int(t.greenBits), int(t.blueBits), int(t.refreshRate)} + } + + return v +} + +// GetVideoMode returns the current video mode of the monitor. If you +// are using a full screen window, the return value will therefore depend on +// whether it is focused. +func (m *Monitor) GetVideoMode() *VidMode { + t := C.glfwGetVideoMode(m.data) + if t == nil { + return nil + } + panicError() + return &VidMode{int(t.width), int(t.height), int(t.redBits), int(t.greenBits), int(t.blueBits), int(t.refreshRate)} +} + +// SetGamma generates a 256-element gamma ramp from the specified exponent and then calls +// SetGamma with it. +func (m *Monitor) SetGamma(gamma float32) { + C.glfwSetGamma(m.data, C.float(gamma)) + panicError() +} + +// GetGammaRamp retrieves the current gamma ramp of the monitor. +func (m *Monitor) GetGammaRamp() *GammaRamp { + var ramp GammaRamp + + rampC := C.glfwGetGammaRamp(m.data) + panicError() + if rampC == nil { + return nil + } + + length := int(rampC.size) + ramp.Red = make([]uint16, length) + ramp.Green = make([]uint16, length) + ramp.Blue = make([]uint16, length) + + for i := 0; i < length; i++ { + ramp.Red[i] = uint16(C.GetGammaAtIndex(rampC.red, C.int(i))) + ramp.Green[i] = uint16(C.GetGammaAtIndex(rampC.green, C.int(i))) + ramp.Blue[i] = uint16(C.GetGammaAtIndex(rampC.blue, C.int(i))) + } + + return &ramp +} + +// SetGammaRamp sets the current gamma ramp for the monitor. +func (m *Monitor) SetGammaRamp(ramp *GammaRamp) { + var rampC C.GLFWgammaramp + + length := len(ramp.Red) + + for i := 0; i < length; i++ { + C.SetGammaAtIndex(rampC.red, C.int(i), C.ushort(ramp.Red[i])) + C.SetGammaAtIndex(rampC.green, C.int(i), C.ushort(ramp.Green[i])) + C.SetGammaAtIndex(rampC.blue, C.int(i), C.ushort(ramp.Blue[i])) + } + + C.glfwSetGammaRamp(m.data, &rampC) + panicError() +} diff --git a/vendor/github.com/go-gl/glfw/v3.2/glfw/native_darwin.go b/vendor/github.com/go-gl/glfw/v3.2/glfw/native_darwin.go new file mode 100644 index 0000000..12be6ee --- /dev/null +++ b/vendor/github.com/go-gl/glfw/v3.2/glfw/native_darwin.go @@ -0,0 +1,39 @@ +package glfw + +/* +#define GLFW_EXPOSE_NATIVE_COCOA +#define GLFW_EXPOSE_NATIVE_NSGL +#include "glfw/include/GLFW/glfw3.h" +#include "glfw/include/GLFW/glfw3native.h" + +// workaround wrappers needed due to a cgo and/or LLVM bug. +// See: https://github.com/go-gl/glfw/issues/136 +void *workaround_glfwGetCocoaWindow(GLFWwindow *w) { + return (void *)glfwGetCocoaWindow(w); +} +void *workaround_glfwGetNSGLContext(GLFWwindow *w) { + return (void *)glfwGetNSGLContext(w); +} +*/ +import "C" + +// GetCocoaMonitor returns the CGDirectDisplayID of the monitor. +func (m *Monitor) GetCocoaMonitor() uintptr { + ret := uintptr(C.glfwGetCocoaMonitor(m.data)) + panicError() + return ret +} + +// GetCocoaWindow returns the NSWindow of the window. +func (w *Window) GetCocoaWindow() uintptr { + ret := uintptr(C.workaround_glfwGetCocoaWindow(w.data)) + panicError() + return ret +} + +// GetNSGLContext returns the NSOpenGLContext of the window. +func (w *Window) GetNSGLContext() uintptr { + ret := uintptr(C.workaround_glfwGetNSGLContext(w.data)) + panicError() + return ret +} diff --git a/vendor/github.com/go-gl/glfw/v3.2/glfw/native_linbsd.go b/vendor/github.com/go-gl/glfw/v3.2/glfw/native_linbsd.go new file mode 100644 index 0000000..f16ee8f --- /dev/null +++ b/vendor/github.com/go-gl/glfw/v3.2/glfw/native_linbsd.go @@ -0,0 +1,50 @@ +// +build linux,!wayland freebsd,!wayland + +package glfw + +//#define GLFW_EXPOSE_NATIVE_X11 +//#define GLFW_EXPOSE_NATIVE_GLX +//#include "glfw/include/GLFW/glfw3.h" +//#include "glfw/include/GLFW/glfw3native.h" +import "C" + +func GetX11Display() *C.Display { + ret := C.glfwGetX11Display() + panicError() + return ret +} + +// GetX11Adapter returns the RRCrtc of the monitor. +func (m *Monitor) GetX11Adapter() C.RRCrtc { + ret := C.glfwGetX11Adapter(m.data) + panicError() + return ret +} + +// GetX11Monitor returns the RROutput of the monitor. +func (m *Monitor) GetX11Monitor() C.RROutput { + ret := C.glfwGetX11Monitor(m.data) + panicError() + return ret +} + +// GetX11Window returns the Window of the window. +func (w *Window) GetX11Window() C.Window { + ret := C.glfwGetX11Window(w.data) + panicError() + return ret +} + +// GetGLXContext returns the GLXContext of the window. +func (w *Window) GetGLXContext() C.GLXContext { + ret := C.glfwGetGLXContext(w.data) + panicError() + return ret +} + +// GetGLXWindow returns the GLXWindow of the window. +func (w *Window) GetGLXWindow() C.GLXWindow { + ret := C.glfwGetGLXWindow(w.data) + panicError() + return ret +} diff --git a/vendor/github.com/go-gl/glfw/v3.2/glfw/native_windows.go b/vendor/github.com/go-gl/glfw/v3.2/glfw/native_windows.go new file mode 100644 index 0000000..5ee0d36 --- /dev/null +++ b/vendor/github.com/go-gl/glfw/v3.2/glfw/native_windows.go @@ -0,0 +1,35 @@ +package glfw + +//#define GLFW_EXPOSE_NATIVE_WIN32 +//#define GLFW_EXPOSE_NATIVE_WGL +//#include "glfw/include/GLFW/glfw3.h" +//#include "glfw/include/GLFW/glfw3native.h" +import "C" + +// GetWin32Adapter returns the adapter device name of the monitor. +func (m *Monitor) GetWin32Adapter() string { + ret := C.glfwGetWin32Adapter(m.data) + panicError() + return C.GoString(ret) +} + +// GetWin32Monitor returns the display device name of the monitor. +func (m *Monitor) GetWin32Monitor() string { + ret := C.glfwGetWin32Monitor(m.data) + panicError() + return C.GoString(ret) +} + +// GetWin32Window returns the HWND of the window. +func (w *Window) GetWin32Window() C.HWND { + ret := C.glfwGetWin32Window(w.data) + panicError() + return ret +} + +// GetWGLContext returns the HGLRC of the window. +func (w *Window) GetWGLContext() C.HGLRC { + ret := C.glfwGetWGLContext(w.data) + panicError() + return ret +} diff --git a/vendor/github.com/go-gl/glfw/v3.2/glfw/time.go b/vendor/github.com/go-gl/glfw/v3.2/glfw/time.go new file mode 100644 index 0000000..f3d93cb --- /dev/null +++ b/vendor/github.com/go-gl/glfw/v3.2/glfw/time.go @@ -0,0 +1,41 @@ +package glfw + +//#include "glfw/include/GLFW/glfw3.h" +import "C" + +// GetTime returns the value of the GLFW timer. Unless the timer has been set +// using SetTime, the timer measures time elapsed since GLFW was initialized. +// +// The resolution of the timer is system dependent, but is usually on the order +// of a few micro- or nanoseconds. It uses the highest-resolution monotonic time +// source on each supported platform. +func GetTime() float64 { + ret := float64(C.glfwGetTime()) + panicError() + return ret +} + +// SetTime sets the value of the GLFW timer. It then continues to count up from +// that value. +// +// The resolution of the timer is system dependent, but is usually on the order +// of a few micro- or nanoseconds. It uses the highest-resolution monotonic time +// source on each supported platform. +func SetTime(time float64) { + C.glfwSetTime(C.double(time)) + panicError() +} + +// GetTimerFrequency returns frequency of the timer, in Hz, or zero if an error occurred. +func GetTimerFrequency() uint64 { + ret := uint64(C.glfwGetTimerFrequency()) + panicError() + return ret +} + +// GetTimerValue returns the current value of the raw timer, measured in 1 / frequency seconds. +func GetTimerValue() uint64 { + ret := uint64(C.glfwGetTimerValue()) + panicError() + return ret +} diff --git a/vendor/github.com/go-gl/glfw/v3.2/glfw/util.go b/vendor/github.com/go-gl/glfw/v3.2/glfw/util.go new file mode 100644 index 0000000..d5be751 --- /dev/null +++ b/vendor/github.com/go-gl/glfw/v3.2/glfw/util.go @@ -0,0 +1,37 @@ +package glfw + +//#include +//#include "glfw/include/GLFW/glfw3.h" +import "C" + +import ( + "reflect" + "unsafe" +) + +func glfwbool(b C.int) bool { + if b == C.GL_TRUE { + return true + } + return false +} + +func bytes(origin []byte) (pointer *uint8, free func()) { + n := len(origin) + + if n == 0 { + return nil, func() {} + } + + data := C.malloc(C.size_t(n)) + + dataSlice := *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{ + Data: uintptr(data), + Len: n, + Cap: n, + })) + + copy(dataSlice, origin) + + return &dataSlice[0], func() { C.free(data) } +} diff --git a/vendor/github.com/go-gl/glfw/v3.2/glfw/vulkan.go b/vendor/github.com/go-gl/glfw/v3.2/glfw/vulkan.go new file mode 100644 index 0000000..6afdd59 --- /dev/null +++ b/vendor/github.com/go-gl/glfw/v3.2/glfw/vulkan.go @@ -0,0 +1,14 @@ +package glfw + +//#include "glfw/include/GLFW/glfw3.h" +import "C" + +// VulkanSupported reports whether the Vulkan loader has been found. This check is performed by Init. +// +// The availability of a Vulkan loader does not by itself guarantee that window surface creation or +// even device creation is possible. Call GetRequiredInstanceExtensions to check whether the +// extensions necessary for Vulkan surface creation are available and GetPhysicalDevicePresentationSupport +// to check whether a queue family of a physical device supports image presentation. +func VulkanSupported() bool { + return glfwbool(C.glfwVulkanSupported()) +} diff --git a/vendor/github.com/go-gl/glfw/v3.2/glfw/window.c b/vendor/github.com/go-gl/glfw/v3.2/glfw/window.c new file mode 100644 index 0000000..d9cc0d4 --- /dev/null +++ b/vendor/github.com/go-gl/glfw/v3.2/glfw/window.c @@ -0,0 +1,57 @@ +#include "_cgo_export.h" + +void glfwWindowPosCB(GLFWwindow* window, int xpos, int ypos) { + goWindowPosCB(window, xpos, ypos); +} + +void glfwWindowSizeCB(GLFWwindow* window, int width, int height) { + goWindowSizeCB(window, width, height); +} + +void glfwFramebufferSizeCB(GLFWwindow* window, int width, int height) { + goFramebufferSizeCB(window, width, height); +} + +void glfwWindowCloseCB(GLFWwindow* window) { + goWindowCloseCB(window); +} + +void glfwWindowRefreshCB(GLFWwindow* window) { + goWindowRefreshCB(window); +} + +void glfwWindowFocusCB(GLFWwindow* window, int focused) { + goWindowFocusCB(window, focused); +} + +void glfwWindowIconifyCB(GLFWwindow* window, int iconified) { + goWindowIconifyCB(window, iconified); +} + +void glfwSetWindowPosCallbackCB(GLFWwindow* window) { + glfwSetWindowPosCallback(window, glfwWindowPosCB); +} + +void glfwSetWindowSizeCallbackCB(GLFWwindow* window) { + glfwSetWindowSizeCallback(window, glfwWindowSizeCB); +} + +void glfwSetFramebufferSizeCallbackCB(GLFWwindow* window) { + glfwSetFramebufferSizeCallback(window, glfwFramebufferSizeCB); +} + +void glfwSetWindowCloseCallbackCB(GLFWwindow* window) { + glfwSetWindowCloseCallback(window, glfwWindowCloseCB); +} + +void glfwSetWindowRefreshCallbackCB(GLFWwindow* window) { + glfwSetWindowRefreshCallback(window, glfwWindowRefreshCB); +} + +void glfwSetWindowFocusCallbackCB(GLFWwindow* window) { + glfwSetWindowFocusCallback(window, glfwWindowFocusCB); +} + +void glfwSetWindowIconifyCallbackCB(GLFWwindow* window) { + glfwSetWindowIconifyCallback(window, glfwWindowIconifyCB); +} diff --git a/vendor/github.com/go-gl/glfw/v3.2/glfw/window.go b/vendor/github.com/go-gl/glfw/v3.2/glfw/window.go new file mode 100644 index 0000000..be25de4 --- /dev/null +++ b/vendor/github.com/go-gl/glfw/v3.2/glfw/window.go @@ -0,0 +1,830 @@ +package glfw + +//#include +//#include "glfw/include/GLFW/glfw3.h" +//void glfwSetWindowPosCallbackCB(GLFWwindow *window); +//void glfwSetWindowSizeCallbackCB(GLFWwindow *window); +//void glfwSetFramebufferSizeCallbackCB(GLFWwindow *window); +//void glfwSetWindowCloseCallbackCB(GLFWwindow *window); +//void glfwSetWindowRefreshCallbackCB(GLFWwindow *window); +//void glfwSetWindowFocusCallbackCB(GLFWwindow *window); +//void glfwSetWindowIconifyCallbackCB(GLFWwindow *window); +import "C" + +import ( + "image" + "image/draw" + "sync" + "unsafe" +) + +// Internal window list stuff +type windowList struct { + l sync.Mutex + m map[*C.GLFWwindow]*Window +} + +var windows = windowList{m: map[*C.GLFWwindow]*Window{}} + +func (w *windowList) put(wnd *Window) { + w.l.Lock() + defer w.l.Unlock() + w.m[wnd.data] = wnd +} + +func (w *windowList) remove(wnd *C.GLFWwindow) { + w.l.Lock() + defer w.l.Unlock() + delete(w.m, wnd) +} + +func (w *windowList) get(wnd *C.GLFWwindow) *Window { + w.l.Lock() + defer w.l.Unlock() + return w.m[wnd] +} + +// Hint corresponds to hints that can be set before creating a window. +// +// Hint also corresponds to the attributes of the window that can be get after +// its creation. +type Hint int + +// Window related hints. +const ( + Focused Hint = C.GLFW_FOCUSED // Specifies whether the window will be given input focus when created. This hint is ignored for full screen and initially hidden windows. + Iconified Hint = C.GLFW_ICONIFIED // Specifies whether the window will be minimized. + Maximized Hint = C.GLFW_MAXIMIZED // Specifies whether the window is maximized. + Visible Hint = C.GLFW_VISIBLE // Specifies whether the window will be initially visible. + Resizable Hint = C.GLFW_RESIZABLE // Specifies whether the window will be resizable by the user. + Decorated Hint = C.GLFW_DECORATED // Specifies whether the window will have window decorations such as a border, a close widget, etc. + Floating Hint = C.GLFW_FLOATING // Specifies whether the window will be always-on-top. + AutoIconify Hint = C.GLFW_AUTO_ICONIFY // Specifies whether fullscreen windows automatically iconify (and restore the previous video mode) on focus loss. +) + +// Context related hints. +const ( + ClientAPI Hint = C.GLFW_CLIENT_API // Specifies which client API to create the context for. Hard constraint. + ContextVersionMajor Hint = C.GLFW_CONTEXT_VERSION_MAJOR // Specifies the client API version that the created context must be compatible with. + ContextVersionMinor Hint = C.GLFW_CONTEXT_VERSION_MINOR // Specifies the client API version that the created context must be compatible with. + ContextRobustness Hint = C.GLFW_CONTEXT_ROBUSTNESS // Specifies the robustness strategy to be used by the context. + ContextReleaseBehavior Hint = C.GLFW_CONTEXT_RELEASE_BEHAVIOR // Specifies the release behavior to be used by the context. + OpenGLForwardCompatible Hint = C.GLFW_OPENGL_FORWARD_COMPAT // Specifies whether the OpenGL context should be forward-compatible. Hard constraint. + OpenGLDebugContext Hint = C.GLFW_OPENGL_DEBUG_CONTEXT // Specifies whether to create a debug OpenGL context, which may have additional error and performance issue reporting functionality. If OpenGL ES is requested, this hint is ignored. + OpenGLProfile Hint = C.GLFW_OPENGL_PROFILE // Specifies which OpenGL profile to create the context for. Hard constraint. + ContextCreationAPI Hint = C.GLFW_CONTEXT_CREATION_API // Specifies which context creation API to use to create the context. +) + +// Framebuffer related hints. +const ( + ContextRevision Hint = C.GLFW_CONTEXT_REVISION + RedBits Hint = C.GLFW_RED_BITS // Specifies the desired bit depth of the default framebuffer. + GreenBits Hint = C.GLFW_GREEN_BITS // Specifies the desired bit depth of the default framebuffer. + BlueBits Hint = C.GLFW_BLUE_BITS // Specifies the desired bit depth of the default framebuffer. + AlphaBits Hint = C.GLFW_ALPHA_BITS // Specifies the desired bit depth of the default framebuffer. + DepthBits Hint = C.GLFW_DEPTH_BITS // Specifies the desired bit depth of the default framebuffer. + StencilBits Hint = C.GLFW_STENCIL_BITS // Specifies the desired bit depth of the default framebuffer. + AccumRedBits Hint = C.GLFW_ACCUM_RED_BITS // Specifies the desired bit depth of the accumulation buffer. + AccumGreenBits Hint = C.GLFW_ACCUM_GREEN_BITS // Specifies the desired bit depth of the accumulation buffer. + AccumBlueBits Hint = C.GLFW_ACCUM_BLUE_BITS // Specifies the desired bit depth of the accumulation buffer. + AccumAlphaBits Hint = C.GLFW_ACCUM_ALPHA_BITS // Specifies the desired bit depth of the accumulation buffer. + AuxBuffers Hint = C.GLFW_AUX_BUFFERS // Specifies the desired number of auxiliary buffers. + Stereo Hint = C.GLFW_STEREO // Specifies whether to use stereoscopic rendering. Hard constraint. + Samples Hint = C.GLFW_SAMPLES // Specifies the desired number of samples to use for multisampling. Zero disables multisampling. + SRGBCapable Hint = C.GLFW_SRGB_CAPABLE // Specifies whether the framebuffer should be sRGB capable. + RefreshRate Hint = C.GLFW_REFRESH_RATE // Specifies the desired refresh rate for full screen windows. If set to zero, the highest available refresh rate will be used. This hint is ignored for windowed mode windows. + DoubleBuffer Hint = C.GLFW_DOUBLEBUFFER // Specifies whether the framebuffer should be double buffered. You nearly always want to use double buffering. This is a hard constraint. +) + +// Values for the ClientAPI hint. +const ( + OpenGLAPI int = C.GLFW_OPENGL_API + OpenGLESAPI int = C.GLFW_OPENGL_ES_API + NoAPI int = C.GLFW_NO_API +) + +// Values for ContextCreationAPI hint. +const ( + NativeContextAPI int = C.GLFW_NATIVE_CONTEXT_API + EGLContextAPI int = C.GLFW_EGL_CONTEXT_API +) + +// Values for the ContextRobustness hint. +const ( + NoRobustness int = C.GLFW_NO_ROBUSTNESS + NoResetNotification int = C.GLFW_NO_RESET_NOTIFICATION + LoseContextOnReset int = C.GLFW_LOSE_CONTEXT_ON_RESET +) + +// Values for ContextReleaseBehavior hint. +const ( + AnyReleaseBehavior int = C.GLFW_ANY_RELEASE_BEHAVIOR + ReleaseBehaviorFlush int = C.GLFW_RELEASE_BEHAVIOR_FLUSH + ReleaseBehaviorNone int = C.GLFW_RELEASE_BEHAVIOR_NONE +) + +// Values for the OpenGLProfile hint. +const ( + OpenGLAnyProfile int = C.GLFW_OPENGL_ANY_PROFILE + OpenGLCoreProfile int = C.GLFW_OPENGL_CORE_PROFILE + OpenGLCompatProfile int = C.GLFW_OPENGL_COMPAT_PROFILE +) + +// Other values. +const ( + True int = C.GL_TRUE + False int = C.GL_FALSE + DontCare int = C.GLFW_DONT_CARE +) + +// Window represents a window. +type Window struct { + data *C.GLFWwindow + + // Window. + fPosHolder func(w *Window, xpos int, ypos int) + fSizeHolder func(w *Window, width int, height int) + fFramebufferSizeHolder func(w *Window, width int, height int) + fCloseHolder func(w *Window) + fRefreshHolder func(w *Window) + fFocusHolder func(w *Window, focused bool) + fIconifyHolder func(w *Window, iconified bool) + + // Input. + fMouseButtonHolder func(w *Window, button MouseButton, action Action, mod ModifierKey) + fCursorPosHolder func(w *Window, xpos float64, ypos float64) + fCursorEnterHolder func(w *Window, entered bool) + fScrollHolder func(w *Window, xoff float64, yoff float64) + fKeyHolder func(w *Window, key Key, scancode int, action Action, mods ModifierKey) + fCharHolder func(w *Window, char rune) + fCharModsHolder func(w *Window, char rune, mods ModifierKey) + fDropHolder func(w *Window, names []string) +} + +// GLFWWindow returns a *C.GLFWwindow reference (i.e. the GLFW window itself). This can be used for +// passing the GLFW window handle to external C libraries. +func (w *Window) GLFWWindow() uintptr { + return uintptr(unsafe.Pointer(w.data)) +} + +//export goWindowPosCB +func goWindowPosCB(window unsafe.Pointer, xpos, ypos C.int) { + w := windows.get((*C.GLFWwindow)(window)) + w.fPosHolder(w, int(xpos), int(ypos)) +} + +//export goWindowSizeCB +func goWindowSizeCB(window unsafe.Pointer, width, height C.int) { + w := windows.get((*C.GLFWwindow)(window)) + w.fSizeHolder(w, int(width), int(height)) +} + +//export goFramebufferSizeCB +func goFramebufferSizeCB(window unsafe.Pointer, width, height C.int) { + w := windows.get((*C.GLFWwindow)(window)) + w.fFramebufferSizeHolder(w, int(width), int(height)) +} + +//export goWindowCloseCB +func goWindowCloseCB(window unsafe.Pointer) { + w := windows.get((*C.GLFWwindow)(window)) + w.fCloseHolder(w) +} + +//export goWindowRefreshCB +func goWindowRefreshCB(window unsafe.Pointer) { + w := windows.get((*C.GLFWwindow)(window)) + w.fRefreshHolder(w) +} + +//export goWindowFocusCB +func goWindowFocusCB(window unsafe.Pointer, focused C.int) { + w := windows.get((*C.GLFWwindow)(window)) + isFocused := glfwbool(focused) + w.fFocusHolder(w, isFocused) +} + +//export goWindowIconifyCB +func goWindowIconifyCB(window unsafe.Pointer, iconified C.int) { + isIconified := glfwbool(iconified) + w := windows.get((*C.GLFWwindow)(window)) + w.fIconifyHolder(w, isIconified) +} + +// DefaultWindowHints resets all window hints to their default values. +// +// This function may only be called from the main thread. +func DefaultWindowHints() { + C.glfwDefaultWindowHints() + panicError() +} + +// WindowHint sets hints for the next call to CreateWindow. The hints, +// once set, retain their values until changed by a call to WindowHint or +// DefaultWindowHints, or until the library is terminated with Terminate. +// +// This function may only be called from the main thread. +func WindowHint(target Hint, hint int) { + C.glfwWindowHint(C.int(target), C.int(hint)) + panicError() +} + +// CreateWindow creates a window and its associated context. Most of the options +// controlling how the window and its context should be created are specified +// through Hint. +// +// Successful creation does not change which context is current. Before you can +// use the newly created context, you need to make it current using +// MakeContextCurrent. +// +// Note that the created window and context may differ from what you requested, +// as not all parameters and hints are hard constraints. This includes the size +// of the window, especially for full screen windows. To retrieve the actual +// attributes of the created window and context, use queries like +// GetWindowAttrib and GetWindowSize. +// +// To create the window at a specific position, make it initially invisible using +// the Visible window hint, set its position and then show it. +// +// If a fullscreen window is active, the screensaver is prohibited from starting. +// +// Windows: If the executable has an icon resource named GLFW_ICON, it will be +// set as the icon for the window. If no such icon is present, the IDI_WINLOGO +// icon will be used instead. +// +// Mac OS X: The GLFW window has no icon, as it is not a document window, but the +// dock icon will be the same as the application bundle's icon. Also, the first +// time a window is opened the menu bar is populated with common commands like +// Hide, Quit and About. The (minimal) about dialog uses information from the +// application's bundle. For more information on bundles, see the Bundle +// Programming Guide provided by Apple. +// +// This function may only be called from the main thread. +func CreateWindow(width, height int, title string, monitor *Monitor, share *Window) (*Window, error) { + var ( + m *C.GLFWmonitor + s *C.GLFWwindow + ) + + t := C.CString(title) + defer C.free(unsafe.Pointer(t)) + + if monitor != nil { + m = monitor.data + } + + if share != nil { + s = share.data + } + + w := C.glfwCreateWindow(C.int(width), C.int(height), t, m, s) + if w == nil { + return nil, acceptError(APIUnavailable, VersionUnavailable) + } + + wnd := &Window{data: w} + windows.put(wnd) + return wnd, nil +} + +// Destroy destroys the specified window and its context. On calling this +// function, no further callbacks will be called for that window. +// +// This function may only be called from the main thread. +func (w *Window) Destroy() { + windows.remove(w.data) + C.glfwDestroyWindow(w.data) + panicError() +} + +// ShouldClose reports the value of the close flag of the specified window. +func (w *Window) ShouldClose() bool { + ret := glfwbool(C.glfwWindowShouldClose(w.data)) + panicError() + return ret +} + +// SetShouldClose sets the value of the close flag of the window. This can be +// used to override the user's attempt to close the window, or to signal that it +// should be closed. +func (w *Window) SetShouldClose(value bool) { + if !value { + C.glfwSetWindowShouldClose(w.data, C.GL_FALSE) + } else { + C.glfwSetWindowShouldClose(w.data, C.GL_TRUE) + } + panicError() +} + +// SetTitle sets the window title, encoded as UTF-8, of the window. +// +// This function may only be called from the main thread. +func (w *Window) SetTitle(title string) { + t := C.CString(title) + defer C.free(unsafe.Pointer(t)) + C.glfwSetWindowTitle(w.data, t) + panicError() +} + +// SetIcon sets the icon of the specified window. If passed an array of candidate images, +// those of or closest to the sizes desired by the system are selected. If no images are +// specified, the window reverts to its default icon. +// +// The image is ideally provided in the form of *image.NRGBA. +// The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight +// bits per channel with the red channel first. They are arranged canonically +// as packed sequential rows, starting from the top-left corner. If the image +// type is not *image.NRGBA, it will be converted to it. +// +// The desired image sizes varies depending on platform and system settings. The selected +// images will be rescaled as needed. Good sizes include 16x16, 32x32 and 48x48. +func (w *Window) SetIcon(images []image.Image) { + count := len(images) + cimages := make([]C.GLFWimage, count) + freePixels := make([]func(), count) + + for i, img := range images { + var pixels []uint8 + b := img.Bounds() + + switch img := img.(type) { + case *image.NRGBA: + pixels = img.Pix + default: + m := image.NewNRGBA(image.Rect(0, 0, b.Dx(), b.Dy())) + draw.Draw(m, m.Bounds(), img, b.Min, draw.Src) + pixels = m.Pix + } + + pix, free := bytes(pixels) + freePixels[i] = free + + cimages[i].width = C.int(b.Dx()) + cimages[i].height = C.int(b.Dy()) + cimages[i].pixels = (*C.uchar)(pix) + } + + var p *C.GLFWimage + if count > 0 { + p = &cimages[0] + } + C.glfwSetWindowIcon(w.data, C.int(count), p) + + for _, v := range freePixels { + v() + } + + panicError() +} + +// GetPos returns the position, in screen coordinates, of the upper-left +// corner of the client area of the window. +func (w *Window) GetPos() (x, y int) { + var xpos, ypos C.int + C.glfwGetWindowPos(w.data, &xpos, &ypos) + panicError() + return int(xpos), int(ypos) +} + +// SetPos sets the position, in screen coordinates, of the upper-left corner +// of the client area of the window. +// +// If it is a full screen window, this function does nothing. +// +// If you wish to set an initial window position you should create a hidden +// window (using Hint and Visible), set its position and then show it. +// +// It is very rarely a good idea to move an already visible window, as it will +// confuse and annoy the user. +// +// The window manager may put limits on what positions are allowed. +// +// This function may only be called from the main thread. +func (w *Window) SetPos(xpos, ypos int) { + C.glfwSetWindowPos(w.data, C.int(xpos), C.int(ypos)) + panicError() +} + +// GetSize returns the size, in screen coordinates, of the client area of the +// specified window. +func (w *Window) GetSize() (width, height int) { + var wi, h C.int + C.glfwGetWindowSize(w.data, &wi, &h) + panicError() + return int(wi), int(h) +} + +// SetSize sets the size, in screen coordinates, of the client area of the +// window. +// +// For full screen windows, this function selects and switches to the resolution +// closest to the specified size, without affecting the window's context. As the +// context is unaffected, the bit depths of the framebuffer remain unchanged. +// +// The window manager may put limits on what window sizes are allowed. +// +// This function may only be called from the main thread. +func (w *Window) SetSize(width, height int) { + C.glfwSetWindowSize(w.data, C.int(width), C.int(height)) + panicError() +} + +// SetSizeLimits sets the size limits of the client area of the specified window. +// If the window is full screen or not resizable, this function does nothing. +// +// The size limits are applied immediately and may cause the window to be resized. +func (w *Window) SetSizeLimits(minw, minh, maxw, maxh int) { + C.glfwSetWindowSizeLimits(w.data, C.int(minw), C.int(minh), C.int(maxw), C.int(maxh)) + panicError() +} + +// SetAspectRatio sets the required aspect ratio of the client area of the specified window. +// If the window is full screen or not resizable, this function does nothing. +// +// The aspect ratio is specified as a numerator and a denominator and both values must be greater +// than zero. For example, the common 16:9 aspect ratio is specified as 16 and 9, respectively. +// +// If the numerator and denominator is set to glfw.DontCare then the aspect ratio limit is disabled. +// +// The aspect ratio is applied immediately and may cause the window to be resized. +func (w *Window) SetAspectRatio(numer, denom int) { + C.glfwSetWindowAspectRatio(w.data, C.int(numer), C.int(denom)) + panicError() +} + +// GetFramebufferSize retrieves the size, in pixels, of the framebuffer of the +// specified window. +func (w *Window) GetFramebufferSize() (width, height int) { + var wi, h C.int + C.glfwGetFramebufferSize(w.data, &wi, &h) + panicError() + return int(wi), int(h) +} + +// GetFrameSize retrieves the size, in screen coordinates, of each edge of the frame +// of the specified window. This size includes the title bar, if the window has one. +// The size of the frame may vary depending on the window-related hints used to create it. +// +// Because this function retrieves the size of each window frame edge and not the offset +// along a particular coordinate axis, the retrieved values will always be zero or positive. +func (w *Window) GetFrameSize() (left, top, right, bottom int) { + var l, t, r, b C.int + C.glfwGetWindowFrameSize(w.data, &l, &t, &r, &b) + panicError() + return int(l), int(t), int(r), int(b) +} + +// Focus brings the specified window to front and sets input focus. +// The window should already be visible and not iconified. +// +// By default, both windowed and full screen mode windows are focused when initially created. +// Set the glfw.Focused to disable this behavior. +// +// Do not use this function to steal focus from other applications unless you are certain that +// is what the user wants. Focus stealing can be extremely disruptive. +func (w *Window) Focus() error { + C.glfwFocusWindow(w.data) + return acceptError(APIUnavailable) +} + +// Iconify iconifies/minimizes the window, if it was previously restored. If it +// is a full screen window, the original monitor resolution is restored until the +// window is restored. If the window is already iconified, this function does +// nothing. +// +// This function may only be called from the main thread. +func (w *Window) Iconify() error { + C.glfwIconifyWindow(w.data) + return acceptError(APIUnavailable) +} + +// Maximize maximizes the specified window if it was previously not maximized. +// If the window is already maximized, this function does nothing. +// +// If the specified window is a full screen window, this function does nothing. +func (w *Window) Maximize() error { + C.glfwMaximizeWindow(w.data) + return acceptError(APIUnavailable) +} + +// Restore restores the window, if it was previously iconified/minimized. If it +// is a full screen window, the resolution chosen for the window is restored on +// the selected monitor. If the window is already restored, this function does +// nothing. +// +// This function may only be called from the main thread. +func (w *Window) Restore() error { + C.glfwRestoreWindow(w.data) + return acceptError(APIUnavailable) +} + +// Show makes the window visible, if it was previously hidden. If the window is +// already visible or is in full screen mode, this function does nothing. +// +// This function may only be called from the main thread. +func (w *Window) Show() { + C.glfwShowWindow(w.data) + panicError() +} + +// Hide hides the window, if it was previously visible. If the window is already +// hidden or is in full screen mode, this function does nothing. +// +// This function may only be called from the main thread. +func (w *Window) Hide() { + C.glfwHideWindow(w.data) + panicError() +} + +// GetMonitor returns the handle of the monitor that the window is in +// fullscreen on. +// +// Returns nil if the window is in windowed mode. +func (w *Window) GetMonitor() *Monitor { + m := C.glfwGetWindowMonitor(w.data) + panicError() + if m == nil { + return nil + } + return &Monitor{m} +} + +// SetMonitor sets the monitor that the window uses for full screen mode or, +// if the monitor is NULL, makes it windowed mode. +// +// When setting a monitor, this function updates the width, height and refresh +// rate of the desired video mode and switches to the video mode closest to it. +// The window position is ignored when setting a monitor. +// +// When the monitor is NULL, the position, width and height are used to place +// the window client area. The refresh rate is ignored when no monitor is specified. +// If you only wish to update the resolution of a full screen window or the size of +// a windowed mode window, see window.SetSize. +// +// When a window transitions from full screen to windowed mode, this function +// restores any previous window settings such as whether it is decorated, floating, +// resizable, has size or aspect ratio limits, etc.. +func (w *Window) SetMonitor(monitor *Monitor, xpos, ypos, width, height, refreshRate int) { + var m *C.GLFWmonitor + if monitor == nil { + m = nil + } else { + m = monitor.data + } + C.glfwSetWindowMonitor(w.data, m, C.int(xpos), C.int(ypos), C.int(width), C.int(height), C.int(refreshRate)) + panicError() +} + +// GetAttrib returns an attribute of the window. There are many attributes, +// some related to the window and others to its context. +func (w *Window) GetAttrib(attrib Hint) int { + ret := int(C.glfwGetWindowAttrib(w.data, C.int(attrib))) + panicError() + return ret +} + +// SetUserPointer sets the user-defined pointer of the window. The current value +// is retained until the window is destroyed. The initial value is nil. +func (w *Window) SetUserPointer(pointer unsafe.Pointer) { + C.glfwSetWindowUserPointer(w.data, pointer) + panicError() +} + +// GetUserPointer returns the current value of the user-defined pointer of the +// window. The initial value is nil. +func (w *Window) GetUserPointer() unsafe.Pointer { + ret := C.glfwGetWindowUserPointer(w.data) + panicError() + return ret +} + +// PosCallback is the window position callback. +type PosCallback func(w *Window, xpos int, ypos int) + +// SetPosCallback sets the position callback of the window, which is called +// when the window is moved. The callback is provided with the screen position +// of the upper-left corner of the client area of the window. +func (w *Window) SetPosCallback(cbfun PosCallback) (previous PosCallback) { + previous = w.fPosHolder + w.fPosHolder = cbfun + if cbfun == nil { + C.glfwSetWindowPosCallback(w.data, nil) + } else { + C.glfwSetWindowPosCallbackCB(w.data) + } + panicError() + return previous +} + +// SizeCallback is the window size callback. +type SizeCallback func(w *Window, width int, height int) + +// SetSizeCallback sets the size callback of the window, which is called when +// the window is resized. The callback is provided with the size, in screen +// coordinates, of the client area of the window. +func (w *Window) SetSizeCallback(cbfun SizeCallback) (previous SizeCallback) { + previous = w.fSizeHolder + w.fSizeHolder = cbfun + if cbfun == nil { + C.glfwSetWindowSizeCallback(w.data, nil) + } else { + C.glfwSetWindowSizeCallbackCB(w.data) + } + panicError() + return previous +} + +// FramebufferSizeCallback is the framebuffer size callback. +type FramebufferSizeCallback func(w *Window, width int, height int) + +// SetFramebufferSizeCallback sets the framebuffer resize callback of the specified +// window, which is called when the framebuffer of the specified window is resized. +func (w *Window) SetFramebufferSizeCallback(cbfun FramebufferSizeCallback) (previous FramebufferSizeCallback) { + previous = w.fFramebufferSizeHolder + w.fFramebufferSizeHolder = cbfun + if cbfun == nil { + C.glfwSetFramebufferSizeCallback(w.data, nil) + } else { + C.glfwSetFramebufferSizeCallbackCB(w.data) + } + panicError() + return previous +} + +// CloseCallback is the window close callback. +type CloseCallback func(w *Window) + +// SetCloseCallback sets the close callback of the window, which is called when +// the user attempts to close the window, for example by clicking the close +// widget in the title bar. +// +// The close flag is set before this callback is called, but you can modify it at +// any time with SetShouldClose. +// +// Mac OS X: Selecting Quit from the application menu will trigger the close +// callback for all windows. +func (w *Window) SetCloseCallback(cbfun CloseCallback) (previous CloseCallback) { + previous = w.fCloseHolder + w.fCloseHolder = cbfun + if cbfun == nil { + C.glfwSetWindowCloseCallback(w.data, nil) + } else { + C.glfwSetWindowCloseCallbackCB(w.data) + } + panicError() + return previous +} + +// RefreshCallback is the window refresh callback. +type RefreshCallback func(w *Window) + +// SetRefreshCallback sets the refresh callback of the window, which +// is called when the client area of the window needs to be redrawn, for example +// if the window has been exposed after having been covered by another window. +// +// On compositing window systems such as Aero, Compiz or Aqua, where the window +// contents are saved off-screen, this callback may be called only very +// infrequently or never at all. +func (w *Window) SetRefreshCallback(cbfun RefreshCallback) (previous RefreshCallback) { + previous = w.fRefreshHolder + w.fRefreshHolder = cbfun + if cbfun == nil { + C.glfwSetWindowRefreshCallback(w.data, nil) + } else { + C.glfwSetWindowRefreshCallbackCB(w.data) + } + panicError() + return previous +} + +// FocusCallback is the window focus callback. +type FocusCallback func(w *Window, focused bool) + +// SetFocusCallback sets the focus callback of the window, which is called when +// the window gains or loses focus. +// +// After the focus callback is called for a window that lost focus, synthetic key +// and mouse button release events will be generated for all such that had been +// pressed. For more information, see SetKeyCallback and SetMouseButtonCallback. +func (w *Window) SetFocusCallback(cbfun FocusCallback) (previous FocusCallback) { + previous = w.fFocusHolder + w.fFocusHolder = cbfun + if cbfun == nil { + C.glfwSetWindowFocusCallback(w.data, nil) + } else { + C.glfwSetWindowFocusCallbackCB(w.data) + } + panicError() + return previous +} + +// IconifyCallback is the window iconification callback. +type IconifyCallback func(w *Window, iconified bool) + +// SetIconifyCallback sets the iconification callback of the window, which is +// called when the window is iconified or restored. +func (w *Window) SetIconifyCallback(cbfun IconifyCallback) (previous IconifyCallback) { + previous = w.fIconifyHolder + w.fIconifyHolder = cbfun + if cbfun == nil { + C.glfwSetWindowIconifyCallback(w.data, nil) + } else { + C.glfwSetWindowIconifyCallbackCB(w.data) + } + panicError() + return previous +} + +// SetClipboardString sets the system clipboard to the specified UTF-8 encoded +// string. +// +// This function may only be called from the main thread. +func (w *Window) SetClipboardString(str string) { + cp := C.CString(str) + defer C.free(unsafe.Pointer(cp)) + C.glfwSetClipboardString(w.data, cp) + panicError() +} + +// GetClipboardString returns the contents of the system clipboard, if it +// contains or is convertible to a UTF-8 encoded string. +// +// This function may only be called from the main thread. +func (w *Window) GetClipboardString() (string, error) { + cs := C.glfwGetClipboardString(w.data) + if cs == nil { + return "", acceptError(FormatUnavailable) + } + return C.GoString(cs), nil +} + +// PollEvents processes only those events that have already been received and +// then returns immediately. Processing events will cause the window and input +// callbacks associated with those events to be called. +// +// This function is not required for joystick input to work. +// +// This function may not be called from a callback. +// +// This function may only be called from the main thread. +func PollEvents() { + C.glfwPollEvents() + panicError() +} + +// WaitEvents puts the calling thread to sleep until at least one event has been +// received. Once one or more events have been recevied, it behaves as if +// PollEvents was called, i.e. the events are processed and the function then +// returns immediately. Processing events will cause the window and input +// callbacks associated with those events to be called. +// +// Since not all events are associated with callbacks, this function may return +// without a callback having been called even if you are monitoring all +// callbacks. +// +// This function may not be called from a callback. +// +// This function may only be called from the main thread. +func WaitEvents() { + C.glfwWaitEvents() + panicError() +} + +// WaitEventsTimeout puts the calling thread to sleep until at least one event is available in the +// event queue, or until the specified timeout is reached. If one or more events are available, +// it behaves exactly like PollEvents, i.e. the events in the queue are processed and the function +// then returns immediately. Processing events will cause the window and input callbacks associated +// with those events to be called. +// +// The timeout value must be a positive finite number. +// +// Since not all events are associated with callbacks, this function may return without a callback +// having been called even if you are monitoring all callbacks. +// +// On some platforms, a window move, resize or menu operation will cause event processing to block. +// This is due to how event processing is designed on those platforms. You can use the window +// refresh callback to redraw the contents of your window when necessary during such operations. +// +// On some platforms, certain callbacks may be called outside of a call to one of the event +// processing functions. +// +// If no windows exist, this function returns immediately. For synchronization of threads in +// applications that do not create windows, use native Go primitives. +// +// Event processing is not required for joystick input to work. +func WaitEventsTimeout(timeout float64) { + C.glfwWaitEventsTimeout(C.double(timeout)) + panicError() +} + +// PostEmptyEvent posts an empty event from the current thread to the main +// thread event queue, causing WaitEvents to return. +// +// If no windows exist, this function returns immediately. For synchronization of threads in +// applications that do not create windows, use native Go primitives. +// +// This function may be called from secondary threads. +func PostEmptyEvent() { + C.glfwPostEmptyEvent() + panicError() +} diff --git a/vendor/github.com/go-gl/mathgl/AUTHORS b/vendor/github.com/go-gl/mathgl/AUTHORS new file mode 100644 index 0000000..3de97dc --- /dev/null +++ b/vendor/github.com/go-gl/mathgl/AUTHORS @@ -0,0 +1,14 @@ +# This is the official list of go-gl/mathgl authors for copyright purposes. +# This file is distinct from the CONTRIBUTORS files. +# See the latter for an explanation. + +# Names should be added to this file as +# Name or Organization +# The email address is not required for organizations. + +# Please keep the list sorted. + +Alex Vasi +Dmitri Shuralyov +GlenKelley +Zoe Juozapaitis diff --git a/vendor/github.com/go-gl/mathgl/CONTRIBUTORS b/vendor/github.com/go-gl/mathgl/CONTRIBUTORS new file mode 100644 index 0000000..88569cd --- /dev/null +++ b/vendor/github.com/go-gl/mathgl/CONTRIBUTORS @@ -0,0 +1,21 @@ +# This is the official list of people who can contribute +# (and typically have contributed) code to the mathgl +# repository. +# +# The AUTHORS file lists the copyright holders; this file +# lists people. For example, Google employees would be listed here +# but not in AUTHORS, because Google would hold the copyright. +# +# When adding J Random Contributor's name to this file, +# either J's name or J's organization's name should be +# added to the AUTHORS file. +# +# Names should be added to this file like so: +# Name +# +# Please keep the list sorted. + +Alex Vasi +Dmitri Shuralyov +GlenKelley +Zoe Juozapaitis diff --git a/vendor/github.com/go-gl/mathgl/LICENSE b/vendor/github.com/go-gl/mathgl/LICENSE new file mode 100644 index 0000000..a780cbd --- /dev/null +++ b/vendor/github.com/go-gl/mathgl/LICENSE @@ -0,0 +1,23 @@ +Copyright ©2013 The go-gl Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the gonum project nor the names of its authors and + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/vendor/github.com/go-gl/mathgl/mgl32/codegen.go b/vendor/github.com/go-gl/mathgl/mgl32/codegen.go new file mode 100644 index 0000000..747c39d --- /dev/null +++ b/vendor/github.com/go-gl/mathgl/mgl32/codegen.go @@ -0,0 +1,276 @@ +// Copyright 2014 The go-gl/mathgl Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +// codegen generates go code from templates. Intended to be +// used with go generate; Also makes mgl64 from mgl32. +// See the invocation in mgl32/util.go for details. +// To use it, just run "go generate github.com/go-gl/mathgl/mgl32" +// (or "go generate" in mgl32 directory). + +package main + +import ( + "bytes" + "flag" + "fmt" + "io/ioutil" + "os" + "os/exec" + "path/filepath" + "strings" + "text/template" +) + +type Context struct { + Comment string + TemplateName string +} + +type MatrixIter struct { + M int // row + N int // column + index int +} + +var mgl64RewriteRules = []string{ + "mgl32 -> mgl64", + "float32 -> float64", + "f32 -> f64", + "a.Float32 -> a.Float64", + "math.MaxFloat32 -> math.MaxFloat64", + "math.SmallestNonzeroFloat32 -> math.SmallestNonzeroFloat64", +} + +func main() { + flag.Usage = func() { + fmt.Println("Usage: codegen -template file.tmpl -output file.go") + fmt.Println("Usage: codegen -mgl64 [-dir ../mgl64]") + flag.PrintDefaults() + } + + tmplPath := flag.String("template", "file.tmpl", "template path") + oPath := flag.String("output", "file.go", "output path") + mgl64 := flag.Bool("mgl64", false, "make mgl64") + mgl64Path := flag.String("dir", "../mgl64", "path to mgl64 location") + + flag.Parse() + if flag.NArg() > 0 || flag.NFlag() == 0 { + flag.Usage() + os.Exit(2) + } + + if *mgl64 { + genMgl64(*mgl64Path) + return + } + + tmpl := template.New("").Delims("<<", ">>").Funcs(template.FuncMap{ + "typename": typenameHelper, + "elementname": elementNameHelper, + "iter": iterHelper, + "matiter": matrixIterHelper, + "enum": enumHelper, + "sep": separatorHelper, + "repeat": repeatHelper, + "add": addHelper, + "mul": mulHelper, + }) + tmpl = template.Must(tmpl.ParseFiles(*tmplPath)) + tmplName := filepath.Base(*tmplPath) + + oFile, err := os.Create(*oPath) + if err != nil { + panic(err) + } + + context := Context{ + Comment: "This file is generated by codegen.go; DO NOT EDIT", + TemplateName: tmplName, + } + if err = tmpl.ExecuteTemplate(oFile, tmplName, context); err != nil { + panic(err) + } + oFile.Close() + + if err = rungofmt(*oPath, false, nil); err != nil { + panic(err) + } +} + +func genMgl64(destPath string) { + HandleFile := func(source string, info os.FileInfo, err error) error { + if err != nil { + return err + } + dest := filepath.Join(destPath, source) + + if info.IsDir() { + return os.MkdirAll(dest, info.Mode()) + } + if !strings.HasSuffix(source, ".go") || info.Name() == "codegen.go" { + return nil + } + if !info.Mode().IsRegular() { + fmt.Println("Ignored, not a regular file:", source) + return nil + } + + in, err := ioutil.ReadFile(source) + if err != nil { + return err + } + + out, err := os.OpenFile(dest, os.O_RDWR|os.O_CREATE|os.O_TRUNC, + info.Mode()) + if err != nil { + return err + } + defer out.Close() + + comment := fmt.Sprintf( + "// This file is generated from mgl32/%s; DO NOT EDIT\n\n", + source) + if _, err = out.WriteString(comment); err != nil { + return err + } + + r := strings.NewReplacer("//go:generate ", "//#go:generate ") // We don't want go generate directives in mgl64 package. + + if _, err = r.WriteString(out, string(in)); err != nil { + return err + } + + return rungofmt(dest, true, mgl64RewriteRules) + } + + if err := filepath.Walk(".", HandleFile); err != nil { + panic(err) + } +} + +func rungofmt(path string, fiximports bool, rewriteRules []string) error { + args := []string{"-w", path} + output, err := exec.Command("gofmt", args...).CombinedOutput() + + for i := 0; err == nil && i < len(rewriteRules); i++ { + args = []string{"-w", "-r", rewriteRules[i], path} + output, err = exec.Command("gofmt", args...).CombinedOutput() + } + + if fiximports && err == nil { + args = []string{"-w", path} + output, err = exec.Command("goimports", args...).CombinedOutput() + } + + if err != nil { + fmt.Println("Error executing gofmt", strings.Join(args, " ")) + os.Stdout.Write(output) + } + + return err +} + +func typenameHelper(m, n int) string { + if m == 1 { + return fmt.Sprintf("Vec%d", n) + } + if n == 1 { + return fmt.Sprintf("Vec%d", m) + } + if m == n { + return fmt.Sprintf("Mat%d", m) + } + return fmt.Sprintf("Mat%dx%d", m, n) +} + +func elementNameHelper(m int) string { + switch m { + case 0: + return "X" + case 1: + return "Y" + case 2: + return "Z" + case 3: + return "W" + default: + panic("Can't generate element name") + } +} + +func iterHelper(start, end int) []int { + iter := make([]int, end-start) + for i := start; i < end; i++ { + iter[i] = i + } + return iter +} + +func matrixIterHelper(rows, cols int) []MatrixIter { + res := make([]MatrixIter, 0, rows*cols) + + for n := 0; n < cols; n++ { + for m := 0; m < rows; m++ { + res = append(res, MatrixIter{ + M: m, + N: n, + index: n*rows + m, + }) + } + } + + return res +} + +// Template function that returns slice from its arguments. Indended to be used +// in range loops. +func enumHelper(args ...int) []int { + return args +} + +// Template function to insert commas and '+' in range loops. +func separatorHelper(sep string, iterCond int) string { + if iterCond > 0 { + return sep + } + return "" +} + +// Template function to repeat string 'count' times. Inserting 'sep' between +// repetitions. Also changes all occurrences of '%d' to repetition number. +// For example, repeatHelper(3, "col%d", ",") will output "col0, col1, col2" +func repeatHelper(count int, text string, sep string) string { + var res bytes.Buffer + + for i := 0; i < count; i++ { + if i > 0 { + res.WriteString(sep) + } + res.WriteString(strings.Replace(text, "%d", fmt.Sprintf("%d", i), -1)) + } + + return res.String() +} + +func addHelper(args ...int) int { + res := 0 + for _, a := range args { + res += a + } + return res +} + +func mulHelper(args ...int) int { + res := 1 + for _, a := range args { + res *= a + } + return res +} + +func (i MatrixIter) String() string { + return fmt.Sprintf("%d", i.index) +} diff --git a/vendor/github.com/go-gl/mathgl/mgl32/conv.go b/vendor/github.com/go-gl/mathgl/mgl32/conv.go new file mode 100644 index 0000000..ad5b472 --- /dev/null +++ b/vendor/github.com/go-gl/mathgl/mgl32/conv.go @@ -0,0 +1,94 @@ +// Copyright 2014 The go-gl Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package mgl32 + +import ( + "math" +) + +// Converts 3-dimensional cartesian coordinates (x,y,z) to spherical +// coordinates with radius r, inclination theta, and azimuth phi. +// +// All angles are in radians. +func CartesianToSpherical(coord Vec3) (r, theta, phi float32) { + r = coord.Len() + theta = float32(math.Acos(float64(coord[2] / r))) + phi = float32(math.Atan2(float64(coord[1]), float64(coord[0]))) + + return +} + +// Converts 3-dimensional cartesian coordinates (x,y,z) to cylindrical +// coordinates with radial distance r, azimuth phi, and height z. +// +// All angles are in radians. +func CartesianToCylindical(coord Vec3) (rho, phi, z float32) { + rho = float32(math.Hypot(float64(coord[0]), float64(coord[1]))) + + phi = float32(math.Atan2(float64(coord[1]), float64(coord[0]))) + + z = coord[2] + + return +} + +// Converts spherical coordinates with radius r, inclination theta, +// and azimuth phi to cartesian coordinates (x,y,z). +// +// Angles are in radians. +func SphericalToCartesian(r, theta, phi float32) Vec3 { + st, ct := math.Sincos(float64(theta)) + sp, cp := math.Sincos(float64(phi)) + + return Vec3{r * float32(st*cp), r * float32(st*sp), r * float32(ct)} +} + +// Converts spherical coordinates with radius r, inclination theta, +// and azimuth phi to cylindrical coordinates with radial distance r, +// azimuth phi, and height z. +// +// Angles are in radians +func SphericalToCylindrical(r, theta, phi float32) (rho, phi2, z float32) { + s, c := math.Sincos(float64(theta)) + + rho = r * float32(s) + z = r * float32(c) + phi2 = phi + + return +} + +// Converts cylindrical coordinates with radial distance r, +// azimuth phi, and height z to spherical coordinates with radius r, +// inclination theta, and azimuth phi. +// +// Angles are in radians +func CylindircalToSpherical(rho, phi, z float32) (r, theta, phi2 float32) { + r = float32(math.Hypot(float64(rho), float64(z))) + phi2 = phi + theta = float32(math.Atan2(float64(rho), float64(z))) + + return +} + +// Converts cylindrical coordinates with radial distance r, +// azimuth phi, and height z to cartesian coordinates (x,y,z) +// +// Angles are in radians. +func CylindricalToCartesian(rho, phi, z float32) Vec3 { + s, c := math.Sincos(float64(phi)) + + return Vec3{rho * float32(c), rho * float32(s), z} +} + +// Converts degrees to radians +func DegToRad(angle float32) float32 { + return angle * float32(math.Pi) / 180 +} + +// Converts radians to degrees +func RadToDeg(angle float32) float32 { + return angle * 180 / float32(math.Pi) +} diff --git a/vendor/github.com/go-gl/mathgl/mgl32/doc.go b/vendor/github.com/go-gl/mathgl/mgl32/doc.go new file mode 100644 index 0000000..c7fcf9f --- /dev/null +++ b/vendor/github.com/go-gl/mathgl/mgl32/doc.go @@ -0,0 +1,22 @@ +// Copyright 2014 The go-gl Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +/* +Package mgl[32|64] (an abbreviation of mathgl since the packages were split between 32 and 64-bit versions) +is a pure Go math package specialized for 3D math, with inspiration from GLM. It provides statically-sized vectors and matrices with +compile-time generated calculations for most basic math operations. It also provides several basic graphics utilities such as bezier curves and surfaces, +generation of basic primitives like circles, easy creation of common matrices such as perspective or rotation, and common operations like converting +to/from screen/OpenGL coordinates or Projecting/Unprojecting from an MVP matrix. Quaternions are also supported. + +The basic vectors and matrices are written with code generation, so looking directly at the source will probably be a bit confusing. I recommend looking at the Godoc +instead, as all basic functions are documented. + +This package is written in Column Major Order to make it easier with OpenGL. This means for uniform blocks you can use the default ordering, and when you call +pass-in functions you can leave the "transpose" argument as false. + +The package now contains variable sized vectors and matrices. Using these is discouraged. They exist for corner cases where you need "small" matrices that are still +bigger than 4x4. An example may be a Jacobean used for inverse kinematics. Things like computer vision or general linear algebra are best left to packages +more directly suited for that task -- OpenCV, BLAS, LAPACK, numpy, gonum (if you want to stay in Go), and so on. +*/ +package mgl32 diff --git a/vendor/github.com/go-gl/mathgl/mgl32/matmn.go b/vendor/github.com/go-gl/mathgl/mgl32/matmn.go new file mode 100644 index 0000000..ea2e1d3 --- /dev/null +++ b/vendor/github.com/go-gl/mathgl/mgl32/matmn.go @@ -0,0 +1,494 @@ +// Copyright 2014 The go-gl Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package mgl32 + +import ( + "math" +) + +// An arbitrary mxn matrix backed by a slice of floats. +// +// This is emphatically not recommended for hardcore n-dimensional +// linear algebra. For that purpose I recommend github.com/gonum/matrix or +// well-tested C libraries such as BLAS or LAPACK. +// +// This is meant to complement future algorithms that may require matrices larger than +// 4x4, but still relatively small (e.g. Jacobeans for inverse kinematics). +// +// It makes use of the same memory sync.Pool set that VecN does, with the same sizing rules. +// +// MatMN will always check if the receiver is nil on any method. Meaning MathMN(nil).Add(dst,m2) +// should always work. Except for the Reshape function, the semantics of this is to "propogate" nils +// forward, so if an invalid operation occurs in a long chain of matrix operations, the overall result will be nil. +type MatMxN struct { + m, n int + dat []float32 +} + +// Creates a matrix backed by a new slice of size m*n +func NewMatrix(m, n int) (mat *MatMxN) { + if shouldPool { + return &MatMxN{m: m, n: n, dat: grabFromPool(m * n)} + } else { + return &MatMxN{m: m, n: n, dat: make([]float32, m*n)} + } +} + +// Returns a matrix with data specified by the data in src +// +// For instance, to create a 3x3 MatMN from a Mat3 +// +// m1 := mgl32.Rotate3DX(3.14159) +// mat := mgl32.NewBackedMatrix(m1[:],3,3) +// +// will create an MN matrix matching the data in the original +// rotation matrix. This matrix is NOT backed by the initial slice; +// it's a copy of the data +// +// If m*n > cap(src), this function will panic. +func NewMatrixFromData(src []float32, m, n int) *MatMxN { + var internal []float32 + if shouldPool { + internal = grabFromPool(m * n) + } else { + internal = make([]float32, m*n) + } + copy(internal, src[:m*n]) + + return &MatMxN{m: m, n: n, dat: internal} +} + +// Copies src into dst. This Reshapes dst +// to the same size as src. +// +// If dst or src is nil, this is a no-op +func CopyMatMN(dst, src *MatMxN) { + if dst == nil || src == nil { + return + } + dst.Reshape(src.m, src.n) + copy(dst.dat, src.dat) +} + +// Stores the NxN identity matrix in dst, reallocating as necessary. +func IdentN(dst *MatMxN, n int) *MatMxN { + dst = dst.Reshape(n, n) + + for i := 0; i < n; i++ { + for j := 0; j < n; j++ { + if i == j { + dst.Set(i, j, 1) + } else { + dst.Set(i, j, 0) + } + } + } + + return dst +} + +// Creates an NxN diagonal matrix seeded by the diagonal vector +// diag. Meaning: for all entries, where i==j, dst.At(i,j) = diag[i]. Otherwise +// dst.At(i,j) = 0 +// +// This reshapes dst to the correct size, returning/grabbing from the memory pool as necessary. +func DiagN(dst *MatMxN, diag *VecN) *MatMxN { + dst = dst.Reshape(len(diag.vec), len(diag.vec)) + n := len(diag.vec) + + for i := 0; i < n; i++ { + for j := 0; j < n; j++ { + if i == j { + dst.Set(i, j, diag.vec[i]) + } else { + dst.Set(i, j, 0) + } + } + } + + return dst +} + +// Reshapes the matrix to m by n and zeroes out all +// elements. +func (mat *MatMxN) Zero(m, n int) { + if mat == nil { + return + } + + mat.Reshape(m, n) + for i := range mat.dat { + mat.dat[i] = 0 + } +} + +// Returns the underlying matrix slice to the memory pool +func (mat *MatMxN) destroy() { + if mat == nil { + return + } + + if shouldPool && mat.dat != nil { + returnToPool(mat.dat) + } + mat.m, mat.n = 0, 0 + mat.dat = nil +} + +// Reshapes the matrix to the desired dimensions. +// If the overall size of the new matrix (m*n) is bigger +// than the current size, the underlying slice will +// be grown, sending the current slice to the memory pool +// and grabbing a bigger one if necessary +// +// If the caller is a nil pointer, the return value will be a new +// matrix, as if NewMatrix(m,n) had been called. Otherwise it's +// simply the caller. +func (mat *MatMxN) Reshape(m, n int) *MatMxN { + if mat == nil { + return NewMatrix(m, n) + } + + if m*n <= cap(mat.dat) { + if mat.dat != nil { + mat.dat = mat.dat[:m*n] + } else { + mat.dat = []float32{} + } + mat.m, mat.n = m, n + return mat + } + + if shouldPool && mat.dat != nil { + returnToPool(mat.dat) + } + (*mat) = (*NewMatrix(m, n)) + + return mat +} + +// Infers an MxN matrix from a constant matrix from this package. For instance, +// a Mat2x3 inferred with this function will work just like NewMatrixFromData(m[:],2,3) +// where m is the Mat2x3. This uses a type switch. +// +// I personally recommend using NewMatrixFromData, because it avoids a potentially costly type switch. +// However, this is also more robust and less error prone if you change the size of your matrix somewhere. +// +// If the value passed in is not recognized, it returns an InferMatrixError. +func (mat *MatMxN) InferMatrix(m interface{}) (*MatMxN, error) { + switch raw := m.(type) { + case Mat2: + return NewMatrixFromData(raw[:], 2, 2), nil + case Mat2x3: + return NewMatrixFromData(raw[:], 2, 3), nil + case Mat2x4: + return NewMatrixFromData(raw[:], 2, 4), nil + case Mat3: + return NewMatrixFromData(raw[:], 3, 3), nil + case Mat3x2: + return NewMatrixFromData(raw[:], 3, 2), nil + case Mat3x4: + return NewMatrixFromData(raw[:], 3, 4), nil + case Mat4: + return NewMatrixFromData(raw[:], 4, 4), nil + case Mat4x2: + return NewMatrixFromData(raw[:], 4, 2), nil + case Mat4x3: + return NewMatrixFromData(raw[:], 4, 3), nil + default: + return nil, InferMatrixError{} + } +} + +// Returns the trace of a square matrix (sum of all diagonal elements). If the matrix +// is nil, or not square, the result will be NaN. +func (mat *MatMxN) Trace() float32 { + if mat == nil || mat.m != mat.n { + return float32(math.NaN()) + } + + var out float32 + for i := 0; i < mat.m; i++ { + out += mat.At(i, i) + } + + return out +} + +// Takes the transpose of mat and puts it in dst. +// +// If dst is not of the correct dimensions, it will be Reshaped, +// if dst and mat are the same, a temporary matrix of the correct size will +// be allocated; these resources will be released via the memory pool. +// +// This should be improved in the future. +func (mat *MatMxN) Transpose(dst *MatMxN) (t *MatMxN) { + if mat == nil { + return nil + } + + if dst == mat { + dst = NewMatrix(mat.n, mat.m) + + // Copy data to correct matrix, + // delete temporary buffer, + // and set the return value to the + // correct one + defer func() { + copy(mat.dat, dst.dat) + + mat.m, mat.n = mat.n, mat.m + + dst.destroy() + t = mat + }() + + return mat + } else { + dst = dst.Reshape(mat.n, mat.m) + } + + for r := 0; r < mat.m; r++ { + for c := 0; c < mat.n; c++ { + dst.dat[r*dst.m+c] = mat.dat[c*mat.m+r] + } + } + + return dst +} + +// Returns the raw slice backing this matrix +func (mat *MatMxN) Raw() []float32 { + if mat == nil { + return nil + } + + return mat.dat +} + +// Returns the number of rows in this matrix +func (mat *MatMxN) NumRows() int { + return mat.m +} + +// Returns the number of columns in this matrix +func (mat *MatMxN) NumCols() int { + return mat.n +} + +// Returns the number of rows and columns in this matrix +// as a single operation +func (mat *MatMxN) NumRowCols() (rows, cols int) { + return mat.m, mat.n +} + +// Returns the element at the given row and column. +// This is garbage in/garbage out and does no bounds +// checking. If the computation happens to lead to an invalid +// element, it will be returned; or it may panic. +func (mat *MatMxN) At(row, col int) float32 { + return mat.dat[col*mat.m+row] +} + +// Sets the element at the given row and column. +// This is garbage in/garbage out and does no bounds +// checking. If the computation happens to lead to an invalid +// element, it will be set; or it may panic. +func (mat *MatMxN) Set(row, col int, val float32) { + mat.dat[col*mat.m+row] = val +} + +func (mat *MatMxN) Add(dst *MatMxN, addend *MatMxN) *MatMxN { + if mat == nil || addend == nil || mat.m != addend.m || mat.n != addend.n { + return nil + } + + dst = dst.Reshape(mat.m, mat.n) + + // No need to care about rows and columns + // since it's element-wise anyway + for i, el := range mat.dat { + dst.dat[i] = el + addend.dat[i] + } + + return dst +} + +func (mat *MatMxN) Sub(dst *MatMxN, subtrahend *MatMxN) *MatMxN { + if mat == nil || subtrahend == nil || mat.m != subtrahend.m || mat.n != subtrahend.n { + return nil + } + + dst = dst.Reshape(mat.m, mat.n) + + // No need to care about rows and columns + // since it's element-wise anyway + for i, el := range mat.dat { + dst.dat[i] = el - subtrahend.dat[i] + } + + return dst +} + +// Performs matrix multiplication on MxN matrix mat and NxO matrix mul, storing the result in dst. +// This returns dst, or nil if the operation is not able to be performed. +// +// If mat == dst, or mul == dst a temporary matrix will be used. +// +// This uses the naive algorithm (though on smaller matrices, +// this can actually be faster; about len(mat)+len(mul) < ~100) +func (mat *MatMxN) MulMxN(dst *MatMxN, mul *MatMxN) *MatMxN { + if mat == nil || mul == nil || mat.n != mul.m { + return nil + } + + if dst == mul { + mul = NewMatrix(mul.m, mul.n) + copy(mul.dat, dst.dat) + + // If mat==dst==mul, we need to change + // mat too or we have a bug + if mat == dst { + mat = mul + } + + defer mul.destroy() + } else if dst == mat { + mat = NewMatrix(mat.m, mat.n) + copy(mat.dat, dst.dat) + + defer mat.destroy() + } + + dst = dst.Reshape(mat.m, mul.n) + for r1 := 0; r1 < mat.m; r1++ { + for c2 := 0; c2 < mul.n; c2++ { + + dst.dat[c2*mat.m+r1] = 0 + for i := 0; i < mat.n; i++ { + dst.dat[c2*mat.m+r1] += mat.dat[i*mat.m+r1] * mul.dat[c2*mul.m+i] + } + + } + } + + return dst +} + +// Performs a scalar multiplication between mat and some constant c, +// storing the result in dst. Mat and dst can be equal. If dst is not the +// correct size, a Reshape will occur. +func (mat *MatMxN) Mul(dst *MatMxN, c float32) *MatMxN { + if mat == nil { + return nil + } + + dst = dst.Reshape(mat.m, mat.n) + + for i, el := range mat.dat { + dst.dat[i] = el * c + } + + return dst +} + +// Multiplies the matrix by a vector of size n. If mat or v is +// nil, this returns nil. If the number of columns in mat does not match +// the Size of v, this also returns nil. +// +// Dst will be resized if it's not big enough. If dst == v; a temporary +// vector will be allocated and returned via the realloc callback when complete. +func (mat *MatMxN) MulNx1(dst, v *VecN) *VecN { + if mat == nil || v == nil || mat.n != len(v.vec) { + return nil + } + if dst == v { + v = NewVecN(len(v.vec)) + copy(v.vec, dst.vec) + + defer v.destroy() + } + + dst = dst.Resize(mat.m) + + for r := 0; r < mat.m; r++ { + dst.vec[r] = 0 + + for c := 0; c < mat.n; c++ { + dst.vec[r] += mat.At(r, c) * v.vec[c] + } + } + + return dst +} + +func (mat *MatMxN) ApproxEqual(m2 *MatMxN) bool { + if mat == m2 { + return true + } + if mat.m != m2.m || mat.n != m2.n { + return false + } + + for i, el := range mat.dat { + if !FloatEqual(el, m2.dat[i]) { + return false + } + } + + return true +} + +func (mat *MatMxN) ApproxEqualThreshold(m2 *MatMxN, epsilon float32) bool { + if mat == m2 { + return true + } + if mat.m != m2.m || mat.n != m2.n { + return false + } + + for i, el := range mat.dat { + if !FloatEqualThreshold(el, m2.dat[i], epsilon) { + return false + } + } + + return true +} + +func (mat *MatMxN) ApproxEqualFunc(m2 *MatMxN, comp func(float32, float32) bool) bool { + if mat == m2 { + return true + } + if mat.m != m2.m || mat.n != m2.n { + return false + } + + for i, el := range mat.dat { + if !comp(el, m2.dat[i]) { + return false + } + } + + return true +} + +type InferMatrixError struct{} + +func (me InferMatrixError) Error() string { + return "could not infer matrix. Make sure you're using a constant matrix such as Mat3 from within the same package (meaning: mgl32.MatMxN can't handle a mgl64.Mat2x3)." +} + +type RectangularMatrixError struct{} + +func (mse RectangularMatrixError) Error() string { + return "the matrix was the wrong shape, needed a square matrix." +} + +type NilMatrixError struct{} + +func (me NilMatrixError) Error() string { + return "the matrix is nil" +} diff --git a/vendor/github.com/go-gl/mathgl/mgl32/matrix.go b/vendor/github.com/go-gl/mathgl/mgl32/matrix.go new file mode 100644 index 0000000..b5bee85 --- /dev/null +++ b/vendor/github.com/go-gl/mathgl/mgl32/matrix.go @@ -0,0 +1,2341 @@ +// Copyright 2014 The go-gl/mathgl Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// This file is generated by codegen.go; DO NOT EDIT +// Edit matrix.tmpl and run "go generate" to make changes. + +package mgl32 + +import ( + "bytes" + "fmt" + "golang.org/x/image/math/f32" + "text/tabwriter" +) + +type Mat2 [4]float32 +type Mat2x3 [6]float32 +type Mat2x4 [8]float32 +type Mat3x2 [6]float32 +type Mat3 f32.Mat3 +type Mat3x4 [12]float32 +type Mat4x2 [8]float32 +type Mat4x3 [12]float32 +type Mat4 f32.Mat4 + +func (m Mat2) Mat3() Mat3 { + col0, col1 := m.Cols() + return Mat3FromCols( + col0.Vec3(0), + col1.Vec3(0), + Vec3{0, 0, 1}, + ) +} + +func (m Mat2) Mat4() Mat4 { + col0, col1 := m.Cols() + return Mat4FromCols( + col0.Vec4(0, 0), + col1.Vec4(0, 0), + Vec4{0, 0, 1, 0}, + Vec4{0, 0, 0, 1}, + ) +} + +func (m Mat3) Mat2() Mat2 { + col0, col1, _ := m.Cols() + return Mat2FromCols( + col0.Vec2(), + col1.Vec2(), + ) +} + +func (m Mat3) Mat4() Mat4 { + col0, col1, col2 := m.Cols() + return Mat4FromCols( + col0.Vec4(0), + col1.Vec4(0), + col2.Vec4(0), + Vec4{0, 0, 0, 1}, + ) +} + +func (m Mat4) Mat2() Mat2 { + col0, col1, _, _ := m.Cols() + return Mat2FromCols( + col0.Vec2(), + col1.Vec2(), + ) +} + +func (m Mat4) Mat3() Mat3 { + col0, col1, col2, _ := m.Cols() + return Mat3FromCols( + col0.Vec3(), + col1.Vec3(), + col2.Vec3(), + ) +} + +// Sets a Column within the Matrix, so it mutates the calling matrix. +func (m *Mat2) SetCol(col int, v Vec2) { + m[col*2+0], m[col*2+1] = v[0], v[1] +} + +// Sets a Row within the Matrix, so it mutates the calling matrix. +func (m *Mat2) SetRow(row int, v Vec2) { + m[row+0], m[row+2] = v[0], v[1] +} + +// Diag is a basic operation on a square matrix that simply +// returns main diagonal (meaning all elements such that row==col). +func (m Mat2) Diag() Vec2 { + return Vec2{m[0], m[3]} +} + +// Ident2 returns the 2x2 identity matrix. +// The identity matrix is a square matrix with the value 1 on its +// diagonals. The characteristic property of the identity matrix is that +// any matrix multiplied by it is itself. (MI = M; IN = N) +func Ident2() Mat2 { + return Mat2{1, 0, 0, 1} +} + +// Diag2 creates a diagonal matrix from the entries of the input vector. +// That is, for each pointer for row==col, vector[row] is the entry. Otherwise it's 0. +// +// Another way to think about it is that the identity is this function where the every vector element is 1. +func Diag2(v Vec2) Mat2 { + var m Mat2 + m[0], m[3] = v[0], v[1] + return m +} + +// Mat2FromRows builds a new matrix from row vectors. +// The resulting matrix will still be in column major order, but this can be +// good for hand-building matrices. + +func Mat2FromRows(row0, row1 Vec2) Mat2 { + return Mat2{row0[0], row1[0], row0[1], row1[1]} +} + +// Mat2FromCols builds a new matrix from column vectors. +func Mat2FromCols(col0, col1 Vec2) Mat2 { + return Mat2{col0[0], col0[1], col1[0], col1[1]} +} + +// Add performs an element-wise addition of two matrices, this is +// equivalent to iterating over every element of m1 and adding the corresponding value of m2. +func (m1 Mat2) Add(m2 Mat2) Mat2 { + return Mat2{m1[0] + m2[0], m1[1] + m2[1], m1[2] + m2[2], m1[3] + m2[3]} +} + +// Sub performs an element-wise subtraction of two matrices, this is +// equivalent to iterating over every element of m1 and subtracting the corresponding value of m2. +func (m1 Mat2) Sub(m2 Mat2) Mat2 { + return Mat2{m1[0] - m2[0], m1[1] - m2[1], m1[2] - m2[2], m1[3] - m2[3]} +} + +// Mul performs a scalar multiplcation of the matrix. This is equivalent to iterating +// over every element of the matrix and multiply it by c. +func (m1 Mat2) Mul(c float32) Mat2 { + return Mat2{m1[0] * c, m1[1] * c, m1[2] * c, m1[3] * c} +} + +// Mul2x1 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat2) Mul2x1(m2 Vec2) Vec2 { + return Vec2{ + m1[0]*m2[0] + m1[2]*m2[1], + m1[1]*m2[0] + m1[3]*m2[1], + } +} + +// Mul2 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat2) Mul2(m2 Mat2) Mat2 { + return Mat2{ + m1[0]*m2[0] + m1[2]*m2[1], + m1[1]*m2[0] + m1[3]*m2[1], + m1[0]*m2[2] + m1[2]*m2[3], + m1[1]*m2[2] + m1[3]*m2[3], + } +} + +// Mul2x3 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat2) Mul2x3(m2 Mat2x3) Mat2x3 { + return Mat2x3{ + m1[0]*m2[0] + m1[2]*m2[1], + m1[1]*m2[0] + m1[3]*m2[1], + m1[0]*m2[2] + m1[2]*m2[3], + m1[1]*m2[2] + m1[3]*m2[3], + m1[0]*m2[4] + m1[2]*m2[5], + m1[1]*m2[4] + m1[3]*m2[5], + } +} + +// Mul2x4 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat2) Mul2x4(m2 Mat2x4) Mat2x4 { + return Mat2x4{ + m1[0]*m2[0] + m1[2]*m2[1], + m1[1]*m2[0] + m1[3]*m2[1], + m1[0]*m2[2] + m1[2]*m2[3], + m1[1]*m2[2] + m1[3]*m2[3], + m1[0]*m2[4] + m1[2]*m2[5], + m1[1]*m2[4] + m1[3]*m2[5], + m1[0]*m2[6] + m1[2]*m2[7], + m1[1]*m2[6] + m1[3]*m2[7], + } +} + +// Transpose produces the transpose of this matrix. For any MxN matrix +// the transpose is an NxM matrix with the rows swapped with the columns. For instance +// the transpose of the Mat3x2 is a Mat2x3 like so: +// +// [[a b]] [[a c e]] +// [[c d]] = [[b d f]] +// [[e f]] +func (m1 Mat2) Transpose() Mat2 { + return Mat2{m1[0], m1[2], m1[1], m1[3]} +} + +// The determinant of a matrix is a measure of a square matrix's +// singularity and invertability, among other things. In this library, the +// determinant is hard coded based on pre-computed cofactor expansion, and uses +// no loops. Of course, the addition and multiplication must still be done. +func (m Mat2) Det() float32 { + return m[0]*m[3] - m[1]*m[2] +} + +// Inv computes the inverse of a square matrix. An inverse is a square matrix such that when multiplied by the +// original, yields the identity. +// +// M_inv * M = M * M_inv = I +// +// In this library, the math is precomputed, and uses no loops, though the multiplications, additions, determinant calculation, and scaling +// are still done. This can still be (relatively) expensive for a 4x4. +// +// This function checks the determinant to see if the matrix is invertible. +// If the determinant is 0.0, this function returns the zero matrix. However, due to floating point errors, it is +// entirely plausible to get a false positive or negative. +// In the future, an alternate function may be written which takes in a pre-computed determinant. +func (m Mat2) Inv() Mat2 { + det := m.Det() + if FloatEqual(det, float32(0.0)) { + return Mat2{} + } + + retMat := Mat2{m[3], -m[1], -m[2], m[0]} + + return retMat.Mul(1 / det) +} + +// ApproxEqual performs an element-wise approximate equality test between two matrices, +// as if FloatEqual had been used. +func (m1 Mat2) ApproxEqual(m2 Mat2) bool { + for i := range m1 { + if !FloatEqual(m1[i], m2[i]) { + return false + } + } + return true +} + +// ApproxEqualThreshold performs an element-wise approximate equality test between two matrices +// with a given epsilon threshold, as if FloatEqualThreshold had been used. +func (m1 Mat2) ApproxEqualThreshold(m2 Mat2, threshold float32) bool { + for i := range m1 { + if !FloatEqualThreshold(m1[i], m2[i], threshold) { + return false + } + } + return true +} + +// ApproxEqualFunc performs an element-wise approximate equality test between two matrices +// with a given equality functions, intended to be used with FloatEqualFunc; although and comparison +// function may be used in practice. +func (m1 Mat2) ApproxFuncEqual(m2 Mat2, eq func(float32, float32) bool) bool { + for i := range m1 { + if !eq(m1[i], m2[i]) { + return false + } + } + return true +} + +// At returns the matrix element at the given row and column. +// This is equivalent to mat[col * numRow + row] where numRow is constant +// (E.G. for a Mat3x2 it's equal to 3) +// +// This method is garbage-in garbage-out. For instance, on a Mat4 asking for +// At(5,0) will work just like At(1,1). Or it may panic if it's out of bounds. +func (m Mat2) At(row, col int) float32 { + return m[col*2+row] +} + +// Set sets the corresponding matrix element at the given row and column. +// This has a pointer receiver because it mutates the matrix. +// +// This method is garbage-in garbage-out. For instance, on a Mat4 asking for +// Set(5,0,val) will work just like Set(1,1,val). Or it may panic if it's out of bounds. +func (m *Mat2) Set(row, col int, value float32) { + m[col*2+row] = value +} + +// Index returns the index of the given row and column, to be used with direct +// access. E.G. Index(0,0) = 0. +// +// This is a garbage-in garbage-out method. For instance, on a Mat4 asking for the index of +// (5,0) will work the same as asking for (1,1). Or it may give you a value that will cause +// a panic if you try to access the array with it if it's truly out of bounds. +func (m Mat2) Index(row, col int) int { + return col*2 + row +} + +// Row returns a vector representing the corresponding row (starting at row 0). +// This package makes no distinction between row and column vectors, so it +// will be a normal VecM for a MxN matrix. +func (m Mat2) Row(row int) Vec2 { + return Vec2{m[row+0], m[row+2]} +} + +// Rows decomposes a matrix into its corresponding row vectors. +// This is equivalent to calling mat.Row for each row. +func (m Mat2) Rows() (row0, row1 Vec2) { + return m.Row(0), m.Row(1) +} + +// Col returns a vector representing the corresponding column (starting at col 0). +// This package makes no distinction between row and column vectors, so it +// will be a normal VecN for a MxN matrix. +func (m Mat2) Col(col int) Vec2 { + return Vec2{m[col*2+0], m[col*2+1]} +} + +// Cols decomposes a matrix into its corresponding column vectors. +// This is equivalent to calling mat.Col for each column. +func (m Mat2) Cols() (col0, col1 Vec2) { + return m.Col(0), m.Col(1) +} + +// Trace is a basic operation on a square matrix that simply +// sums up all elements on the main diagonal (meaning all elements such that row==col). +func (m Mat2) Trace() float32 { + return m[0] + m[3] +} + +// Abs returns the element-wise absolute value of this matrix +func (m Mat2) Abs() Mat2 { + return Mat2{Abs(m[0]), Abs(m[1]), Abs(m[2]), Abs(m[3])} +} + +// Pretty prints the matrix +func (m Mat2) String() string { + buf := new(bytes.Buffer) + w := tabwriter.NewWriter(buf, 4, 4, 1, ' ', tabwriter.AlignRight) + for i := 0; i < 2; i++ { + for _, col := range m.Row(i) { + fmt.Fprintf(w, "%f\t", col) + } + + fmt.Fprintln(w, "") + } + w.Flush() + + return buf.String() +} + +// Sets a Column within the Matrix, so it mutates the calling matrix. +func (m *Mat2x3) SetCol(col int, v Vec2) { + m[col*2+0], m[col*2+1] = v[0], v[1] +} + +// Sets a Row within the Matrix, so it mutates the calling matrix. +func (m *Mat2x3) SetRow(row int, v Vec3) { + m[row+0], m[row+2], m[row+4] = v[0], v[1], v[2] +} + +// Mat2x3FromRows builds a new matrix from row vectors. +// The resulting matrix will still be in column major order, but this can be +// good for hand-building matrices. + +func Mat2x3FromRows(row0, row1 Vec3) Mat2x3 { + return Mat2x3{row0[0], row1[0], row0[1], row1[1], row0[2], row1[2]} +} + +// Mat2x3FromCols builds a new matrix from column vectors. +func Mat2x3FromCols(col0, col1, col2 Vec2) Mat2x3 { + return Mat2x3{col0[0], col0[1], col1[0], col1[1], col2[0], col2[1]} +} + +// Add performs an element-wise addition of two matrices, this is +// equivalent to iterating over every element of m1 and adding the corresponding value of m2. +func (m1 Mat2x3) Add(m2 Mat2x3) Mat2x3 { + return Mat2x3{m1[0] + m2[0], m1[1] + m2[1], m1[2] + m2[2], m1[3] + m2[3], m1[4] + m2[4], m1[5] + m2[5]} +} + +// Sub performs an element-wise subtraction of two matrices, this is +// equivalent to iterating over every element of m1 and subtracting the corresponding value of m2. +func (m1 Mat2x3) Sub(m2 Mat2x3) Mat2x3 { + return Mat2x3{m1[0] - m2[0], m1[1] - m2[1], m1[2] - m2[2], m1[3] - m2[3], m1[4] - m2[4], m1[5] - m2[5]} +} + +// Mul performs a scalar multiplcation of the matrix. This is equivalent to iterating +// over every element of the matrix and multiply it by c. +func (m1 Mat2x3) Mul(c float32) Mat2x3 { + return Mat2x3{m1[0] * c, m1[1] * c, m1[2] * c, m1[3] * c, m1[4] * c, m1[5] * c} +} + +// Mul3x1 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat2x3) Mul3x1(m2 Vec3) Vec2 { + return Vec2{ + m1[0]*m2[0] + m1[2]*m2[1] + m1[4]*m2[2], + m1[1]*m2[0] + m1[3]*m2[1] + m1[5]*m2[2], + } +} + +// Mul3x2 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat2x3) Mul3x2(m2 Mat3x2) Mat2 { + return Mat2{ + m1[0]*m2[0] + m1[2]*m2[1] + m1[4]*m2[2], + m1[1]*m2[0] + m1[3]*m2[1] + m1[5]*m2[2], + m1[0]*m2[3] + m1[2]*m2[4] + m1[4]*m2[5], + m1[1]*m2[3] + m1[3]*m2[4] + m1[5]*m2[5], + } +} + +// Mul3 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat2x3) Mul3(m2 Mat3) Mat2x3 { + return Mat2x3{ + m1[0]*m2[0] + m1[2]*m2[1] + m1[4]*m2[2], + m1[1]*m2[0] + m1[3]*m2[1] + m1[5]*m2[2], + m1[0]*m2[3] + m1[2]*m2[4] + m1[4]*m2[5], + m1[1]*m2[3] + m1[3]*m2[4] + m1[5]*m2[5], + m1[0]*m2[6] + m1[2]*m2[7] + m1[4]*m2[8], + m1[1]*m2[6] + m1[3]*m2[7] + m1[5]*m2[8], + } +} + +// Mul3x4 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat2x3) Mul3x4(m2 Mat3x4) Mat2x4 { + return Mat2x4{ + m1[0]*m2[0] + m1[2]*m2[1] + m1[4]*m2[2], + m1[1]*m2[0] + m1[3]*m2[1] + m1[5]*m2[2], + m1[0]*m2[3] + m1[2]*m2[4] + m1[4]*m2[5], + m1[1]*m2[3] + m1[3]*m2[4] + m1[5]*m2[5], + m1[0]*m2[6] + m1[2]*m2[7] + m1[4]*m2[8], + m1[1]*m2[6] + m1[3]*m2[7] + m1[5]*m2[8], + m1[0]*m2[9] + m1[2]*m2[10] + m1[4]*m2[11], + m1[1]*m2[9] + m1[3]*m2[10] + m1[5]*m2[11], + } +} + +// Transpose produces the transpose of this matrix. For any MxN matrix +// the transpose is an NxM matrix with the rows swapped with the columns. For instance +// the transpose of the Mat3x2 is a Mat2x3 like so: +// +// [[a b]] [[a c e]] +// [[c d]] = [[b d f]] +// [[e f]] +func (m1 Mat2x3) Transpose() Mat3x2 { + return Mat3x2{m1[0], m1[2], m1[4], m1[1], m1[3], m1[5]} +} + +// ApproxEqual performs an element-wise approximate equality test between two matrices, +// as if FloatEqual had been used. +func (m1 Mat2x3) ApproxEqual(m2 Mat2x3) bool { + for i := range m1 { + if !FloatEqual(m1[i], m2[i]) { + return false + } + } + return true +} + +// ApproxEqualThreshold performs an element-wise approximate equality test between two matrices +// with a given epsilon threshold, as if FloatEqualThreshold had been used. +func (m1 Mat2x3) ApproxEqualThreshold(m2 Mat2x3, threshold float32) bool { + for i := range m1 { + if !FloatEqualThreshold(m1[i], m2[i], threshold) { + return false + } + } + return true +} + +// ApproxEqualFunc performs an element-wise approximate equality test between two matrices +// with a given equality functions, intended to be used with FloatEqualFunc; although and comparison +// function may be used in practice. +func (m1 Mat2x3) ApproxFuncEqual(m2 Mat2x3, eq func(float32, float32) bool) bool { + for i := range m1 { + if !eq(m1[i], m2[i]) { + return false + } + } + return true +} + +// At returns the matrix element at the given row and column. +// This is equivalent to mat[col * numRow + row] where numRow is constant +// (E.G. for a Mat3x2 it's equal to 3) +// +// This method is garbage-in garbage-out. For instance, on a Mat4 asking for +// At(5,0) will work just like At(1,1). Or it may panic if it's out of bounds. +func (m Mat2x3) At(row, col int) float32 { + return m[col*2+row] +} + +// Set sets the corresponding matrix element at the given row and column. +// This has a pointer receiver because it mutates the matrix. +// +// This method is garbage-in garbage-out. For instance, on a Mat4 asking for +// Set(5,0,val) will work just like Set(1,1,val). Or it may panic if it's out of bounds. +func (m *Mat2x3) Set(row, col int, value float32) { + m[col*2+row] = value +} + +// Index returns the index of the given row and column, to be used with direct +// access. E.G. Index(0,0) = 0. +// +// This is a garbage-in garbage-out method. For instance, on a Mat4 asking for the index of +// (5,0) will work the same as asking for (1,1). Or it may give you a value that will cause +// a panic if you try to access the array with it if it's truly out of bounds. +func (m Mat2x3) Index(row, col int) int { + return col*2 + row +} + +// Row returns a vector representing the corresponding row (starting at row 0). +// This package makes no distinction between row and column vectors, so it +// will be a normal VecM for a MxN matrix. +func (m Mat2x3) Row(row int) Vec3 { + return Vec3{m[row+0], m[row+2], m[row+4]} +} + +// Rows decomposes a matrix into its corresponding row vectors. +// This is equivalent to calling mat.Row for each row. +func (m Mat2x3) Rows() (row0, row1 Vec3) { + return m.Row(0), m.Row(1) +} + +// Col returns a vector representing the corresponding column (starting at col 0). +// This package makes no distinction between row and column vectors, so it +// will be a normal VecN for a MxN matrix. +func (m Mat2x3) Col(col int) Vec2 { + return Vec2{m[col*2+0], m[col*2+1]} +} + +// Cols decomposes a matrix into its corresponding column vectors. +// This is equivalent to calling mat.Col for each column. +func (m Mat2x3) Cols() (col0, col1, col2 Vec2) { + return m.Col(0), m.Col(1), m.Col(2) +} + +// Abs returns the element-wise absolute value of this matrix +func (m Mat2x3) Abs() Mat2x3 { + return Mat2x3{Abs(m[0]), Abs(m[1]), Abs(m[2]), Abs(m[3]), Abs(m[4]), Abs(m[5])} +} + +// Pretty prints the matrix +func (m Mat2x3) String() string { + buf := new(bytes.Buffer) + w := tabwriter.NewWriter(buf, 4, 4, 1, ' ', tabwriter.AlignRight) + for i := 0; i < 2; i++ { + for _, col := range m.Row(i) { + fmt.Fprintf(w, "%f\t", col) + } + + fmt.Fprintln(w, "") + } + w.Flush() + + return buf.String() +} + +// Sets a Column within the Matrix, so it mutates the calling matrix. +func (m *Mat2x4) SetCol(col int, v Vec2) { + m[col*2+0], m[col*2+1] = v[0], v[1] +} + +// Sets a Row within the Matrix, so it mutates the calling matrix. +func (m *Mat2x4) SetRow(row int, v Vec4) { + m[row+0], m[row+2], m[row+4], m[row+6] = v[0], v[1], v[2], v[3] +} + +// Mat2x4FromRows builds a new matrix from row vectors. +// The resulting matrix will still be in column major order, but this can be +// good for hand-building matrices. + +func Mat2x4FromRows(row0, row1 Vec4) Mat2x4 { + return Mat2x4{row0[0], row1[0], row0[1], row1[1], row0[2], row1[2], row0[3], row1[3]} +} + +// Mat2x4FromCols builds a new matrix from column vectors. +func Mat2x4FromCols(col0, col1, col2, col3 Vec2) Mat2x4 { + return Mat2x4{col0[0], col0[1], col1[0], col1[1], col2[0], col2[1], col3[0], col3[1]} +} + +// Add performs an element-wise addition of two matrices, this is +// equivalent to iterating over every element of m1 and adding the corresponding value of m2. +func (m1 Mat2x4) Add(m2 Mat2x4) Mat2x4 { + return Mat2x4{m1[0] + m2[0], m1[1] + m2[1], m1[2] + m2[2], m1[3] + m2[3], m1[4] + m2[4], m1[5] + m2[5], m1[6] + m2[6], m1[7] + m2[7]} +} + +// Sub performs an element-wise subtraction of two matrices, this is +// equivalent to iterating over every element of m1 and subtracting the corresponding value of m2. +func (m1 Mat2x4) Sub(m2 Mat2x4) Mat2x4 { + return Mat2x4{m1[0] - m2[0], m1[1] - m2[1], m1[2] - m2[2], m1[3] - m2[3], m1[4] - m2[4], m1[5] - m2[5], m1[6] - m2[6], m1[7] - m2[7]} +} + +// Mul performs a scalar multiplcation of the matrix. This is equivalent to iterating +// over every element of the matrix and multiply it by c. +func (m1 Mat2x4) Mul(c float32) Mat2x4 { + return Mat2x4{m1[0] * c, m1[1] * c, m1[2] * c, m1[3] * c, m1[4] * c, m1[5] * c, m1[6] * c, m1[7] * c} +} + +// Mul4x1 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat2x4) Mul4x1(m2 Vec4) Vec2 { + return Vec2{ + m1[0]*m2[0] + m1[2]*m2[1] + m1[4]*m2[2] + m1[6]*m2[3], + m1[1]*m2[0] + m1[3]*m2[1] + m1[5]*m2[2] + m1[7]*m2[3], + } +} + +// Mul4x2 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat2x4) Mul4x2(m2 Mat4x2) Mat2 { + return Mat2{ + m1[0]*m2[0] + m1[2]*m2[1] + m1[4]*m2[2] + m1[6]*m2[3], + m1[1]*m2[0] + m1[3]*m2[1] + m1[5]*m2[2] + m1[7]*m2[3], + m1[0]*m2[4] + m1[2]*m2[5] + m1[4]*m2[6] + m1[6]*m2[7], + m1[1]*m2[4] + m1[3]*m2[5] + m1[5]*m2[6] + m1[7]*m2[7], + } +} + +// Mul4x3 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat2x4) Mul4x3(m2 Mat4x3) Mat2x3 { + return Mat2x3{ + m1[0]*m2[0] + m1[2]*m2[1] + m1[4]*m2[2] + m1[6]*m2[3], + m1[1]*m2[0] + m1[3]*m2[1] + m1[5]*m2[2] + m1[7]*m2[3], + m1[0]*m2[4] + m1[2]*m2[5] + m1[4]*m2[6] + m1[6]*m2[7], + m1[1]*m2[4] + m1[3]*m2[5] + m1[5]*m2[6] + m1[7]*m2[7], + m1[0]*m2[8] + m1[2]*m2[9] + m1[4]*m2[10] + m1[6]*m2[11], + m1[1]*m2[8] + m1[3]*m2[9] + m1[5]*m2[10] + m1[7]*m2[11], + } +} + +// Mul4 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat2x4) Mul4(m2 Mat4) Mat2x4 { + return Mat2x4{ + m1[0]*m2[0] + m1[2]*m2[1] + m1[4]*m2[2] + m1[6]*m2[3], + m1[1]*m2[0] + m1[3]*m2[1] + m1[5]*m2[2] + m1[7]*m2[3], + m1[0]*m2[4] + m1[2]*m2[5] + m1[4]*m2[6] + m1[6]*m2[7], + m1[1]*m2[4] + m1[3]*m2[5] + m1[5]*m2[6] + m1[7]*m2[7], + m1[0]*m2[8] + m1[2]*m2[9] + m1[4]*m2[10] + m1[6]*m2[11], + m1[1]*m2[8] + m1[3]*m2[9] + m1[5]*m2[10] + m1[7]*m2[11], + m1[0]*m2[12] + m1[2]*m2[13] + m1[4]*m2[14] + m1[6]*m2[15], + m1[1]*m2[12] + m1[3]*m2[13] + m1[5]*m2[14] + m1[7]*m2[15], + } +} + +// Transpose produces the transpose of this matrix. For any MxN matrix +// the transpose is an NxM matrix with the rows swapped with the columns. For instance +// the transpose of the Mat3x2 is a Mat2x3 like so: +// +// [[a b]] [[a c e]] +// [[c d]] = [[b d f]] +// [[e f]] +func (m1 Mat2x4) Transpose() Mat4x2 { + return Mat4x2{m1[0], m1[2], m1[4], m1[6], m1[1], m1[3], m1[5], m1[7]} +} + +// ApproxEqual performs an element-wise approximate equality test between two matrices, +// as if FloatEqual had been used. +func (m1 Mat2x4) ApproxEqual(m2 Mat2x4) bool { + for i := range m1 { + if !FloatEqual(m1[i], m2[i]) { + return false + } + } + return true +} + +// ApproxEqualThreshold performs an element-wise approximate equality test between two matrices +// with a given epsilon threshold, as if FloatEqualThreshold had been used. +func (m1 Mat2x4) ApproxEqualThreshold(m2 Mat2x4, threshold float32) bool { + for i := range m1 { + if !FloatEqualThreshold(m1[i], m2[i], threshold) { + return false + } + } + return true +} + +// ApproxEqualFunc performs an element-wise approximate equality test between two matrices +// with a given equality functions, intended to be used with FloatEqualFunc; although and comparison +// function may be used in practice. +func (m1 Mat2x4) ApproxFuncEqual(m2 Mat2x4, eq func(float32, float32) bool) bool { + for i := range m1 { + if !eq(m1[i], m2[i]) { + return false + } + } + return true +} + +// At returns the matrix element at the given row and column. +// This is equivalent to mat[col * numRow + row] where numRow is constant +// (E.G. for a Mat3x2 it's equal to 3) +// +// This method is garbage-in garbage-out. For instance, on a Mat4 asking for +// At(5,0) will work just like At(1,1). Or it may panic if it's out of bounds. +func (m Mat2x4) At(row, col int) float32 { + return m[col*2+row] +} + +// Set sets the corresponding matrix element at the given row and column. +// This has a pointer receiver because it mutates the matrix. +// +// This method is garbage-in garbage-out. For instance, on a Mat4 asking for +// Set(5,0,val) will work just like Set(1,1,val). Or it may panic if it's out of bounds. +func (m *Mat2x4) Set(row, col int, value float32) { + m[col*2+row] = value +} + +// Index returns the index of the given row and column, to be used with direct +// access. E.G. Index(0,0) = 0. +// +// This is a garbage-in garbage-out method. For instance, on a Mat4 asking for the index of +// (5,0) will work the same as asking for (1,1). Or it may give you a value that will cause +// a panic if you try to access the array with it if it's truly out of bounds. +func (m Mat2x4) Index(row, col int) int { + return col*2 + row +} + +// Row returns a vector representing the corresponding row (starting at row 0). +// This package makes no distinction between row and column vectors, so it +// will be a normal VecM for a MxN matrix. +func (m Mat2x4) Row(row int) Vec4 { + return Vec4{m[row+0], m[row+2], m[row+4], m[row+6]} +} + +// Rows decomposes a matrix into its corresponding row vectors. +// This is equivalent to calling mat.Row for each row. +func (m Mat2x4) Rows() (row0, row1 Vec4) { + return m.Row(0), m.Row(1) +} + +// Col returns a vector representing the corresponding column (starting at col 0). +// This package makes no distinction between row and column vectors, so it +// will be a normal VecN for a MxN matrix. +func (m Mat2x4) Col(col int) Vec2 { + return Vec2{m[col*2+0], m[col*2+1]} +} + +// Cols decomposes a matrix into its corresponding column vectors. +// This is equivalent to calling mat.Col for each column. +func (m Mat2x4) Cols() (col0, col1, col2, col3 Vec2) { + return m.Col(0), m.Col(1), m.Col(2), m.Col(3) +} + +// Abs returns the element-wise absolute value of this matrix +func (m Mat2x4) Abs() Mat2x4 { + return Mat2x4{Abs(m[0]), Abs(m[1]), Abs(m[2]), Abs(m[3]), Abs(m[4]), Abs(m[5]), Abs(m[6]), Abs(m[7])} +} + +// Pretty prints the matrix +func (m Mat2x4) String() string { + buf := new(bytes.Buffer) + w := tabwriter.NewWriter(buf, 4, 4, 1, ' ', tabwriter.AlignRight) + for i := 0; i < 2; i++ { + for _, col := range m.Row(i) { + fmt.Fprintf(w, "%f\t", col) + } + + fmt.Fprintln(w, "") + } + w.Flush() + + return buf.String() +} + +// Sets a Column within the Matrix, so it mutates the calling matrix. +func (m *Mat3x2) SetCol(col int, v Vec3) { + m[col*3+0], m[col*3+1], m[col*3+2] = v[0], v[1], v[2] +} + +// Sets a Row within the Matrix, so it mutates the calling matrix. +func (m *Mat3x2) SetRow(row int, v Vec2) { + m[row+0], m[row+3] = v[0], v[1] +} + +// Mat3x2FromRows builds a new matrix from row vectors. +// The resulting matrix will still be in column major order, but this can be +// good for hand-building matrices. + +func Mat3x2FromRows(row0, row1, row2 Vec2) Mat3x2 { + return Mat3x2{row0[0], row1[0], row2[0], row0[1], row1[1], row2[1]} +} + +// Mat3x2FromCols builds a new matrix from column vectors. +func Mat3x2FromCols(col0, col1 Vec3) Mat3x2 { + return Mat3x2{col0[0], col0[1], col0[2], col1[0], col1[1], col1[2]} +} + +// Add performs an element-wise addition of two matrices, this is +// equivalent to iterating over every element of m1 and adding the corresponding value of m2. +func (m1 Mat3x2) Add(m2 Mat3x2) Mat3x2 { + return Mat3x2{m1[0] + m2[0], m1[1] + m2[1], m1[2] + m2[2], m1[3] + m2[3], m1[4] + m2[4], m1[5] + m2[5]} +} + +// Sub performs an element-wise subtraction of two matrices, this is +// equivalent to iterating over every element of m1 and subtracting the corresponding value of m2. +func (m1 Mat3x2) Sub(m2 Mat3x2) Mat3x2 { + return Mat3x2{m1[0] - m2[0], m1[1] - m2[1], m1[2] - m2[2], m1[3] - m2[3], m1[4] - m2[4], m1[5] - m2[5]} +} + +// Mul performs a scalar multiplcation of the matrix. This is equivalent to iterating +// over every element of the matrix and multiply it by c. +func (m1 Mat3x2) Mul(c float32) Mat3x2 { + return Mat3x2{m1[0] * c, m1[1] * c, m1[2] * c, m1[3] * c, m1[4] * c, m1[5] * c} +} + +// Mul2x1 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat3x2) Mul2x1(m2 Vec2) Vec3 { + return Vec3{ + m1[0]*m2[0] + m1[3]*m2[1], + m1[1]*m2[0] + m1[4]*m2[1], + m1[2]*m2[0] + m1[5]*m2[1], + } +} + +// Mul2 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat3x2) Mul2(m2 Mat2) Mat3x2 { + return Mat3x2{ + m1[0]*m2[0] + m1[3]*m2[1], + m1[1]*m2[0] + m1[4]*m2[1], + m1[2]*m2[0] + m1[5]*m2[1], + m1[0]*m2[2] + m1[3]*m2[3], + m1[1]*m2[2] + m1[4]*m2[3], + m1[2]*m2[2] + m1[5]*m2[3], + } +} + +// Mul2x3 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat3x2) Mul2x3(m2 Mat2x3) Mat3 { + return Mat3{ + m1[0]*m2[0] + m1[3]*m2[1], + m1[1]*m2[0] + m1[4]*m2[1], + m1[2]*m2[0] + m1[5]*m2[1], + m1[0]*m2[2] + m1[3]*m2[3], + m1[1]*m2[2] + m1[4]*m2[3], + m1[2]*m2[2] + m1[5]*m2[3], + m1[0]*m2[4] + m1[3]*m2[5], + m1[1]*m2[4] + m1[4]*m2[5], + m1[2]*m2[4] + m1[5]*m2[5], + } +} + +// Mul2x4 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat3x2) Mul2x4(m2 Mat2x4) Mat3x4 { + return Mat3x4{ + m1[0]*m2[0] + m1[3]*m2[1], + m1[1]*m2[0] + m1[4]*m2[1], + m1[2]*m2[0] + m1[5]*m2[1], + m1[0]*m2[2] + m1[3]*m2[3], + m1[1]*m2[2] + m1[4]*m2[3], + m1[2]*m2[2] + m1[5]*m2[3], + m1[0]*m2[4] + m1[3]*m2[5], + m1[1]*m2[4] + m1[4]*m2[5], + m1[2]*m2[4] + m1[5]*m2[5], + m1[0]*m2[6] + m1[3]*m2[7], + m1[1]*m2[6] + m1[4]*m2[7], + m1[2]*m2[6] + m1[5]*m2[7], + } +} + +// Transpose produces the transpose of this matrix. For any MxN matrix +// the transpose is an NxM matrix with the rows swapped with the columns. For instance +// the transpose of the Mat3x2 is a Mat2x3 like so: +// +// [[a b]] [[a c e]] +// [[c d]] = [[b d f]] +// [[e f]] +func (m1 Mat3x2) Transpose() Mat2x3 { + return Mat2x3{m1[0], m1[3], m1[1], m1[4], m1[2], m1[5]} +} + +// ApproxEqual performs an element-wise approximate equality test between two matrices, +// as if FloatEqual had been used. +func (m1 Mat3x2) ApproxEqual(m2 Mat3x2) bool { + for i := range m1 { + if !FloatEqual(m1[i], m2[i]) { + return false + } + } + return true +} + +// ApproxEqualThreshold performs an element-wise approximate equality test between two matrices +// with a given epsilon threshold, as if FloatEqualThreshold had been used. +func (m1 Mat3x2) ApproxEqualThreshold(m2 Mat3x2, threshold float32) bool { + for i := range m1 { + if !FloatEqualThreshold(m1[i], m2[i], threshold) { + return false + } + } + return true +} + +// ApproxEqualFunc performs an element-wise approximate equality test between two matrices +// with a given equality functions, intended to be used with FloatEqualFunc; although and comparison +// function may be used in practice. +func (m1 Mat3x2) ApproxFuncEqual(m2 Mat3x2, eq func(float32, float32) bool) bool { + for i := range m1 { + if !eq(m1[i], m2[i]) { + return false + } + } + return true +} + +// At returns the matrix element at the given row and column. +// This is equivalent to mat[col * numRow + row] where numRow is constant +// (E.G. for a Mat3x2 it's equal to 3) +// +// This method is garbage-in garbage-out. For instance, on a Mat4 asking for +// At(5,0) will work just like At(1,1). Or it may panic if it's out of bounds. +func (m Mat3x2) At(row, col int) float32 { + return m[col*3+row] +} + +// Set sets the corresponding matrix element at the given row and column. +// This has a pointer receiver because it mutates the matrix. +// +// This method is garbage-in garbage-out. For instance, on a Mat4 asking for +// Set(5,0,val) will work just like Set(1,1,val). Or it may panic if it's out of bounds. +func (m *Mat3x2) Set(row, col int, value float32) { + m[col*3+row] = value +} + +// Index returns the index of the given row and column, to be used with direct +// access. E.G. Index(0,0) = 0. +// +// This is a garbage-in garbage-out method. For instance, on a Mat4 asking for the index of +// (5,0) will work the same as asking for (1,1). Or it may give you a value that will cause +// a panic if you try to access the array with it if it's truly out of bounds. +func (m Mat3x2) Index(row, col int) int { + return col*3 + row +} + +// Row returns a vector representing the corresponding row (starting at row 0). +// This package makes no distinction between row and column vectors, so it +// will be a normal VecM for a MxN matrix. +func (m Mat3x2) Row(row int) Vec2 { + return Vec2{m[row+0], m[row+3]} +} + +// Rows decomposes a matrix into its corresponding row vectors. +// This is equivalent to calling mat.Row for each row. +func (m Mat3x2) Rows() (row0, row1, row2 Vec2) { + return m.Row(0), m.Row(1), m.Row(2) +} + +// Col returns a vector representing the corresponding column (starting at col 0). +// This package makes no distinction between row and column vectors, so it +// will be a normal VecN for a MxN matrix. +func (m Mat3x2) Col(col int) Vec3 { + return Vec3{m[col*3+0], m[col*3+1], m[col*3+2]} +} + +// Cols decomposes a matrix into its corresponding column vectors. +// This is equivalent to calling mat.Col for each column. +func (m Mat3x2) Cols() (col0, col1 Vec3) { + return m.Col(0), m.Col(1) +} + +// Abs returns the element-wise absolute value of this matrix +func (m Mat3x2) Abs() Mat3x2 { + return Mat3x2{Abs(m[0]), Abs(m[1]), Abs(m[2]), Abs(m[3]), Abs(m[4]), Abs(m[5])} +} + +// Pretty prints the matrix +func (m Mat3x2) String() string { + buf := new(bytes.Buffer) + w := tabwriter.NewWriter(buf, 4, 4, 1, ' ', tabwriter.AlignRight) + for i := 0; i < 3; i++ { + for _, col := range m.Row(i) { + fmt.Fprintf(w, "%f\t", col) + } + + fmt.Fprintln(w, "") + } + w.Flush() + + return buf.String() +} + +// Sets a Column within the Matrix, so it mutates the calling matrix. +func (m *Mat3) SetCol(col int, v Vec3) { + m[col*3+0], m[col*3+1], m[col*3+2] = v[0], v[1], v[2] +} + +// Sets a Row within the Matrix, so it mutates the calling matrix. +func (m *Mat3) SetRow(row int, v Vec3) { + m[row+0], m[row+3], m[row+6] = v[0], v[1], v[2] +} + +// Diag is a basic operation on a square matrix that simply +// returns main diagonal (meaning all elements such that row==col). +func (m Mat3) Diag() Vec3 { + return Vec3{m[0], m[4], m[8]} +} + +// Ident3 returns the 3x3 identity matrix. +// The identity matrix is a square matrix with the value 1 on its +// diagonals. The characteristic property of the identity matrix is that +// any matrix multiplied by it is itself. (MI = M; IN = N) +func Ident3() Mat3 { + return Mat3{1, 0, 0, 0, 1, 0, 0, 0, 1} +} + +// Diag3 creates a diagonal matrix from the entries of the input vector. +// That is, for each pointer for row==col, vector[row] is the entry. Otherwise it's 0. +// +// Another way to think about it is that the identity is this function where the every vector element is 1. +func Diag3(v Vec3) Mat3 { + var m Mat3 + m[0], m[4], m[8] = v[0], v[1], v[2] + return m +} + +// Mat3FromRows builds a new matrix from row vectors. +// The resulting matrix will still be in column major order, but this can be +// good for hand-building matrices. + +func Mat3FromRows(row0, row1, row2 Vec3) Mat3 { + return Mat3{row0[0], row1[0], row2[0], row0[1], row1[1], row2[1], row0[2], row1[2], row2[2]} +} + +// Mat3FromCols builds a new matrix from column vectors. +func Mat3FromCols(col0, col1, col2 Vec3) Mat3 { + return Mat3{col0[0], col0[1], col0[2], col1[0], col1[1], col1[2], col2[0], col2[1], col2[2]} +} + +// Add performs an element-wise addition of two matrices, this is +// equivalent to iterating over every element of m1 and adding the corresponding value of m2. +func (m1 Mat3) Add(m2 Mat3) Mat3 { + return Mat3{m1[0] + m2[0], m1[1] + m2[1], m1[2] + m2[2], m1[3] + m2[3], m1[4] + m2[4], m1[5] + m2[5], m1[6] + m2[6], m1[7] + m2[7], m1[8] + m2[8]} +} + +// Sub performs an element-wise subtraction of two matrices, this is +// equivalent to iterating over every element of m1 and subtracting the corresponding value of m2. +func (m1 Mat3) Sub(m2 Mat3) Mat3 { + return Mat3{m1[0] - m2[0], m1[1] - m2[1], m1[2] - m2[2], m1[3] - m2[3], m1[4] - m2[4], m1[5] - m2[5], m1[6] - m2[6], m1[7] - m2[7], m1[8] - m2[8]} +} + +// Mul performs a scalar multiplcation of the matrix. This is equivalent to iterating +// over every element of the matrix and multiply it by c. +func (m1 Mat3) Mul(c float32) Mat3 { + return Mat3{m1[0] * c, m1[1] * c, m1[2] * c, m1[3] * c, m1[4] * c, m1[5] * c, m1[6] * c, m1[7] * c, m1[8] * c} +} + +// Mul3x1 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat3) Mul3x1(m2 Vec3) Vec3 { + return Vec3{ + m1[0]*m2[0] + m1[3]*m2[1] + m1[6]*m2[2], + m1[1]*m2[0] + m1[4]*m2[1] + m1[7]*m2[2], + m1[2]*m2[0] + m1[5]*m2[1] + m1[8]*m2[2], + } +} + +// Mul3x2 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat3) Mul3x2(m2 Mat3x2) Mat3x2 { + return Mat3x2{ + m1[0]*m2[0] + m1[3]*m2[1] + m1[6]*m2[2], + m1[1]*m2[0] + m1[4]*m2[1] + m1[7]*m2[2], + m1[2]*m2[0] + m1[5]*m2[1] + m1[8]*m2[2], + m1[0]*m2[3] + m1[3]*m2[4] + m1[6]*m2[5], + m1[1]*m2[3] + m1[4]*m2[4] + m1[7]*m2[5], + m1[2]*m2[3] + m1[5]*m2[4] + m1[8]*m2[5], + } +} + +// Mul3 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat3) Mul3(m2 Mat3) Mat3 { + return Mat3{ + m1[0]*m2[0] + m1[3]*m2[1] + m1[6]*m2[2], + m1[1]*m2[0] + m1[4]*m2[1] + m1[7]*m2[2], + m1[2]*m2[0] + m1[5]*m2[1] + m1[8]*m2[2], + m1[0]*m2[3] + m1[3]*m2[4] + m1[6]*m2[5], + m1[1]*m2[3] + m1[4]*m2[4] + m1[7]*m2[5], + m1[2]*m2[3] + m1[5]*m2[4] + m1[8]*m2[5], + m1[0]*m2[6] + m1[3]*m2[7] + m1[6]*m2[8], + m1[1]*m2[6] + m1[4]*m2[7] + m1[7]*m2[8], + m1[2]*m2[6] + m1[5]*m2[7] + m1[8]*m2[8], + } +} + +// Mul3x4 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat3) Mul3x4(m2 Mat3x4) Mat3x4 { + return Mat3x4{ + m1[0]*m2[0] + m1[3]*m2[1] + m1[6]*m2[2], + m1[1]*m2[0] + m1[4]*m2[1] + m1[7]*m2[2], + m1[2]*m2[0] + m1[5]*m2[1] + m1[8]*m2[2], + m1[0]*m2[3] + m1[3]*m2[4] + m1[6]*m2[5], + m1[1]*m2[3] + m1[4]*m2[4] + m1[7]*m2[5], + m1[2]*m2[3] + m1[5]*m2[4] + m1[8]*m2[5], + m1[0]*m2[6] + m1[3]*m2[7] + m1[6]*m2[8], + m1[1]*m2[6] + m1[4]*m2[7] + m1[7]*m2[8], + m1[2]*m2[6] + m1[5]*m2[7] + m1[8]*m2[8], + m1[0]*m2[9] + m1[3]*m2[10] + m1[6]*m2[11], + m1[1]*m2[9] + m1[4]*m2[10] + m1[7]*m2[11], + m1[2]*m2[9] + m1[5]*m2[10] + m1[8]*m2[11], + } +} + +// Transpose produces the transpose of this matrix. For any MxN matrix +// the transpose is an NxM matrix with the rows swapped with the columns. For instance +// the transpose of the Mat3x2 is a Mat2x3 like so: +// +// [[a b]] [[a c e]] +// [[c d]] = [[b d f]] +// [[e f]] +func (m1 Mat3) Transpose() Mat3 { + return Mat3{m1[0], m1[3], m1[6], m1[1], m1[4], m1[7], m1[2], m1[5], m1[8]} +} + +// The determinant of a matrix is a measure of a square matrix's +// singularity and invertability, among other things. In this library, the +// determinant is hard coded based on pre-computed cofactor expansion, and uses +// no loops. Of course, the addition and multiplication must still be done. +func (m Mat3) Det() float32 { + return m[0]*m[4]*m[8] + m[3]*m[7]*m[2] + m[6]*m[1]*m[5] - m[6]*m[4]*m[2] - m[3]*m[1]*m[8] - m[0]*m[7]*m[5] +} + +// Inv computes the inverse of a square matrix. An inverse is a square matrix such that when multiplied by the +// original, yields the identity. +// +// M_inv * M = M * M_inv = I +// +// In this library, the math is precomputed, and uses no loops, though the multiplications, additions, determinant calculation, and scaling +// are still done. This can still be (relatively) expensive for a 4x4. +// +// This function checks the determinant to see if the matrix is invertible. +// If the determinant is 0.0, this function returns the zero matrix. However, due to floating point errors, it is +// entirely plausible to get a false positive or negative. +// In the future, an alternate function may be written which takes in a pre-computed determinant. +func (m Mat3) Inv() Mat3 { + det := m.Det() + if FloatEqual(det, float32(0.0)) { + return Mat3{} + } + + retMat := Mat3{ + m[4]*m[8] - m[5]*m[7], + m[2]*m[7] - m[1]*m[8], + m[1]*m[5] - m[2]*m[4], + m[5]*m[6] - m[3]*m[8], + m[0]*m[8] - m[2]*m[6], + m[2]*m[3] - m[0]*m[5], + m[3]*m[7] - m[4]*m[6], + m[1]*m[6] - m[0]*m[7], + m[0]*m[4] - m[1]*m[3], + } + + return retMat.Mul(1 / det) +} + +// ApproxEqual performs an element-wise approximate equality test between two matrices, +// as if FloatEqual had been used. +func (m1 Mat3) ApproxEqual(m2 Mat3) bool { + for i := range m1 { + if !FloatEqual(m1[i], m2[i]) { + return false + } + } + return true +} + +// ApproxEqualThreshold performs an element-wise approximate equality test between two matrices +// with a given epsilon threshold, as if FloatEqualThreshold had been used. +func (m1 Mat3) ApproxEqualThreshold(m2 Mat3, threshold float32) bool { + for i := range m1 { + if !FloatEqualThreshold(m1[i], m2[i], threshold) { + return false + } + } + return true +} + +// ApproxEqualFunc performs an element-wise approximate equality test between two matrices +// with a given equality functions, intended to be used with FloatEqualFunc; although and comparison +// function may be used in practice. +func (m1 Mat3) ApproxFuncEqual(m2 Mat3, eq func(float32, float32) bool) bool { + for i := range m1 { + if !eq(m1[i], m2[i]) { + return false + } + } + return true +} + +// At returns the matrix element at the given row and column. +// This is equivalent to mat[col * numRow + row] where numRow is constant +// (E.G. for a Mat3x2 it's equal to 3) +// +// This method is garbage-in garbage-out. For instance, on a Mat4 asking for +// At(5,0) will work just like At(1,1). Or it may panic if it's out of bounds. +func (m Mat3) At(row, col int) float32 { + return m[col*3+row] +} + +// Set sets the corresponding matrix element at the given row and column. +// This has a pointer receiver because it mutates the matrix. +// +// This method is garbage-in garbage-out. For instance, on a Mat4 asking for +// Set(5,0,val) will work just like Set(1,1,val). Or it may panic if it's out of bounds. +func (m *Mat3) Set(row, col int, value float32) { + m[col*3+row] = value +} + +// Index returns the index of the given row and column, to be used with direct +// access. E.G. Index(0,0) = 0. +// +// This is a garbage-in garbage-out method. For instance, on a Mat4 asking for the index of +// (5,0) will work the same as asking for (1,1). Or it may give you a value that will cause +// a panic if you try to access the array with it if it's truly out of bounds. +func (m Mat3) Index(row, col int) int { + return col*3 + row +} + +// Row returns a vector representing the corresponding row (starting at row 0). +// This package makes no distinction between row and column vectors, so it +// will be a normal VecM for a MxN matrix. +func (m Mat3) Row(row int) Vec3 { + return Vec3{m[row+0], m[row+3], m[row+6]} +} + +// Rows decomposes a matrix into its corresponding row vectors. +// This is equivalent to calling mat.Row for each row. +func (m Mat3) Rows() (row0, row1, row2 Vec3) { + return m.Row(0), m.Row(1), m.Row(2) +} + +// Col returns a vector representing the corresponding column (starting at col 0). +// This package makes no distinction between row and column vectors, so it +// will be a normal VecN for a MxN matrix. +func (m Mat3) Col(col int) Vec3 { + return Vec3{m[col*3+0], m[col*3+1], m[col*3+2]} +} + +// Cols decomposes a matrix into its corresponding column vectors. +// This is equivalent to calling mat.Col for each column. +func (m Mat3) Cols() (col0, col1, col2 Vec3) { + return m.Col(0), m.Col(1), m.Col(2) +} + +// Trace is a basic operation on a square matrix that simply +// sums up all elements on the main diagonal (meaning all elements such that row==col). +func (m Mat3) Trace() float32 { + return m[0] + m[4] + m[8] +} + +// Abs returns the element-wise absolute value of this matrix +func (m Mat3) Abs() Mat3 { + return Mat3{Abs(m[0]), Abs(m[1]), Abs(m[2]), Abs(m[3]), Abs(m[4]), Abs(m[5]), Abs(m[6]), Abs(m[7]), Abs(m[8])} +} + +// Pretty prints the matrix +func (m Mat3) String() string { + buf := new(bytes.Buffer) + w := tabwriter.NewWriter(buf, 4, 4, 1, ' ', tabwriter.AlignRight) + for i := 0; i < 3; i++ { + for _, col := range m.Row(i) { + fmt.Fprintf(w, "%f\t", col) + } + + fmt.Fprintln(w, "") + } + w.Flush() + + return buf.String() +} + +// Sets a Column within the Matrix, so it mutates the calling matrix. +func (m *Mat3x4) SetCol(col int, v Vec3) { + m[col*3+0], m[col*3+1], m[col*3+2] = v[0], v[1], v[2] +} + +// Sets a Row within the Matrix, so it mutates the calling matrix. +func (m *Mat3x4) SetRow(row int, v Vec4) { + m[row+0], m[row+3], m[row+6], m[row+9] = v[0], v[1], v[2], v[3] +} + +// Mat3x4FromRows builds a new matrix from row vectors. +// The resulting matrix will still be in column major order, but this can be +// good for hand-building matrices. + +func Mat3x4FromRows(row0, row1, row2 Vec4) Mat3x4 { + return Mat3x4{row0[0], row1[0], row2[0], row0[1], row1[1], row2[1], row0[2], row1[2], row2[2], row0[3], row1[3], row2[3]} +} + +// Mat3x4FromCols builds a new matrix from column vectors. +func Mat3x4FromCols(col0, col1, col2, col3 Vec3) Mat3x4 { + return Mat3x4{col0[0], col0[1], col0[2], col1[0], col1[1], col1[2], col2[0], col2[1], col2[2], col3[0], col3[1], col3[2]} +} + +// Add performs an element-wise addition of two matrices, this is +// equivalent to iterating over every element of m1 and adding the corresponding value of m2. +func (m1 Mat3x4) Add(m2 Mat3x4) Mat3x4 { + return Mat3x4{m1[0] + m2[0], m1[1] + m2[1], m1[2] + m2[2], m1[3] + m2[3], m1[4] + m2[4], m1[5] + m2[5], m1[6] + m2[6], m1[7] + m2[7], m1[8] + m2[8], m1[9] + m2[9], m1[10] + m2[10], m1[11] + m2[11]} +} + +// Sub performs an element-wise subtraction of two matrices, this is +// equivalent to iterating over every element of m1 and subtracting the corresponding value of m2. +func (m1 Mat3x4) Sub(m2 Mat3x4) Mat3x4 { + return Mat3x4{m1[0] - m2[0], m1[1] - m2[1], m1[2] - m2[2], m1[3] - m2[3], m1[4] - m2[4], m1[5] - m2[5], m1[6] - m2[6], m1[7] - m2[7], m1[8] - m2[8], m1[9] - m2[9], m1[10] - m2[10], m1[11] - m2[11]} +} + +// Mul performs a scalar multiplcation of the matrix. This is equivalent to iterating +// over every element of the matrix and multiply it by c. +func (m1 Mat3x4) Mul(c float32) Mat3x4 { + return Mat3x4{m1[0] * c, m1[1] * c, m1[2] * c, m1[3] * c, m1[4] * c, m1[5] * c, m1[6] * c, m1[7] * c, m1[8] * c, m1[9] * c, m1[10] * c, m1[11] * c} +} + +// Mul4x1 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat3x4) Mul4x1(m2 Vec4) Vec3 { + return Vec3{ + m1[0]*m2[0] + m1[3]*m2[1] + m1[6]*m2[2] + m1[9]*m2[3], + m1[1]*m2[0] + m1[4]*m2[1] + m1[7]*m2[2] + m1[10]*m2[3], + m1[2]*m2[0] + m1[5]*m2[1] + m1[8]*m2[2] + m1[11]*m2[3], + } +} + +// Mul4x2 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat3x4) Mul4x2(m2 Mat4x2) Mat3x2 { + return Mat3x2{ + m1[0]*m2[0] + m1[3]*m2[1] + m1[6]*m2[2] + m1[9]*m2[3], + m1[1]*m2[0] + m1[4]*m2[1] + m1[7]*m2[2] + m1[10]*m2[3], + m1[2]*m2[0] + m1[5]*m2[1] + m1[8]*m2[2] + m1[11]*m2[3], + m1[0]*m2[4] + m1[3]*m2[5] + m1[6]*m2[6] + m1[9]*m2[7], + m1[1]*m2[4] + m1[4]*m2[5] + m1[7]*m2[6] + m1[10]*m2[7], + m1[2]*m2[4] + m1[5]*m2[5] + m1[8]*m2[6] + m1[11]*m2[7], + } +} + +// Mul4x3 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat3x4) Mul4x3(m2 Mat4x3) Mat3 { + return Mat3{ + m1[0]*m2[0] + m1[3]*m2[1] + m1[6]*m2[2] + m1[9]*m2[3], + m1[1]*m2[0] + m1[4]*m2[1] + m1[7]*m2[2] + m1[10]*m2[3], + m1[2]*m2[0] + m1[5]*m2[1] + m1[8]*m2[2] + m1[11]*m2[3], + m1[0]*m2[4] + m1[3]*m2[5] + m1[6]*m2[6] + m1[9]*m2[7], + m1[1]*m2[4] + m1[4]*m2[5] + m1[7]*m2[6] + m1[10]*m2[7], + m1[2]*m2[4] + m1[5]*m2[5] + m1[8]*m2[6] + m1[11]*m2[7], + m1[0]*m2[8] + m1[3]*m2[9] + m1[6]*m2[10] + m1[9]*m2[11], + m1[1]*m2[8] + m1[4]*m2[9] + m1[7]*m2[10] + m1[10]*m2[11], + m1[2]*m2[8] + m1[5]*m2[9] + m1[8]*m2[10] + m1[11]*m2[11], + } +} + +// Mul4 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat3x4) Mul4(m2 Mat4) Mat3x4 { + return Mat3x4{ + m1[0]*m2[0] + m1[3]*m2[1] + m1[6]*m2[2] + m1[9]*m2[3], + m1[1]*m2[0] + m1[4]*m2[1] + m1[7]*m2[2] + m1[10]*m2[3], + m1[2]*m2[0] + m1[5]*m2[1] + m1[8]*m2[2] + m1[11]*m2[3], + m1[0]*m2[4] + m1[3]*m2[5] + m1[6]*m2[6] + m1[9]*m2[7], + m1[1]*m2[4] + m1[4]*m2[5] + m1[7]*m2[6] + m1[10]*m2[7], + m1[2]*m2[4] + m1[5]*m2[5] + m1[8]*m2[6] + m1[11]*m2[7], + m1[0]*m2[8] + m1[3]*m2[9] + m1[6]*m2[10] + m1[9]*m2[11], + m1[1]*m2[8] + m1[4]*m2[9] + m1[7]*m2[10] + m1[10]*m2[11], + m1[2]*m2[8] + m1[5]*m2[9] + m1[8]*m2[10] + m1[11]*m2[11], + m1[0]*m2[12] + m1[3]*m2[13] + m1[6]*m2[14] + m1[9]*m2[15], + m1[1]*m2[12] + m1[4]*m2[13] + m1[7]*m2[14] + m1[10]*m2[15], + m1[2]*m2[12] + m1[5]*m2[13] + m1[8]*m2[14] + m1[11]*m2[15], + } +} + +// Transpose produces the transpose of this matrix. For any MxN matrix +// the transpose is an NxM matrix with the rows swapped with the columns. For instance +// the transpose of the Mat3x2 is a Mat2x3 like so: +// +// [[a b]] [[a c e]] +// [[c d]] = [[b d f]] +// [[e f]] +func (m1 Mat3x4) Transpose() Mat4x3 { + return Mat4x3{m1[0], m1[3], m1[6], m1[9], m1[1], m1[4], m1[7], m1[10], m1[2], m1[5], m1[8], m1[11]} +} + +// ApproxEqual performs an element-wise approximate equality test between two matrices, +// as if FloatEqual had been used. +func (m1 Mat3x4) ApproxEqual(m2 Mat3x4) bool { + for i := range m1 { + if !FloatEqual(m1[i], m2[i]) { + return false + } + } + return true +} + +// ApproxEqualThreshold performs an element-wise approximate equality test between two matrices +// with a given epsilon threshold, as if FloatEqualThreshold had been used. +func (m1 Mat3x4) ApproxEqualThreshold(m2 Mat3x4, threshold float32) bool { + for i := range m1 { + if !FloatEqualThreshold(m1[i], m2[i], threshold) { + return false + } + } + return true +} + +// ApproxEqualFunc performs an element-wise approximate equality test between two matrices +// with a given equality functions, intended to be used with FloatEqualFunc; although and comparison +// function may be used in practice. +func (m1 Mat3x4) ApproxFuncEqual(m2 Mat3x4, eq func(float32, float32) bool) bool { + for i := range m1 { + if !eq(m1[i], m2[i]) { + return false + } + } + return true +} + +// At returns the matrix element at the given row and column. +// This is equivalent to mat[col * numRow + row] where numRow is constant +// (E.G. for a Mat3x2 it's equal to 3) +// +// This method is garbage-in garbage-out. For instance, on a Mat4 asking for +// At(5,0) will work just like At(1,1). Or it may panic if it's out of bounds. +func (m Mat3x4) At(row, col int) float32 { + return m[col*3+row] +} + +// Set sets the corresponding matrix element at the given row and column. +// This has a pointer receiver because it mutates the matrix. +// +// This method is garbage-in garbage-out. For instance, on a Mat4 asking for +// Set(5,0,val) will work just like Set(1,1,val). Or it may panic if it's out of bounds. +func (m *Mat3x4) Set(row, col int, value float32) { + m[col*3+row] = value +} + +// Index returns the index of the given row and column, to be used with direct +// access. E.G. Index(0,0) = 0. +// +// This is a garbage-in garbage-out method. For instance, on a Mat4 asking for the index of +// (5,0) will work the same as asking for (1,1). Or it may give you a value that will cause +// a panic if you try to access the array with it if it's truly out of bounds. +func (m Mat3x4) Index(row, col int) int { + return col*3 + row +} + +// Row returns a vector representing the corresponding row (starting at row 0). +// This package makes no distinction between row and column vectors, so it +// will be a normal VecM for a MxN matrix. +func (m Mat3x4) Row(row int) Vec4 { + return Vec4{m[row+0], m[row+3], m[row+6], m[row+9]} +} + +// Rows decomposes a matrix into its corresponding row vectors. +// This is equivalent to calling mat.Row for each row. +func (m Mat3x4) Rows() (row0, row1, row2 Vec4) { + return m.Row(0), m.Row(1), m.Row(2) +} + +// Col returns a vector representing the corresponding column (starting at col 0). +// This package makes no distinction between row and column vectors, so it +// will be a normal VecN for a MxN matrix. +func (m Mat3x4) Col(col int) Vec3 { + return Vec3{m[col*3+0], m[col*3+1], m[col*3+2]} +} + +// Cols decomposes a matrix into its corresponding column vectors. +// This is equivalent to calling mat.Col for each column. +func (m Mat3x4) Cols() (col0, col1, col2, col3 Vec3) { + return m.Col(0), m.Col(1), m.Col(2), m.Col(3) +} + +// Abs returns the element-wise absolute value of this matrix +func (m Mat3x4) Abs() Mat3x4 { + return Mat3x4{Abs(m[0]), Abs(m[1]), Abs(m[2]), Abs(m[3]), Abs(m[4]), Abs(m[5]), Abs(m[6]), Abs(m[7]), Abs(m[8]), Abs(m[9]), Abs(m[10]), Abs(m[11])} +} + +// Pretty prints the matrix +func (m Mat3x4) String() string { + buf := new(bytes.Buffer) + w := tabwriter.NewWriter(buf, 4, 4, 1, ' ', tabwriter.AlignRight) + for i := 0; i < 3; i++ { + for _, col := range m.Row(i) { + fmt.Fprintf(w, "%f\t", col) + } + + fmt.Fprintln(w, "") + } + w.Flush() + + return buf.String() +} + +// Sets a Column within the Matrix, so it mutates the calling matrix. +func (m *Mat4x2) SetCol(col int, v Vec4) { + m[col*4+0], m[col*4+1], m[col*4+2], m[col*4+3] = v[0], v[1], v[2], v[3] +} + +// Sets a Row within the Matrix, so it mutates the calling matrix. +func (m *Mat4x2) SetRow(row int, v Vec2) { + m[row+0], m[row+4] = v[0], v[1] +} + +// Mat4x2FromRows builds a new matrix from row vectors. +// The resulting matrix will still be in column major order, but this can be +// good for hand-building matrices. + +func Mat4x2FromRows(row0, row1, row2, row3 Vec2) Mat4x2 { + return Mat4x2{row0[0], row1[0], row2[0], row3[0], row0[1], row1[1], row2[1], row3[1]} +} + +// Mat4x2FromCols builds a new matrix from column vectors. +func Mat4x2FromCols(col0, col1 Vec4) Mat4x2 { + return Mat4x2{col0[0], col0[1], col0[2], col0[3], col1[0], col1[1], col1[2], col1[3]} +} + +// Add performs an element-wise addition of two matrices, this is +// equivalent to iterating over every element of m1 and adding the corresponding value of m2. +func (m1 Mat4x2) Add(m2 Mat4x2) Mat4x2 { + return Mat4x2{m1[0] + m2[0], m1[1] + m2[1], m1[2] + m2[2], m1[3] + m2[3], m1[4] + m2[4], m1[5] + m2[5], m1[6] + m2[6], m1[7] + m2[7]} +} + +// Sub performs an element-wise subtraction of two matrices, this is +// equivalent to iterating over every element of m1 and subtracting the corresponding value of m2. +func (m1 Mat4x2) Sub(m2 Mat4x2) Mat4x2 { + return Mat4x2{m1[0] - m2[0], m1[1] - m2[1], m1[2] - m2[2], m1[3] - m2[3], m1[4] - m2[4], m1[5] - m2[5], m1[6] - m2[6], m1[7] - m2[7]} +} + +// Mul performs a scalar multiplcation of the matrix. This is equivalent to iterating +// over every element of the matrix and multiply it by c. +func (m1 Mat4x2) Mul(c float32) Mat4x2 { + return Mat4x2{m1[0] * c, m1[1] * c, m1[2] * c, m1[3] * c, m1[4] * c, m1[5] * c, m1[6] * c, m1[7] * c} +} + +// Mul2x1 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat4x2) Mul2x1(m2 Vec2) Vec4 { + return Vec4{ + m1[0]*m2[0] + m1[4]*m2[1], + m1[1]*m2[0] + m1[5]*m2[1], + m1[2]*m2[0] + m1[6]*m2[1], + m1[3]*m2[0] + m1[7]*m2[1], + } +} + +// Mul2 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat4x2) Mul2(m2 Mat2) Mat4x2 { + return Mat4x2{ + m1[0]*m2[0] + m1[4]*m2[1], + m1[1]*m2[0] + m1[5]*m2[1], + m1[2]*m2[0] + m1[6]*m2[1], + m1[3]*m2[0] + m1[7]*m2[1], + m1[0]*m2[2] + m1[4]*m2[3], + m1[1]*m2[2] + m1[5]*m2[3], + m1[2]*m2[2] + m1[6]*m2[3], + m1[3]*m2[2] + m1[7]*m2[3], + } +} + +// Mul2x3 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat4x2) Mul2x3(m2 Mat2x3) Mat4x3 { + return Mat4x3{ + m1[0]*m2[0] + m1[4]*m2[1], + m1[1]*m2[0] + m1[5]*m2[1], + m1[2]*m2[0] + m1[6]*m2[1], + m1[3]*m2[0] + m1[7]*m2[1], + m1[0]*m2[2] + m1[4]*m2[3], + m1[1]*m2[2] + m1[5]*m2[3], + m1[2]*m2[2] + m1[6]*m2[3], + m1[3]*m2[2] + m1[7]*m2[3], + m1[0]*m2[4] + m1[4]*m2[5], + m1[1]*m2[4] + m1[5]*m2[5], + m1[2]*m2[4] + m1[6]*m2[5], + m1[3]*m2[4] + m1[7]*m2[5], + } +} + +// Mul2x4 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat4x2) Mul2x4(m2 Mat2x4) Mat4 { + return Mat4{ + m1[0]*m2[0] + m1[4]*m2[1], + m1[1]*m2[0] + m1[5]*m2[1], + m1[2]*m2[0] + m1[6]*m2[1], + m1[3]*m2[0] + m1[7]*m2[1], + m1[0]*m2[2] + m1[4]*m2[3], + m1[1]*m2[2] + m1[5]*m2[3], + m1[2]*m2[2] + m1[6]*m2[3], + m1[3]*m2[2] + m1[7]*m2[3], + m1[0]*m2[4] + m1[4]*m2[5], + m1[1]*m2[4] + m1[5]*m2[5], + m1[2]*m2[4] + m1[6]*m2[5], + m1[3]*m2[4] + m1[7]*m2[5], + m1[0]*m2[6] + m1[4]*m2[7], + m1[1]*m2[6] + m1[5]*m2[7], + m1[2]*m2[6] + m1[6]*m2[7], + m1[3]*m2[6] + m1[7]*m2[7], + } +} + +// Transpose produces the transpose of this matrix. For any MxN matrix +// the transpose is an NxM matrix with the rows swapped with the columns. For instance +// the transpose of the Mat3x2 is a Mat2x3 like so: +// +// [[a b]] [[a c e]] +// [[c d]] = [[b d f]] +// [[e f]] +func (m1 Mat4x2) Transpose() Mat2x4 { + return Mat2x4{m1[0], m1[4], m1[1], m1[5], m1[2], m1[6], m1[3], m1[7]} +} + +// ApproxEqual performs an element-wise approximate equality test between two matrices, +// as if FloatEqual had been used. +func (m1 Mat4x2) ApproxEqual(m2 Mat4x2) bool { + for i := range m1 { + if !FloatEqual(m1[i], m2[i]) { + return false + } + } + return true +} + +// ApproxEqualThreshold performs an element-wise approximate equality test between two matrices +// with a given epsilon threshold, as if FloatEqualThreshold had been used. +func (m1 Mat4x2) ApproxEqualThreshold(m2 Mat4x2, threshold float32) bool { + for i := range m1 { + if !FloatEqualThreshold(m1[i], m2[i], threshold) { + return false + } + } + return true +} + +// ApproxEqualFunc performs an element-wise approximate equality test between two matrices +// with a given equality functions, intended to be used with FloatEqualFunc; although and comparison +// function may be used in practice. +func (m1 Mat4x2) ApproxFuncEqual(m2 Mat4x2, eq func(float32, float32) bool) bool { + for i := range m1 { + if !eq(m1[i], m2[i]) { + return false + } + } + return true +} + +// At returns the matrix element at the given row and column. +// This is equivalent to mat[col * numRow + row] where numRow is constant +// (E.G. for a Mat3x2 it's equal to 3) +// +// This method is garbage-in garbage-out. For instance, on a Mat4 asking for +// At(5,0) will work just like At(1,1). Or it may panic if it's out of bounds. +func (m Mat4x2) At(row, col int) float32 { + return m[col*4+row] +} + +// Set sets the corresponding matrix element at the given row and column. +// This has a pointer receiver because it mutates the matrix. +// +// This method is garbage-in garbage-out. For instance, on a Mat4 asking for +// Set(5,0,val) will work just like Set(1,1,val). Or it may panic if it's out of bounds. +func (m *Mat4x2) Set(row, col int, value float32) { + m[col*4+row] = value +} + +// Index returns the index of the given row and column, to be used with direct +// access. E.G. Index(0,0) = 0. +// +// This is a garbage-in garbage-out method. For instance, on a Mat4 asking for the index of +// (5,0) will work the same as asking for (1,1). Or it may give you a value that will cause +// a panic if you try to access the array with it if it's truly out of bounds. +func (m Mat4x2) Index(row, col int) int { + return col*4 + row +} + +// Row returns a vector representing the corresponding row (starting at row 0). +// This package makes no distinction between row and column vectors, so it +// will be a normal VecM for a MxN matrix. +func (m Mat4x2) Row(row int) Vec2 { + return Vec2{m[row+0], m[row+4]} +} + +// Rows decomposes a matrix into its corresponding row vectors. +// This is equivalent to calling mat.Row for each row. +func (m Mat4x2) Rows() (row0, row1, row2, row3 Vec2) { + return m.Row(0), m.Row(1), m.Row(2), m.Row(3) +} + +// Col returns a vector representing the corresponding column (starting at col 0). +// This package makes no distinction between row and column vectors, so it +// will be a normal VecN for a MxN matrix. +func (m Mat4x2) Col(col int) Vec4 { + return Vec4{m[col*4+0], m[col*4+1], m[col*4+2], m[col*4+3]} +} + +// Cols decomposes a matrix into its corresponding column vectors. +// This is equivalent to calling mat.Col for each column. +func (m Mat4x2) Cols() (col0, col1 Vec4) { + return m.Col(0), m.Col(1) +} + +// Abs returns the element-wise absolute value of this matrix +func (m Mat4x2) Abs() Mat4x2 { + return Mat4x2{Abs(m[0]), Abs(m[1]), Abs(m[2]), Abs(m[3]), Abs(m[4]), Abs(m[5]), Abs(m[6]), Abs(m[7])} +} + +// Pretty prints the matrix +func (m Mat4x2) String() string { + buf := new(bytes.Buffer) + w := tabwriter.NewWriter(buf, 4, 4, 1, ' ', tabwriter.AlignRight) + for i := 0; i < 4; i++ { + for _, col := range m.Row(i) { + fmt.Fprintf(w, "%f\t", col) + } + + fmt.Fprintln(w, "") + } + w.Flush() + + return buf.String() +} + +// Sets a Column within the Matrix, so it mutates the calling matrix. +func (m *Mat4x3) SetCol(col int, v Vec4) { + m[col*4+0], m[col*4+1], m[col*4+2], m[col*4+3] = v[0], v[1], v[2], v[3] +} + +// Sets a Row within the Matrix, so it mutates the calling matrix. +func (m *Mat4x3) SetRow(row int, v Vec3) { + m[row+0], m[row+4], m[row+8] = v[0], v[1], v[2] +} + +// Mat4x3FromRows builds a new matrix from row vectors. +// The resulting matrix will still be in column major order, but this can be +// good for hand-building matrices. + +func Mat4x3FromRows(row0, row1, row2, row3 Vec3) Mat4x3 { + return Mat4x3{row0[0], row1[0], row2[0], row3[0], row0[1], row1[1], row2[1], row3[1], row0[2], row1[2], row2[2], row3[2]} +} + +// Mat4x3FromCols builds a new matrix from column vectors. +func Mat4x3FromCols(col0, col1, col2 Vec4) Mat4x3 { + return Mat4x3{col0[0], col0[1], col0[2], col0[3], col1[0], col1[1], col1[2], col1[3], col2[0], col2[1], col2[2], col2[3]} +} + +// Add performs an element-wise addition of two matrices, this is +// equivalent to iterating over every element of m1 and adding the corresponding value of m2. +func (m1 Mat4x3) Add(m2 Mat4x3) Mat4x3 { + return Mat4x3{m1[0] + m2[0], m1[1] + m2[1], m1[2] + m2[2], m1[3] + m2[3], m1[4] + m2[4], m1[5] + m2[5], m1[6] + m2[6], m1[7] + m2[7], m1[8] + m2[8], m1[9] + m2[9], m1[10] + m2[10], m1[11] + m2[11]} +} + +// Sub performs an element-wise subtraction of two matrices, this is +// equivalent to iterating over every element of m1 and subtracting the corresponding value of m2. +func (m1 Mat4x3) Sub(m2 Mat4x3) Mat4x3 { + return Mat4x3{m1[0] - m2[0], m1[1] - m2[1], m1[2] - m2[2], m1[3] - m2[3], m1[4] - m2[4], m1[5] - m2[5], m1[6] - m2[6], m1[7] - m2[7], m1[8] - m2[8], m1[9] - m2[9], m1[10] - m2[10], m1[11] - m2[11]} +} + +// Mul performs a scalar multiplcation of the matrix. This is equivalent to iterating +// over every element of the matrix and multiply it by c. +func (m1 Mat4x3) Mul(c float32) Mat4x3 { + return Mat4x3{m1[0] * c, m1[1] * c, m1[2] * c, m1[3] * c, m1[4] * c, m1[5] * c, m1[6] * c, m1[7] * c, m1[8] * c, m1[9] * c, m1[10] * c, m1[11] * c} +} + +// Mul3x1 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat4x3) Mul3x1(m2 Vec3) Vec4 { + return Vec4{ + m1[0]*m2[0] + m1[4]*m2[1] + m1[8]*m2[2], + m1[1]*m2[0] + m1[5]*m2[1] + m1[9]*m2[2], + m1[2]*m2[0] + m1[6]*m2[1] + m1[10]*m2[2], + m1[3]*m2[0] + m1[7]*m2[1] + m1[11]*m2[2], + } +} + +// Mul3x2 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat4x3) Mul3x2(m2 Mat3x2) Mat4x2 { + return Mat4x2{ + m1[0]*m2[0] + m1[4]*m2[1] + m1[8]*m2[2], + m1[1]*m2[0] + m1[5]*m2[1] + m1[9]*m2[2], + m1[2]*m2[0] + m1[6]*m2[1] + m1[10]*m2[2], + m1[3]*m2[0] + m1[7]*m2[1] + m1[11]*m2[2], + m1[0]*m2[3] + m1[4]*m2[4] + m1[8]*m2[5], + m1[1]*m2[3] + m1[5]*m2[4] + m1[9]*m2[5], + m1[2]*m2[3] + m1[6]*m2[4] + m1[10]*m2[5], + m1[3]*m2[3] + m1[7]*m2[4] + m1[11]*m2[5], + } +} + +// Mul3 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat4x3) Mul3(m2 Mat3) Mat4x3 { + return Mat4x3{ + m1[0]*m2[0] + m1[4]*m2[1] + m1[8]*m2[2], + m1[1]*m2[0] + m1[5]*m2[1] + m1[9]*m2[2], + m1[2]*m2[0] + m1[6]*m2[1] + m1[10]*m2[2], + m1[3]*m2[0] + m1[7]*m2[1] + m1[11]*m2[2], + m1[0]*m2[3] + m1[4]*m2[4] + m1[8]*m2[5], + m1[1]*m2[3] + m1[5]*m2[4] + m1[9]*m2[5], + m1[2]*m2[3] + m1[6]*m2[4] + m1[10]*m2[5], + m1[3]*m2[3] + m1[7]*m2[4] + m1[11]*m2[5], + m1[0]*m2[6] + m1[4]*m2[7] + m1[8]*m2[8], + m1[1]*m2[6] + m1[5]*m2[7] + m1[9]*m2[8], + m1[2]*m2[6] + m1[6]*m2[7] + m1[10]*m2[8], + m1[3]*m2[6] + m1[7]*m2[7] + m1[11]*m2[8], + } +} + +// Mul3x4 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat4x3) Mul3x4(m2 Mat3x4) Mat4 { + return Mat4{ + m1[0]*m2[0] + m1[4]*m2[1] + m1[8]*m2[2], + m1[1]*m2[0] + m1[5]*m2[1] + m1[9]*m2[2], + m1[2]*m2[0] + m1[6]*m2[1] + m1[10]*m2[2], + m1[3]*m2[0] + m1[7]*m2[1] + m1[11]*m2[2], + m1[0]*m2[3] + m1[4]*m2[4] + m1[8]*m2[5], + m1[1]*m2[3] + m1[5]*m2[4] + m1[9]*m2[5], + m1[2]*m2[3] + m1[6]*m2[4] + m1[10]*m2[5], + m1[3]*m2[3] + m1[7]*m2[4] + m1[11]*m2[5], + m1[0]*m2[6] + m1[4]*m2[7] + m1[8]*m2[8], + m1[1]*m2[6] + m1[5]*m2[7] + m1[9]*m2[8], + m1[2]*m2[6] + m1[6]*m2[7] + m1[10]*m2[8], + m1[3]*m2[6] + m1[7]*m2[7] + m1[11]*m2[8], + m1[0]*m2[9] + m1[4]*m2[10] + m1[8]*m2[11], + m1[1]*m2[9] + m1[5]*m2[10] + m1[9]*m2[11], + m1[2]*m2[9] + m1[6]*m2[10] + m1[10]*m2[11], + m1[3]*m2[9] + m1[7]*m2[10] + m1[11]*m2[11], + } +} + +// Transpose produces the transpose of this matrix. For any MxN matrix +// the transpose is an NxM matrix with the rows swapped with the columns. For instance +// the transpose of the Mat3x2 is a Mat2x3 like so: +// +// [[a b]] [[a c e]] +// [[c d]] = [[b d f]] +// [[e f]] +func (m1 Mat4x3) Transpose() Mat3x4 { + return Mat3x4{m1[0], m1[4], m1[8], m1[1], m1[5], m1[9], m1[2], m1[6], m1[10], m1[3], m1[7], m1[11]} +} + +// ApproxEqual performs an element-wise approximate equality test between two matrices, +// as if FloatEqual had been used. +func (m1 Mat4x3) ApproxEqual(m2 Mat4x3) bool { + for i := range m1 { + if !FloatEqual(m1[i], m2[i]) { + return false + } + } + return true +} + +// ApproxEqualThreshold performs an element-wise approximate equality test between two matrices +// with a given epsilon threshold, as if FloatEqualThreshold had been used. +func (m1 Mat4x3) ApproxEqualThreshold(m2 Mat4x3, threshold float32) bool { + for i := range m1 { + if !FloatEqualThreshold(m1[i], m2[i], threshold) { + return false + } + } + return true +} + +// ApproxEqualFunc performs an element-wise approximate equality test between two matrices +// with a given equality functions, intended to be used with FloatEqualFunc; although and comparison +// function may be used in practice. +func (m1 Mat4x3) ApproxFuncEqual(m2 Mat4x3, eq func(float32, float32) bool) bool { + for i := range m1 { + if !eq(m1[i], m2[i]) { + return false + } + } + return true +} + +// At returns the matrix element at the given row and column. +// This is equivalent to mat[col * numRow + row] where numRow is constant +// (E.G. for a Mat3x2 it's equal to 3) +// +// This method is garbage-in garbage-out. For instance, on a Mat4 asking for +// At(5,0) will work just like At(1,1). Or it may panic if it's out of bounds. +func (m Mat4x3) At(row, col int) float32 { + return m[col*4+row] +} + +// Set sets the corresponding matrix element at the given row and column. +// This has a pointer receiver because it mutates the matrix. +// +// This method is garbage-in garbage-out. For instance, on a Mat4 asking for +// Set(5,0,val) will work just like Set(1,1,val). Or it may panic if it's out of bounds. +func (m *Mat4x3) Set(row, col int, value float32) { + m[col*4+row] = value +} + +// Index returns the index of the given row and column, to be used with direct +// access. E.G. Index(0,0) = 0. +// +// This is a garbage-in garbage-out method. For instance, on a Mat4 asking for the index of +// (5,0) will work the same as asking for (1,1). Or it may give you a value that will cause +// a panic if you try to access the array with it if it's truly out of bounds. +func (m Mat4x3) Index(row, col int) int { + return col*4 + row +} + +// Row returns a vector representing the corresponding row (starting at row 0). +// This package makes no distinction between row and column vectors, so it +// will be a normal VecM for a MxN matrix. +func (m Mat4x3) Row(row int) Vec3 { + return Vec3{m[row+0], m[row+4], m[row+8]} +} + +// Rows decomposes a matrix into its corresponding row vectors. +// This is equivalent to calling mat.Row for each row. +func (m Mat4x3) Rows() (row0, row1, row2, row3 Vec3) { + return m.Row(0), m.Row(1), m.Row(2), m.Row(3) +} + +// Col returns a vector representing the corresponding column (starting at col 0). +// This package makes no distinction between row and column vectors, so it +// will be a normal VecN for a MxN matrix. +func (m Mat4x3) Col(col int) Vec4 { + return Vec4{m[col*4+0], m[col*4+1], m[col*4+2], m[col*4+3]} +} + +// Cols decomposes a matrix into its corresponding column vectors. +// This is equivalent to calling mat.Col for each column. +func (m Mat4x3) Cols() (col0, col1, col2 Vec4) { + return m.Col(0), m.Col(1), m.Col(2) +} + +// Abs returns the element-wise absolute value of this matrix +func (m Mat4x3) Abs() Mat4x3 { + return Mat4x3{Abs(m[0]), Abs(m[1]), Abs(m[2]), Abs(m[3]), Abs(m[4]), Abs(m[5]), Abs(m[6]), Abs(m[7]), Abs(m[8]), Abs(m[9]), Abs(m[10]), Abs(m[11])} +} + +// Pretty prints the matrix +func (m Mat4x3) String() string { + buf := new(bytes.Buffer) + w := tabwriter.NewWriter(buf, 4, 4, 1, ' ', tabwriter.AlignRight) + for i := 0; i < 4; i++ { + for _, col := range m.Row(i) { + fmt.Fprintf(w, "%f\t", col) + } + + fmt.Fprintln(w, "") + } + w.Flush() + + return buf.String() +} + +// Sets a Column within the Matrix, so it mutates the calling matrix. +func (m *Mat4) SetCol(col int, v Vec4) { + m[col*4+0], m[col*4+1], m[col*4+2], m[col*4+3] = v[0], v[1], v[2], v[3] +} + +// Sets a Row within the Matrix, so it mutates the calling matrix. +func (m *Mat4) SetRow(row int, v Vec4) { + m[row+0], m[row+4], m[row+8], m[row+12] = v[0], v[1], v[2], v[3] +} + +// Diag is a basic operation on a square matrix that simply +// returns main diagonal (meaning all elements such that row==col). +func (m Mat4) Diag() Vec4 { + return Vec4{m[0], m[5], m[10], m[15]} +} + +// Ident4 returns the 4x4 identity matrix. +// The identity matrix is a square matrix with the value 1 on its +// diagonals. The characteristic property of the identity matrix is that +// any matrix multiplied by it is itself. (MI = M; IN = N) +func Ident4() Mat4 { + return Mat4{1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1} +} + +// Diag4 creates a diagonal matrix from the entries of the input vector. +// That is, for each pointer for row==col, vector[row] is the entry. Otherwise it's 0. +// +// Another way to think about it is that the identity is this function where the every vector element is 1. +func Diag4(v Vec4) Mat4 { + var m Mat4 + m[0], m[5], m[10], m[15] = v[0], v[1], v[2], v[3] + return m +} + +// Mat4FromRows builds a new matrix from row vectors. +// The resulting matrix will still be in column major order, but this can be +// good for hand-building matrices. + +func Mat4FromRows(row0, row1, row2, row3 Vec4) Mat4 { + return Mat4{row0[0], row1[0], row2[0], row3[0], row0[1], row1[1], row2[1], row3[1], row0[2], row1[2], row2[2], row3[2], row0[3], row1[3], row2[3], row3[3]} +} + +// Mat4FromCols builds a new matrix from column vectors. +func Mat4FromCols(col0, col1, col2, col3 Vec4) Mat4 { + return Mat4{col0[0], col0[1], col0[2], col0[3], col1[0], col1[1], col1[2], col1[3], col2[0], col2[1], col2[2], col2[3], col3[0], col3[1], col3[2], col3[3]} +} + +// Add performs an element-wise addition of two matrices, this is +// equivalent to iterating over every element of m1 and adding the corresponding value of m2. +func (m1 Mat4) Add(m2 Mat4) Mat4 { + return Mat4{m1[0] + m2[0], m1[1] + m2[1], m1[2] + m2[2], m1[3] + m2[3], m1[4] + m2[4], m1[5] + m2[5], m1[6] + m2[6], m1[7] + m2[7], m1[8] + m2[8], m1[9] + m2[9], m1[10] + m2[10], m1[11] + m2[11], m1[12] + m2[12], m1[13] + m2[13], m1[14] + m2[14], m1[15] + m2[15]} +} + +// Sub performs an element-wise subtraction of two matrices, this is +// equivalent to iterating over every element of m1 and subtracting the corresponding value of m2. +func (m1 Mat4) Sub(m2 Mat4) Mat4 { + return Mat4{m1[0] - m2[0], m1[1] - m2[1], m1[2] - m2[2], m1[3] - m2[3], m1[4] - m2[4], m1[5] - m2[5], m1[6] - m2[6], m1[7] - m2[7], m1[8] - m2[8], m1[9] - m2[9], m1[10] - m2[10], m1[11] - m2[11], m1[12] - m2[12], m1[13] - m2[13], m1[14] - m2[14], m1[15] - m2[15]} +} + +// Mul performs a scalar multiplcation of the matrix. This is equivalent to iterating +// over every element of the matrix and multiply it by c. +func (m1 Mat4) Mul(c float32) Mat4 { + return Mat4{m1[0] * c, m1[1] * c, m1[2] * c, m1[3] * c, m1[4] * c, m1[5] * c, m1[6] * c, m1[7] * c, m1[8] * c, m1[9] * c, m1[10] * c, m1[11] * c, m1[12] * c, m1[13] * c, m1[14] * c, m1[15] * c} +} + +// Mul4x1 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat4) Mul4x1(m2 Vec4) Vec4 { + return Vec4{ + m1[0]*m2[0] + m1[4]*m2[1] + m1[8]*m2[2] + m1[12]*m2[3], + m1[1]*m2[0] + m1[5]*m2[1] + m1[9]*m2[2] + m1[13]*m2[3], + m1[2]*m2[0] + m1[6]*m2[1] + m1[10]*m2[2] + m1[14]*m2[3], + m1[3]*m2[0] + m1[7]*m2[1] + m1[11]*m2[2] + m1[15]*m2[3], + } +} + +// Mul4x2 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat4) Mul4x2(m2 Mat4x2) Mat4x2 { + return Mat4x2{ + m1[0]*m2[0] + m1[4]*m2[1] + m1[8]*m2[2] + m1[12]*m2[3], + m1[1]*m2[0] + m1[5]*m2[1] + m1[9]*m2[2] + m1[13]*m2[3], + m1[2]*m2[0] + m1[6]*m2[1] + m1[10]*m2[2] + m1[14]*m2[3], + m1[3]*m2[0] + m1[7]*m2[1] + m1[11]*m2[2] + m1[15]*m2[3], + m1[0]*m2[4] + m1[4]*m2[5] + m1[8]*m2[6] + m1[12]*m2[7], + m1[1]*m2[4] + m1[5]*m2[5] + m1[9]*m2[6] + m1[13]*m2[7], + m1[2]*m2[4] + m1[6]*m2[5] + m1[10]*m2[6] + m1[14]*m2[7], + m1[3]*m2[4] + m1[7]*m2[5] + m1[11]*m2[6] + m1[15]*m2[7], + } +} + +// Mul4x3 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat4) Mul4x3(m2 Mat4x3) Mat4x3 { + return Mat4x3{ + m1[0]*m2[0] + m1[4]*m2[1] + m1[8]*m2[2] + m1[12]*m2[3], + m1[1]*m2[0] + m1[5]*m2[1] + m1[9]*m2[2] + m1[13]*m2[3], + m1[2]*m2[0] + m1[6]*m2[1] + m1[10]*m2[2] + m1[14]*m2[3], + m1[3]*m2[0] + m1[7]*m2[1] + m1[11]*m2[2] + m1[15]*m2[3], + m1[0]*m2[4] + m1[4]*m2[5] + m1[8]*m2[6] + m1[12]*m2[7], + m1[1]*m2[4] + m1[5]*m2[5] + m1[9]*m2[6] + m1[13]*m2[7], + m1[2]*m2[4] + m1[6]*m2[5] + m1[10]*m2[6] + m1[14]*m2[7], + m1[3]*m2[4] + m1[7]*m2[5] + m1[11]*m2[6] + m1[15]*m2[7], + m1[0]*m2[8] + m1[4]*m2[9] + m1[8]*m2[10] + m1[12]*m2[11], + m1[1]*m2[8] + m1[5]*m2[9] + m1[9]*m2[10] + m1[13]*m2[11], + m1[2]*m2[8] + m1[6]*m2[9] + m1[10]*m2[10] + m1[14]*m2[11], + m1[3]*m2[8] + m1[7]*m2[9] + m1[11]*m2[10] + m1[15]*m2[11], + } +} + +// Mul4 performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 Mat4) Mul4(m2 Mat4) Mat4 { + return Mat4{ + m1[0]*m2[0] + m1[4]*m2[1] + m1[8]*m2[2] + m1[12]*m2[3], + m1[1]*m2[0] + m1[5]*m2[1] + m1[9]*m2[2] + m1[13]*m2[3], + m1[2]*m2[0] + m1[6]*m2[1] + m1[10]*m2[2] + m1[14]*m2[3], + m1[3]*m2[0] + m1[7]*m2[1] + m1[11]*m2[2] + m1[15]*m2[3], + m1[0]*m2[4] + m1[4]*m2[5] + m1[8]*m2[6] + m1[12]*m2[7], + m1[1]*m2[4] + m1[5]*m2[5] + m1[9]*m2[6] + m1[13]*m2[7], + m1[2]*m2[4] + m1[6]*m2[5] + m1[10]*m2[6] + m1[14]*m2[7], + m1[3]*m2[4] + m1[7]*m2[5] + m1[11]*m2[6] + m1[15]*m2[7], + m1[0]*m2[8] + m1[4]*m2[9] + m1[8]*m2[10] + m1[12]*m2[11], + m1[1]*m2[8] + m1[5]*m2[9] + m1[9]*m2[10] + m1[13]*m2[11], + m1[2]*m2[8] + m1[6]*m2[9] + m1[10]*m2[10] + m1[14]*m2[11], + m1[3]*m2[8] + m1[7]*m2[9] + m1[11]*m2[10] + m1[15]*m2[11], + m1[0]*m2[12] + m1[4]*m2[13] + m1[8]*m2[14] + m1[12]*m2[15], + m1[1]*m2[12] + m1[5]*m2[13] + m1[9]*m2[14] + m1[13]*m2[15], + m1[2]*m2[12] + m1[6]*m2[13] + m1[10]*m2[14] + m1[14]*m2[15], + m1[3]*m2[12] + m1[7]*m2[13] + m1[11]*m2[14] + m1[15]*m2[15], + } +} + +// Transpose produces the transpose of this matrix. For any MxN matrix +// the transpose is an NxM matrix with the rows swapped with the columns. For instance +// the transpose of the Mat3x2 is a Mat2x3 like so: +// +// [[a b]] [[a c e]] +// [[c d]] = [[b d f]] +// [[e f]] +func (m1 Mat4) Transpose() Mat4 { + return Mat4{m1[0], m1[4], m1[8], m1[12], m1[1], m1[5], m1[9], m1[13], m1[2], m1[6], m1[10], m1[14], m1[3], m1[7], m1[11], m1[15]} +} + +// The determinant of a matrix is a measure of a square matrix's +// singularity and invertability, among other things. In this library, the +// determinant is hard coded based on pre-computed cofactor expansion, and uses +// no loops. Of course, the addition and multiplication must still be done. +func (m Mat4) Det() float32 { + return m[0]*m[5]*m[10]*m[15] - m[0]*m[5]*m[11]*m[14] - m[0]*m[6]*m[9]*m[15] + m[0]*m[6]*m[11]*m[13] + m[0]*m[7]*m[9]*m[14] - m[0]*m[7]*m[10]*m[13] - m[1]*m[4]*m[10]*m[15] + m[1]*m[4]*m[11]*m[14] + m[1]*m[6]*m[8]*m[15] - m[1]*m[6]*m[11]*m[12] - m[1]*m[7]*m[8]*m[14] + m[1]*m[7]*m[10]*m[12] + m[2]*m[4]*m[9]*m[15] - m[2]*m[4]*m[11]*m[13] - m[2]*m[5]*m[8]*m[15] + m[2]*m[5]*m[11]*m[12] + m[2]*m[7]*m[8]*m[13] - m[2]*m[7]*m[9]*m[12] - m[3]*m[4]*m[9]*m[14] + m[3]*m[4]*m[10]*m[13] + m[3]*m[5]*m[8]*m[14] - m[3]*m[5]*m[10]*m[12] - m[3]*m[6]*m[8]*m[13] + m[3]*m[6]*m[9]*m[12] +} + +// Inv computes the inverse of a square matrix. An inverse is a square matrix such that when multiplied by the +// original, yields the identity. +// +// M_inv * M = M * M_inv = I +// +// In this library, the math is precomputed, and uses no loops, though the multiplications, additions, determinant calculation, and scaling +// are still done. This can still be (relatively) expensive for a 4x4. +// +// This function checks the determinant to see if the matrix is invertible. +// If the determinant is 0.0, this function returns the zero matrix. However, due to floating point errors, it is +// entirely plausible to get a false positive or negative. +// In the future, an alternate function may be written which takes in a pre-computed determinant. +func (m Mat4) Inv() Mat4 { + det := m.Det() + if FloatEqual(det, float32(0.0)) { + return Mat4{} + } + + retMat := Mat4{ + -m[7]*m[10]*m[13] + m[6]*m[11]*m[13] + m[7]*m[9]*m[14] - m[5]*m[11]*m[14] - m[6]*m[9]*m[15] + m[5]*m[10]*m[15], + m[3]*m[10]*m[13] - m[2]*m[11]*m[13] - m[3]*m[9]*m[14] + m[1]*m[11]*m[14] + m[2]*m[9]*m[15] - m[1]*m[10]*m[15], + -m[3]*m[6]*m[13] + m[2]*m[7]*m[13] + m[3]*m[5]*m[14] - m[1]*m[7]*m[14] - m[2]*m[5]*m[15] + m[1]*m[6]*m[15], + m[3]*m[6]*m[9] - m[2]*m[7]*m[9] - m[3]*m[5]*m[10] + m[1]*m[7]*m[10] + m[2]*m[5]*m[11] - m[1]*m[6]*m[11], + m[7]*m[10]*m[12] - m[6]*m[11]*m[12] - m[7]*m[8]*m[14] + m[4]*m[11]*m[14] + m[6]*m[8]*m[15] - m[4]*m[10]*m[15], + -m[3]*m[10]*m[12] + m[2]*m[11]*m[12] + m[3]*m[8]*m[14] - m[0]*m[11]*m[14] - m[2]*m[8]*m[15] + m[0]*m[10]*m[15], + m[3]*m[6]*m[12] - m[2]*m[7]*m[12] - m[3]*m[4]*m[14] + m[0]*m[7]*m[14] + m[2]*m[4]*m[15] - m[0]*m[6]*m[15], + -m[3]*m[6]*m[8] + m[2]*m[7]*m[8] + m[3]*m[4]*m[10] - m[0]*m[7]*m[10] - m[2]*m[4]*m[11] + m[0]*m[6]*m[11], + -m[7]*m[9]*m[12] + m[5]*m[11]*m[12] + m[7]*m[8]*m[13] - m[4]*m[11]*m[13] - m[5]*m[8]*m[15] + m[4]*m[9]*m[15], + m[3]*m[9]*m[12] - m[1]*m[11]*m[12] - m[3]*m[8]*m[13] + m[0]*m[11]*m[13] + m[1]*m[8]*m[15] - m[0]*m[9]*m[15], + -m[3]*m[5]*m[12] + m[1]*m[7]*m[12] + m[3]*m[4]*m[13] - m[0]*m[7]*m[13] - m[1]*m[4]*m[15] + m[0]*m[5]*m[15], + m[3]*m[5]*m[8] - m[1]*m[7]*m[8] - m[3]*m[4]*m[9] + m[0]*m[7]*m[9] + m[1]*m[4]*m[11] - m[0]*m[5]*m[11], + m[6]*m[9]*m[12] - m[5]*m[10]*m[12] - m[6]*m[8]*m[13] + m[4]*m[10]*m[13] + m[5]*m[8]*m[14] - m[4]*m[9]*m[14], + -m[2]*m[9]*m[12] + m[1]*m[10]*m[12] + m[2]*m[8]*m[13] - m[0]*m[10]*m[13] - m[1]*m[8]*m[14] + m[0]*m[9]*m[14], + m[2]*m[5]*m[12] - m[1]*m[6]*m[12] - m[2]*m[4]*m[13] + m[0]*m[6]*m[13] + m[1]*m[4]*m[14] - m[0]*m[5]*m[14], + -m[2]*m[5]*m[8] + m[1]*m[6]*m[8] + m[2]*m[4]*m[9] - m[0]*m[6]*m[9] - m[1]*m[4]*m[10] + m[0]*m[5]*m[10], + } + + return retMat.Mul(1 / det) +} + +// ApproxEqual performs an element-wise approximate equality test between two matrices, +// as if FloatEqual had been used. +func (m1 Mat4) ApproxEqual(m2 Mat4) bool { + for i := range m1 { + if !FloatEqual(m1[i], m2[i]) { + return false + } + } + return true +} + +// ApproxEqualThreshold performs an element-wise approximate equality test between two matrices +// with a given epsilon threshold, as if FloatEqualThreshold had been used. +func (m1 Mat4) ApproxEqualThreshold(m2 Mat4, threshold float32) bool { + for i := range m1 { + if !FloatEqualThreshold(m1[i], m2[i], threshold) { + return false + } + } + return true +} + +// ApproxEqualFunc performs an element-wise approximate equality test between two matrices +// with a given equality functions, intended to be used with FloatEqualFunc; although and comparison +// function may be used in practice. +func (m1 Mat4) ApproxFuncEqual(m2 Mat4, eq func(float32, float32) bool) bool { + for i := range m1 { + if !eq(m1[i], m2[i]) { + return false + } + } + return true +} + +// At returns the matrix element at the given row and column. +// This is equivalent to mat[col * numRow + row] where numRow is constant +// (E.G. for a Mat3x2 it's equal to 3) +// +// This method is garbage-in garbage-out. For instance, on a Mat4 asking for +// At(5,0) will work just like At(1,1). Or it may panic if it's out of bounds. +func (m Mat4) At(row, col int) float32 { + return m[col*4+row] +} + +// Set sets the corresponding matrix element at the given row and column. +// This has a pointer receiver because it mutates the matrix. +// +// This method is garbage-in garbage-out. For instance, on a Mat4 asking for +// Set(5,0,val) will work just like Set(1,1,val). Or it may panic if it's out of bounds. +func (m *Mat4) Set(row, col int, value float32) { + m[col*4+row] = value +} + +// Index returns the index of the given row and column, to be used with direct +// access. E.G. Index(0,0) = 0. +// +// This is a garbage-in garbage-out method. For instance, on a Mat4 asking for the index of +// (5,0) will work the same as asking for (1,1). Or it may give you a value that will cause +// a panic if you try to access the array with it if it's truly out of bounds. +func (m Mat4) Index(row, col int) int { + return col*4 + row +} + +// Row returns a vector representing the corresponding row (starting at row 0). +// This package makes no distinction between row and column vectors, so it +// will be a normal VecM for a MxN matrix. +func (m Mat4) Row(row int) Vec4 { + return Vec4{m[row+0], m[row+4], m[row+8], m[row+12]} +} + +// Rows decomposes a matrix into its corresponding row vectors. +// This is equivalent to calling mat.Row for each row. +func (m Mat4) Rows() (row0, row1, row2, row3 Vec4) { + return m.Row(0), m.Row(1), m.Row(2), m.Row(3) +} + +// Col returns a vector representing the corresponding column (starting at col 0). +// This package makes no distinction between row and column vectors, so it +// will be a normal VecN for a MxN matrix. +func (m Mat4) Col(col int) Vec4 { + return Vec4{m[col*4+0], m[col*4+1], m[col*4+2], m[col*4+3]} +} + +// Cols decomposes a matrix into its corresponding column vectors. +// This is equivalent to calling mat.Col for each column. +func (m Mat4) Cols() (col0, col1, col2, col3 Vec4) { + return m.Col(0), m.Col(1), m.Col(2), m.Col(3) +} + +// Trace is a basic operation on a square matrix that simply +// sums up all elements on the main diagonal (meaning all elements such that row==col). +func (m Mat4) Trace() float32 { + return m[0] + m[5] + m[10] + m[15] +} + +// Abs returns the element-wise absolute value of this matrix +func (m Mat4) Abs() Mat4 { + return Mat4{Abs(m[0]), Abs(m[1]), Abs(m[2]), Abs(m[3]), Abs(m[4]), Abs(m[5]), Abs(m[6]), Abs(m[7]), Abs(m[8]), Abs(m[9]), Abs(m[10]), Abs(m[11]), Abs(m[12]), Abs(m[13]), Abs(m[14]), Abs(m[15])} +} + +// Pretty prints the matrix +func (m Mat4) String() string { + buf := new(bytes.Buffer) + w := tabwriter.NewWriter(buf, 4, 4, 1, ' ', tabwriter.AlignRight) + for i := 0; i < 4; i++ { + for _, col := range m.Row(i) { + fmt.Fprintf(w, "%f\t", col) + } + + fmt.Fprintln(w, "") + } + w.Flush() + + return buf.String() +} diff --git a/vendor/github.com/go-gl/mathgl/mgl32/matrix.tmpl b/vendor/github.com/go-gl/mathgl/mgl32/matrix.tmpl new file mode 100644 index 0000000..ab32e58 --- /dev/null +++ b/vendor/github.com/go-gl/mathgl/mgl32/matrix.tmpl @@ -0,0 +1,370 @@ +// Copyright 2014 The go-gl/mathgl Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// <<.Comment>> +// Edit <<.TemplateName>> and run "go generate" to make changes. + +package mgl32 + +import ( + "bytes" + "fmt" + "golang.org/x/image/math/f32" + "text/tabwriter" +) + +type Mat2 [4]float32 +type Mat2x3 [6]float32 +type Mat2x4 [8]float32 +type Mat3x2 [6]float32 +type Mat3 f32.Mat3 +type Mat3x4 [12]float32 +type Mat4x2 [8]float32 +type Mat4x3 [12]float32 +type Mat4 f32.Mat4 + +func (m Mat2) Mat3() Mat3 { + col0, col1 := m.Cols() + return Mat3FromCols( + col0.Vec3(0), + col1.Vec3(0), + Vec3{0, 0, 1}, + ) +} + +func (m Mat2) Mat4() Mat4 { + col0, col1 := m.Cols() + return Mat4FromCols( + col0.Vec4(0, 0), + col1.Vec4(0, 0), + Vec4{0, 0, 1, 0}, + Vec4{0, 0, 0, 1}, + ) +} + +func (m Mat3) Mat2() Mat2 { + col0, col1, _ := m.Cols() + return Mat2FromCols( + col0.Vec2(), + col1.Vec2(), + ) +} + +func (m Mat3) Mat4() Mat4 { + col0, col1, col2 := m.Cols() + return Mat4FromCols( + col0.Vec4(0), + col1.Vec4(0), + col2.Vec4(0), + Vec4{0, 0, 0, 1}, + ) +} + +func (m Mat4) Mat2() Mat2 { + col0, col1, _, _ := m.Cols() + return Mat2FromCols( + col0.Vec2(), + col1.Vec2(), + ) +} + +func (m Mat4) Mat3() Mat3 { + col0, col1, col2, _ := m.Cols() + return Mat3FromCols( + col0.Vec3(), + col1.Vec3(), + col2.Vec3(), + ) +} + + +<> +<><> +<<$type := typename $m $n>> + +// Sets a Column within the Matrix, so it mutates the calling matrix. +func (m *<<$type>>) SetCol(col int, v <>) { + <><>m[col*<<$m>>+<<$i>>]<> = <> +} + +// Sets a Row within the Matrix, so it mutates the calling matrix. +func (m *<<$type>>) SetRow(row int, v <>) { + <><>m[row+<>]<> = <> +} + +<> +// Diag is a basic operation on a square matrix that simply +// returns main diagonal (meaning all elements such that row==col). +func (m <<$type>>) Diag() <> { + return <>{<>m[<>],<>} +} +<> + +<> +// Ident<<$m>> returns the <<$m>>x<<$n>> identity matrix. +// The identity matrix is a square matrix with the value 1 on its +// diagonals. The characteristic property of the identity matrix is that +// any matrix multiplied by it is itself. (MI = M; IN = N) +func Ident<<$m>>() <<$type>> { + return <<$type>>{<><>1<>0<>,<>} +} +<> + +<> +// Diag<<$m>> creates a diagonal matrix from the entries of the input vector. +// That is, for each pointer for row==col, vector[row] is the entry. Otherwise it's 0. +// +// Another way to think about it is that the identity is this function where the every vector element is 1. +func Diag<<$m>>(v <>) <<$type>> { + var m <<$type>> + <><>m[<>]<> = <> + return m +} +<> + +// <<$type>>FromRows builds a new matrix from row vectors. +// The resulting matrix will still be in column major order, but this can be +// good for hand-building matrices. + +func <<$type>>FromRows(<><>row<<$i>><> <>) <<$type>> { + return <<$type>>{<>row<<$i.M>>[<<$i.N>>],<>} +} + +// <<$type>>FromCols builds a new matrix from column vectors. +func <<$type>>FromCols(<> <>) <<$type>> { + return <<$type>>{<>col<<$i.N>>[<<$i.M>>], <>} +} + +// Add performs an element-wise addition of two matrices, this is +// equivalent to iterating over every element of m1 and adding the corresponding value of m2. +func (m1 <<$type>>) Add(m2 <<$type>>) <<$type>> { + return <<$type>>{<< range $i := matiter $m $n>>m1[<<$i>>] + m2[<<$i>>], <>} +} + +// Sub performs an element-wise subtraction of two matrices, this is +// equivalent to iterating over every element of m1 and subtracting the corresponding value of m2. +func (m1 <<$type>>) Sub(m2 <<$type>>) <<$type>> { + return <<$type>>{<< range $i := matiter $m $n>>m1[<<$i>>] - m2[<<$i>>], <>} +} + +// Mul performs a scalar multiplcation of the matrix. This is equivalent to iterating +// over every element of the matrix and multiply it by c. +func (m1 <<$type>>) Mul(c float32) <<$type>> { + return <<$type>>{<< range $i := matiter $m $n>>m1[<<$i>>] * c, <>} +} + +<> +// Mul<<$n>><>x<<$o>><> performs a "matrix product" between this matrix +// and another of the given dimension. For any two matrices of dimensionality +// MxN and NxO, the result will be MxO. For instance, Mat4 multiplied using +// Mul4x2 will result in a Mat4x2. +func (m1 <<$type>>) Mul<<$n>><>x<<$o>><>(m2 <>) <> { + return <>{<> + <><>m1[<>]*m2[<>]<>,<> + } +} +<> + +// Transpose produces the transpose of this matrix. For any MxN matrix +// the transpose is an NxM matrix with the rows swapped with the columns. For instance +// the transpose of the Mat3x2 is a Mat2x3 like so: +// +// [[a b]] [[a c e]] +// [[c d]] = [[b d f]] +// [[e f]] +func (m1 <<$type>>) Transpose() <> { + return <>{<>m1[<>], <>} +} + +<> +// The determinant of a matrix is a measure of a square matrix's +// singularity and invertability, among other things. In this library, the +// determinant is hard coded based on pre-computed cofactor expansion, and uses +// no loops. Of course, the addition and multiplication must still be done. +func (m <<$type>>) Det() float32 { + <> + return m[0]*m[3] - m[1]*m[2] + <> + return m[0]*m[4]*m[8] + m[3]*m[7]*m[2] + m[6]*m[1]*m[5] - m[6]*m[4]*m[2] - m[3]*m[1]*m[8] - m[0]*m[7]*m[5] + <> + return m[0]*m[5]*m[10]*m[15] - m[0]*m[5]*m[11]*m[14] - m[0]*m[6]*m[9]*m[15] + m[0]*m[6]*m[11]*m[13] + m[0]*m[7]*m[9]*m[14] - m[0]*m[7]*m[10]*m[13] - m[1]*m[4]*m[10]*m[15] + m[1]*m[4]*m[11]*m[14] + m[1]*m[6]*m[8]*m[15] - m[1]*m[6]*m[11]*m[12] - m[1]*m[7]*m[8]*m[14] + m[1]*m[7]*m[10]*m[12] + m[2]*m[4]*m[9]*m[15] - m[2]*m[4]*m[11]*m[13] - m[2]*m[5]*m[8]*m[15] + m[2]*m[5]*m[11]*m[12] + m[2]*m[7]*m[8]*m[13] - m[2]*m[7]*m[9]*m[12] - m[3]*m[4]*m[9]*m[14] + m[3]*m[4]*m[10]*m[13] + m[3]*m[5]*m[8]*m[14] - m[3]*m[5]*m[10]*m[12] - m[3]*m[6]*m[8]*m[13] + m[3]*m[6]*m[9]*m[12] + <> +} +<> + +<> +// Inv computes the inverse of a square matrix. An inverse is a square matrix such that when multiplied by the +// original, yields the identity. +// +// M_inv * M = M * M_inv = I +// +// In this library, the math is precomputed, and uses no loops, though the multiplications, additions, determinant calculation, and scaling +// are still done. This can still be (relatively) expensive for a 4x4. +// +// This function checks the determinant to see if the matrix is invertible. +// If the determinant is 0.0, this function returns the zero matrix. However, due to floating point errors, it is +// entirely plausible to get a false positive or negative. +// In the future, an alternate function may be written which takes in a pre-computed determinant. +func (m <<$type>>) Inv() <<$type>> { + det := m.Det() + if FloatEqual(det, float32(0.0)) { + return <<$type>>{} + } + <> + retMat := Mat2{m[3], -m[1], -m[2], m[0]} + <> + retMat := Mat3{ + m[4]*m[8] - m[5]*m[7], + m[2]*m[7] - m[1]*m[8], + m[1]*m[5] - m[2]*m[4], + m[5]*m[6] - m[3]*m[8], + m[0]*m[8] - m[2]*m[6], + m[2]*m[3] - m[0]*m[5], + m[3]*m[7] - m[4]*m[6], + m[1]*m[6] - m[0]*m[7], + m[0]*m[4] - m[1]*m[3], + } + <> + retMat := Mat4{ + -m[7]*m[10]*m[13] + m[6]*m[11]*m[13] + m[7]*m[9]*m[14] - m[5]*m[11]*m[14] - m[6]*m[9]*m[15] + m[5]*m[10]*m[15], + m[3]*m[10]*m[13] - m[2]*m[11]*m[13] - m[3]*m[9]*m[14] + m[1]*m[11]*m[14] + m[2]*m[9]*m[15] - m[1]*m[10]*m[15], + -m[3]*m[6]*m[13] + m[2]*m[7]*m[13] + m[3]*m[5]*m[14] - m[1]*m[7]*m[14] - m[2]*m[5]*m[15] + m[1]*m[6]*m[15], + m[3]*m[6]*m[9] - m[2]*m[7]*m[9] - m[3]*m[5]*m[10] + m[1]*m[7]*m[10] + m[2]*m[5]*m[11] - m[1]*m[6]*m[11], + m[7]*m[10]*m[12] - m[6]*m[11]*m[12] - m[7]*m[8]*m[14] + m[4]*m[11]*m[14] + m[6]*m[8]*m[15] - m[4]*m[10]*m[15], + -m[3]*m[10]*m[12] + m[2]*m[11]*m[12] + m[3]*m[8]*m[14] - m[0]*m[11]*m[14] - m[2]*m[8]*m[15] + m[0]*m[10]*m[15], + m[3]*m[6]*m[12] - m[2]*m[7]*m[12] - m[3]*m[4]*m[14] + m[0]*m[7]*m[14] + m[2]*m[4]*m[15] - m[0]*m[6]*m[15], + -m[3]*m[6]*m[8] + m[2]*m[7]*m[8] + m[3]*m[4]*m[10] - m[0]*m[7]*m[10] - m[2]*m[4]*m[11] + m[0]*m[6]*m[11], + -m[7]*m[9]*m[12] + m[5]*m[11]*m[12] + m[7]*m[8]*m[13] - m[4]*m[11]*m[13] - m[5]*m[8]*m[15] + m[4]*m[9]*m[15], + m[3]*m[9]*m[12] - m[1]*m[11]*m[12] - m[3]*m[8]*m[13] + m[0]*m[11]*m[13] + m[1]*m[8]*m[15] - m[0]*m[9]*m[15], + -m[3]*m[5]*m[12] + m[1]*m[7]*m[12] + m[3]*m[4]*m[13] - m[0]*m[7]*m[13] - m[1]*m[4]*m[15] + m[0]*m[5]*m[15], + m[3]*m[5]*m[8] - m[1]*m[7]*m[8] - m[3]*m[4]*m[9] + m[0]*m[7]*m[9] + m[1]*m[4]*m[11] - m[0]*m[5]*m[11], + m[6]*m[9]*m[12] - m[5]*m[10]*m[12] - m[6]*m[8]*m[13] + m[4]*m[10]*m[13] + m[5]*m[8]*m[14] - m[4]*m[9]*m[14], + -m[2]*m[9]*m[12] + m[1]*m[10]*m[12] + m[2]*m[8]*m[13] - m[0]*m[10]*m[13] - m[1]*m[8]*m[14] + m[0]*m[9]*m[14], + m[2]*m[5]*m[12] - m[1]*m[6]*m[12] - m[2]*m[4]*m[13] + m[0]*m[6]*m[13] + m[1]*m[4]*m[14] - m[0]*m[5]*m[14], + -m[2]*m[5]*m[8] + m[1]*m[6]*m[8] + m[2]*m[4]*m[9] - m[0]*m[6]*m[9] - m[1]*m[4]*m[10] + m[0]*m[5]*m[10], + } + <> + return retMat.Mul(1 / det) +} +<> + +// ApproxEqual performs an element-wise approximate equality test between two matrices, +// as if FloatEqual had been used. +func (m1 <<$type>>) ApproxEqual(m2 <<$type>>) bool { + for i := range m1 { + if !FloatEqual(m1[i], m2[i]) { + return false + } + } + return true +} + +// ApproxEqualThreshold performs an element-wise approximate equality test between two matrices +// with a given epsilon threshold, as if FloatEqualThreshold had been used. +func (m1 <<$type>>) ApproxEqualThreshold(m2 <<$type>>, threshold float32) bool { + for i := range m1 { + if !FloatEqualThreshold(m1[i], m2[i], threshold) { + return false + } + } + return true +} + +// ApproxEqualFunc performs an element-wise approximate equality test between two matrices +// with a given equality functions, intended to be used with FloatEqualFunc; although and comparison +// function may be used in practice. +func (m1 <<$type>>) ApproxFuncEqual(m2 <<$type>>, eq func(float32, float32) bool) bool { + for i := range m1 { + if !eq(m1[i], m2[i]) { + return false + } + } + return true +} + +// At returns the matrix element at the given row and column. +// This is equivalent to mat[col * numRow + row] where numRow is constant +// (E.G. for a Mat3x2 it's equal to 3) +// +// This method is garbage-in garbage-out. For instance, on a Mat4 asking for +// At(5,0) will work just like At(1,1). Or it may panic if it's out of bounds. +func (m <<$type>>) At(row, col int) float32 { + return m[col*<<$m>>+row] +} + +// Set sets the corresponding matrix element at the given row and column. +// This has a pointer receiver because it mutates the matrix. +// +// This method is garbage-in garbage-out. For instance, on a Mat4 asking for +// Set(5,0,val) will work just like Set(1,1,val). Or it may panic if it's out of bounds. +func (m *<<$type>>) Set(row, col int, value float32) { + m[col*<<$m>>+row] = value +} + +// Index returns the index of the given row and column, to be used with direct +// access. E.G. Index(0,0) = 0. +// +// This is a garbage-in garbage-out method. For instance, on a Mat4 asking for the index of +// (5,0) will work the same as asking for (1,1). Or it may give you a value that will cause +// a panic if you try to access the array with it if it's truly out of bounds. +func (m <<$type>>) Index(row, col int) int { + return col*<<$m>> + row +} + +// Row returns a vector representing the corresponding row (starting at row 0). +// This package makes no distinction between row and column vectors, so it +// will be a normal VecM for a MxN matrix. +func (m <<$type>>) Row(row int) <> { + return <>{<>m[row+<>],<>} +} + +// Rows decomposes a matrix into its corresponding row vectors. +// This is equivalent to calling mat.Row for each row. +func (m <<$type>>) Rows() (<> <>) { + return <> +} + +// Col returns a vector representing the corresponding column (starting at col 0). +// This package makes no distinction between row and column vectors, so it +// will be a normal VecN for a MxN matrix. +func (m <<$type>>) Col(col int) <> { + return <>{<>m[col*<<$m>>+<<$i>>],<>} +} + +// Cols decomposes a matrix into its corresponding column vectors. +// This is equivalent to calling mat.Col for each column. +func (m <<$type>>) Cols() (<> <>) { + return <> +} + +<> +// Trace is a basic operation on a square matrix that simply +// sums up all elements on the main diagonal (meaning all elements such that row==col). +func (m <<$type>>) Trace() float32 { + return <><> m[<>]<> +} +<> + +// Abs returns the element-wise absolute value of this matrix +func (m <<$type>>) Abs() <<$type>> { + return <<$type>>{<>} +} + +// Pretty prints the matrix +func (m <<$type>>) String() string { + buf := new(bytes.Buffer) + w := tabwriter.NewWriter(buf, 4, 4, 1, ' ', tabwriter.AlignRight) + for i := 0; i < <<$m>>; i++ { + for _, col := range m.Row(i) { + fmt.Fprintf(w, "%f\t", col) + } + + fmt.Fprintln(w, "") + } + w.Flush() + + return buf.String() +} + +<><> <> diff --git a/vendor/github.com/go-gl/mathgl/mgl32/mempool.go b/vendor/github.com/go-gl/mathgl/mgl32/mempool.go new file mode 100644 index 0000000..9c27151 --- /dev/null +++ b/vendor/github.com/go-gl/mathgl/mgl32/mempool.go @@ -0,0 +1,121 @@ +// Copyright 2014 The go-gl Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package mgl32 + +import ( + "sync" +) + +var ( + slicePools []*sync.Pool + listLock sync.RWMutex +) + +var shouldPool = true + +func DisableMemoryPooling() { + shouldPool = false +} + +// Returns the given memory pool. If the pool doesn't exist, it will +// create all pools up to element i. The number "i" corresponds to "p" +// in most other comments. That is, it's Ceil(log_2(whatever)). So i=0 +// means you'll get the pool for slices of size 1, i=1 for size 2, i=2 for size 4, +// and so on. +// +// This is concurrency safe and uses an RWMutex to protect the list expansion. +func getPool(i int) *sync.Pool { + listLock.RLock() + if i >= len(slicePools) { + + // Promote to a write lock because we now + // need to mutate the pool + listLock.RUnlock() + listLock.Lock() + defer listLock.Unlock() + + for n := i - len(slicePools); n >= 0; n-- { + newFunc := genPoolNew(1 << uint(len(slicePools))) + slicePools = append(slicePools, &sync.Pool{New: newFunc}) + } + } else { + defer listLock.RUnlock() + } + + return slicePools[i] +} + +func genPoolNew(i int) func() interface{} { + return func() interface{} { + return make([]float32, 0, i) + } +} + +// Grabs a slice from the memory pool, such that its cap +// is 2^p where p is Ceil(log_2(size)). It will be downsliced +// such that the len is size. +func grabFromPool(size int) []float32 { + pool, exact := binLog(size) + + // Tried to grab something of size + // zero or less + if pool == -1 { + return nil + } + + // If the log is not exact, we + // need to "overallocate" so we have + // log+1 + if !exact { + pool++ + } + + slice := getPool(pool).Get().([]float32) + slice = slice[:size] + return slice +} + +// Returns a slice to the appropriate pool. If the slice does not have a cap that's precisely +// a power of 2, this will panic. +func returnToPool(slice []float32) { + if cap(slice) == 0 { + return + } + + pool, exact := binLog(cap(slice)) + + if !exact { + panic("attempt to pool slice with non-exact cap. If you're a user, please file an issue with github.com/go-gl/mathgl about this bug. This should never happen.") + } + + getPool(pool).Put(slice) +} + +// This returns the integer base 2 log of the value +// and whether the log is exact or rounded down. +// +// This is only for positive integers. +// +// There are faster ways to do this, I'm open to suggestions. Most rely on knowing system endianness +// which Go makes hard to do. I'm hesistant to use float conversions and the math package because of off-by-one errors. +func binLog(val int) (int, bool) { + if val <= 0 { + return -1, false + } + + exact := true + l := 0 + for ; val > 1; val = val >> 1 { + // If the current lsb is 1 and the number + // is not equal to 1, this is not an exact + // log, but rather a rounding of it + if val&1 != 0 { + exact = false + } + l++ + } + + return l, exact +} diff --git a/vendor/github.com/go-gl/mathgl/mgl32/project.go b/vendor/github.com/go-gl/mathgl/mgl32/project.go new file mode 100644 index 0000000..5d0da14 --- /dev/null +++ b/vendor/github.com/go-gl/mathgl/mgl32/project.go @@ -0,0 +1,98 @@ +// Copyright 2014 The go-gl Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package mgl32 + +import ( + "errors" + "math" +) + +func Ortho(left, right, bottom, top, near, far float32) Mat4 { + rml, tmb, fmn := (right - left), (top - bottom), (far - near) + + return Mat4{float32(2. / rml), 0, 0, 0, 0, float32(2. / tmb), 0, 0, 0, 0, float32(-2. / fmn), 0, float32(-(right + left) / rml), float32(-(top + bottom) / tmb), float32(-(far + near) / fmn), 1} +} + +// Equivalent to Ortho with the near and far planes being -1 and 1, respectively +func Ortho2D(left, right, bottom, top float32) Mat4 { + return Ortho(left, right, bottom, top, -1, 1) +} + +func Perspective(fovy, aspect, near, far float32) Mat4 { + // fovy = (fovy * math.Pi) / 180.0 // convert from degrees to radians + nmf, f := near-far, float32(1./math.Tan(float64(fovy)/2.0)) + + return Mat4{float32(f / aspect), 0, 0, 0, 0, float32(f), 0, 0, 0, 0, float32((near + far) / nmf), -1, 0, 0, float32((2. * far * near) / nmf), 0} +} + +func Frustum(left, right, bottom, top, near, far float32) Mat4 { + rml, tmb, fmn := (right - left), (top - bottom), (far - near) + A, B, C, D := (right+left)/rml, (top+bottom)/tmb, -(far+near)/fmn, -(2*far*near)/fmn + + return Mat4{float32((2. * near) / rml), 0, 0, 0, 0, float32((2. * near) / tmb), 0, 0, float32(A), float32(B), float32(C), -1, 0, 0, float32(D), 0} +} + +func LookAt(eyeX, eyeY, eyeZ, centerX, centerY, centerZ, upX, upY, upZ float32) Mat4 { + return LookAtV(Vec3{eyeX, eyeY, eyeZ}, Vec3{centerX, centerY, centerZ}, Vec3{upX, upY, upZ}) +} + +// LookAtV generates a transform matrix from world space into the specific eye space +func LookAtV(eye, center, up Vec3) Mat4 { + f := center.Sub(eye).Normalize() + s := f.Cross(up.Normalize()).Normalize() + u := s.Cross(f) + + M := Mat4{ + s[0], u[0], -f[0], 0, + s[1], u[1], -f[1], 0, + s[2], u[2], -f[2], 0, + 0, 0, 0, 1, + } + + return M.Mul4(Translate3D(float32(-eye[0]), float32(-eye[1]), float32(-eye[2]))) +} + +// Transform a set of coordinates from object space (in obj) to window coordinates (with depth) +// +// Window coordinates are continuous, not discrete (well, as continuous as an IEEE Floating Point can be), so you won't get exact pixel locations +// without rounding or similar +func Project(obj Vec3, modelview, projection Mat4, initialX, initialY, width, height int) (win Vec3) { + obj4 := obj.Vec4(1) + + vpp := projection.Mul4(modelview).Mul4x1(obj4) + vpp = vpp.Mul(1 / vpp.W()) + win[0] = float32(initialX) + (float32(width)*(vpp[0]+1))/2 + win[1] = float32(initialY) + (float32(height)*(vpp[1]+1))/2 + win[2] = (vpp[2] + 1) / 2 + + return win +} + +// Transform a set of window coordinates to object space. If your MVP (projection.Mul(modelview) matrix is not invertible, this will return an error +// +// Note that the projection may not be perfect if you use strict pixel locations rather than the exact values given by Projectf. +// (It's still unlikely to be perfect due to precision errors, but it will be closer) +func UnProject(win Vec3, modelview, projection Mat4, initialX, initialY, width, height int) (obj Vec3, err error) { + inv := projection.Mul4(modelview).Inv() + var blank Mat4 + if inv == blank { + return Vec3{}, errors.New("Could not find matrix inverse (projection times modelview is probably non-singular)") + } + + obj4 := inv.Mul4x1(Vec4{ + (2 * (win[0] - float32(initialX)) / float32(width)) - 1, + (2 * (win[1] - float32(initialY)) / float32(height)) - 1, + 2*win[2] - 1, + 1.0, + }) + obj = obj4.Vec3() + + //if obj4[3] > MinValue {} + obj[0] /= obj4[3] + obj[1] /= obj4[3] + obj[2] /= obj4[3] + + return obj, nil +} diff --git a/vendor/github.com/go-gl/mathgl/mgl32/quat.go b/vendor/github.com/go-gl/mathgl/mgl32/quat.go new file mode 100644 index 0000000..a2ede3e --- /dev/null +++ b/vendor/github.com/go-gl/mathgl/mgl32/quat.go @@ -0,0 +1,458 @@ +// Copyright 2014 The go-gl Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package mgl32 + +import ( + "math" +) + +// A rotation order is the order in which +// rotations will be transformed for the purposes of AnglesToQuat +type RotationOrder int + +const ( + XYX RotationOrder = iota + XYZ + XZX + XZY + YXY + YXZ + YZY + YZX + ZYZ + ZYX + ZXZ + ZXY +) + +// A Quaternion is an extension of the imaginary numbers; there's all sorts of +// interesting theory behind it. In 3D graphics we mostly use it as a cheap way of +// representing rotation since quaternions are cheaper to multiply by, and easier to +// interpolate than matrices. +// +// A Quaternion has two parts: W, the so-called scalar component, +// and "V", the vector component. The vector component is considered to +// be the part in 3D space, while W (loosely interpreted) is its 4D coordinate. +type Quat struct { + W float32 + V Vec3 +} + +// The quaternion identity: W=1; V=(0,0,0). +// +// As with all identities, multiplying any quaternion by this will yield the same +// quaternion you started with. +func QuatIdent() Quat { + return Quat{1., Vec3{0, 0, 0}} +} + +// Creates an angle from an axis and an angle relative to that axis. +// +// This is cheaper than HomogRotate3D. +func QuatRotate(angle float32, axis Vec3) Quat { + // angle = (float32(math.Pi) * angle) / 180.0 + + c, s := float32(math.Cos(float64(angle/2))), float32(math.Sin(float64(angle/2))) + + return Quat{c, axis.Mul(s)} +} + +// A convenient alias for q.V[0] +func (q Quat) X() float32 { + return q.V[0] +} + +// A convenient alias for q.V[1] +func (q Quat) Y() float32 { + return q.V[1] +} + +// A convenient alias for q.V[2] +func (q Quat) Z() float32 { + return q.V[2] +} + +// Adds two quaternions. It's no more complicated than +// adding their W and V components. +func (q1 Quat) Add(q2 Quat) Quat { + return Quat{q1.W + q2.W, q1.V.Add(q2.V)} +} + +// Subtracts two quaternions. It's no more complicated than +// subtracting their W and V components. +func (q1 Quat) Sub(q2 Quat) Quat { + return Quat{q1.W - q2.W, q1.V.Sub(q2.V)} +} + +// Multiplies two quaternions. This can be seen as a rotation. Note that +// Multiplication is NOT commutative, meaning q1.Mul(q2) does not necessarily +// equal q2.Mul(q1). +func (q1 Quat) Mul(q2 Quat) Quat { + return Quat{q1.W*q2.W - q1.V.Dot(q2.V), q1.V.Cross(q2.V).Add(q2.V.Mul(q1.W)).Add(q1.V.Mul(q2.W))} +} + +// Scales every element of the quaternion by some constant factor. +func (q1 Quat) Scale(c float32) Quat { + return Quat{q1.W * c, Vec3{q1.V[0] * c, q1.V[1] * c, q1.V[2] * c}} +} + +// Returns the conjugate of a quaternion. Equivalent to +// Quat{q1.W, q1.V.Mul(-1)} +func (q1 Quat) Conjugate() Quat { + return Quat{q1.W, q1.V.Mul(-1)} +} + +// Returns the Length of the quaternion, also known as its Norm. This is the same thing as +// the Len of a Vec4 +func (q1 Quat) Len() float32 { + return float32(math.Sqrt(float64(q1.W*q1.W + q1.V[0]*q1.V[0] + q1.V[1]*q1.V[1] + q1.V[2]*q1.V[2]))) +} + +// Norm() is an alias for Len() since both are very common terms. +func (q1 Quat) Norm() float32 { + return q1.Len() +} + +// Normalizes the quaternion, returning its versor (unit quaternion). +// +// This is the same as normalizing it as a Vec4. +func (q1 Quat) Normalize() Quat { + length := q1.Len() + + if FloatEqual(1, length) { + return q1 + } + if length == 0 { + return QuatIdent() + } + if length == InfPos { + length = MaxValue + } + + return Quat{q1.W * 1 / length, q1.V.Mul(1 / length)} +} + +// The inverse of a quaternion. The inverse is equivalent +// to the conjugate divided by the square of the length. +// +// This method computes the square norm by directly adding the sum +// of the squares of all terms instead of actually squaring q1.Len(), +// both for performance and precision. +func (q1 Quat) Inverse() Quat { + return q1.Conjugate().Scale(1 / q1.Dot(q1)) +} + +// Rotates a vector by the rotation this quaternion represents. +// This will result in a 3D vector. Strictly speaking, this is +// equivalent to q1.v.q* where the "."" is quaternion multiplication and v is interpreted +// as a quaternion with W 0 and V v. In code: +// q1.Mul(Quat{0,v}).Mul(q1.Conjugate()), and +// then retrieving the imaginary (vector) part. +// +// In practice, we hand-compute this in the general case and simplify +// to save a few operations. +func (q1 Quat) Rotate(v Vec3) Vec3 { + cross := q1.V.Cross(v) + // v + 2q_w * (q_v x v) + 2q_v x (q_v x v) + return v.Add(cross.Mul(2 * q1.W)).Add(q1.V.Mul(2).Cross(cross)) +} + +// Returns the homogeneous 3D rotation matrix corresponding to the quaternion. +func (q1 Quat) Mat4() Mat4 { + w, x, y, z := q1.W, q1.V[0], q1.V[1], q1.V[2] + return Mat4{ + 1 - 2*y*y - 2*z*z, 2*x*y + 2*w*z, 2*x*z - 2*w*y, 0, + 2*x*y - 2*w*z, 1 - 2*x*x - 2*z*z, 2*y*z + 2*w*x, 0, + 2*x*z + 2*w*y, 2*y*z - 2*w*x, 1 - 2*x*x - 2*y*y, 0, + 0, 0, 0, 1, + } +} + +// The dot product between two quaternions, equivalent to if this was a Vec4 +func (q1 Quat) Dot(q2 Quat) float32 { + return q1.W*q2.W + q1.V[0]*q2.V[0] + q1.V[1]*q2.V[1] + q1.V[2]*q2.V[2] +} + +// Returns whether the quaternions are approximately equal, as if +// FloatEqual was called on each matching element +func (q1 Quat) ApproxEqual(q2 Quat) bool { + return FloatEqual(q1.W, q2.W) && q1.V.ApproxEqual(q2.V) +} + +// Returns whether the quaternions are approximately equal with a given tolerence, as if +// FloatEqualThreshold was called on each matching element with the given epsilon +func (q1 Quat) ApproxEqualThreshold(q2 Quat, epsilon float32) bool { + return FloatEqualThreshold(q1.W, q2.W, epsilon) && q1.V.ApproxEqualThreshold(q2.V, epsilon) +} + +// Returns whether the quaternions are approximately equal using the given comparison function, as if +// the function had been called on each individual element +func (q1 Quat) ApproxEqualFunc(q2 Quat, f func(float32, float32) bool) bool { + return f(q1.W, q2.W) && q1.V.ApproxFuncEqual(q2.V, f) +} + +// Returns whether the quaternions represents the same orientation +// +// Different values can represent the same orientation (q == -q) because quaternions avoid singularities +// and discontinuities involved with rotation in 3 dimensions by adding extra dimensions +func (q1 Quat) OrientationEqual(q2 Quat) bool { + return q1.OrientationEqualThreshold(q2, Epsilon) +} + +// Returns whether the quaternions represents the same orientation with a given tolerence +func (q1 Quat) OrientationEqualThreshold(q2 Quat, epsilon float32) bool { + return Abs(q1.Normalize().Dot(q2.Normalize())) > 1-epsilon +} + +// Slerp is *S*pherical *L*inear Int*erp*olation, a method of interpolating +// between two quaternions. This always takes the straightest path on the sphere between +// the two quaternions, and maintains constant velocity. +// +// However, it's expensive and QuatSlerp(q1,q2) is not the same as QuatSlerp(q2,q1) +func QuatSlerp(q1, q2 Quat, amount float32) Quat { + q1, q2 = q1.Normalize(), q2.Normalize() + dot := q1.Dot(q2) + + // If the inputs are too close for comfort, linearly interpolate and normalize the result. + if dot > 0.9995 { + return QuatNlerp(q1, q2, amount) + } + + // This is here for precision errors, I'm perfectly aware that *technically* the dot is bound [-1,1], but since Acos will freak out if it's not (even if it's just a liiiiitle bit over due to normal error) we need to clamp it + dot = Clamp(dot, -1, 1) + + theta := float32(math.Acos(float64(dot))) * amount + c, s := float32(math.Cos(float64(theta))), float32(math.Sin(float64(theta))) + rel := q2.Sub(q1.Scale(dot)).Normalize() + + return q1.Scale(c).Add(rel.Scale(s)) +} + +// *L*inear Int*erp*olation between two Quaternions, cheap and simple. +// +// Not excessively useful, but uses can be found. +func QuatLerp(q1, q2 Quat, amount float32) Quat { + return q1.Add(q2.Sub(q1).Scale(amount)) +} + +// *Normalized* *L*inear Int*erp*olation between two Quaternions. Cheaper than Slerp +// and usually just as good. This is literally Lerp with Normalize() called on it. +// +// Unlike Slerp, constant velocity isn't maintained, but it's much faster and +// Nlerp(q1,q2) and Nlerp(q2,q1) return the same path. You should probably +// use this more often unless you're suffering from choppiness due to the +// non-constant velocity problem. +func QuatNlerp(q1, q2 Quat, amount float32) Quat { + return QuatLerp(q1, q2, amount).Normalize() +} + +// Performs a rotation in the specified order. If the order is not +// a valid RotationOrder, this function will panic +// +// The rotation "order" is more of an axis descriptor. For instance XZX would +// tell the function to interpret angle1 as a rotation about the X axis, angle2 about +// the Z axis, and angle3 about the X axis again. +// +// Based off the code for the Matlab function "angle2quat", though this implementation +// only supports 3 single angles as opposed to multiple angles. +func AnglesToQuat(angle1, angle2, angle3 float32, order RotationOrder) Quat { + var s [3]float64 + var c [3]float64 + + s[0], c[0] = math.Sincos(float64(angle1 / 2)) + s[1], c[1] = math.Sincos(float64(angle2 / 2)) + s[2], c[2] = math.Sincos(float64(angle3 / 2)) + + ret := Quat{} + switch order { + case ZYX: + ret.W = float32(c[0]*c[1]*c[2] + s[0]*s[1]*s[2]) + ret.V = Vec3{float32(c[0]*c[1]*s[2] - s[0]*s[1]*c[2]), + float32(c[0]*s[1]*c[2] + s[0]*c[1]*s[2]), + float32(s[0]*c[1]*c[2] - c[0]*s[1]*s[2]), + } + case ZYZ: + ret.W = float32(c[0]*c[1]*c[2] - s[0]*c[1]*s[2]) + ret.V = Vec3{float32(c[0]*s[1]*s[2] - s[0]*s[1]*c[2]), + float32(c[0]*s[1]*c[2] + s[0]*s[1]*s[2]), + float32(s[0]*c[1]*c[2] + c[0]*c[1]*s[2]), + } + case ZXY: + ret.W = float32(c[0]*c[1]*c[2] - s[0]*s[1]*s[2]) + ret.V = Vec3{float32(c[0]*s[1]*c[2] - s[0]*c[1]*s[2]), + float32(c[0]*c[1]*s[2] + s[0]*s[1]*c[2]), + float32(c[0]*s[1]*s[2] + s[0]*c[1]*c[2]), + } + case ZXZ: + ret.W = float32(c[0]*c[1]*c[2] - s[0]*c[1]*s[2]) + ret.V = Vec3{float32(c[0]*s[1]*c[2] + s[0]*s[1]*s[2]), + float32(s[0]*s[1]*c[2] - c[0]*s[1]*s[2]), + float32(c[0]*c[1]*s[2] + s[0]*c[1]*c[2]), + } + case YXZ: + ret.W = float32(c[0]*c[1]*c[2] + s[0]*s[1]*s[2]) + ret.V = Vec3{float32(c[0]*s[1]*c[2] + s[0]*c[1]*s[2]), + float32(s[0]*c[1]*c[2] - c[0]*s[1]*s[2]), + float32(c[0]*c[1]*s[2] - s[0]*s[1]*c[2]), + } + case YXY: + ret.W = float32(c[0]*c[1]*c[2] - s[0]*c[1]*s[2]) + ret.V = Vec3{float32(c[0]*s[1]*c[2] + s[0]*s[1]*s[2]), + float32(s[0]*c[1]*c[2] + c[0]*c[1]*s[2]), + float32(c[0]*s[1]*s[2] - s[0]*s[1]*c[2]), + } + case YZX: + ret.W = float32(c[0]*c[1]*c[2] - s[0]*s[1]*s[2]) + ret.V = Vec3{float32(c[0]*c[1]*s[2] + s[0]*s[1]*c[2]), + float32(c[0]*s[1]*s[2] + s[0]*c[1]*c[2]), + float32(c[0]*s[1]*c[2] - s[0]*c[1]*s[2]), + } + case YZY: + ret.W = float32(c[0]*c[1]*c[2] - s[0]*c[1]*s[2]) + ret.V = Vec3{float32(s[0]*s[1]*c[2] - c[0]*s[1]*s[2]), + float32(c[0]*c[1]*s[2] + s[0]*c[1]*c[2]), + float32(c[0]*s[1]*c[2] + s[0]*s[1]*s[2]), + } + case XYZ: + ret.W = float32(c[0]*c[1]*c[2] - s[0]*s[1]*s[2]) + ret.V = Vec3{float32(c[0]*s[1]*s[2] + s[0]*c[1]*c[2]), + float32(c[0]*s[1]*c[2] - s[0]*c[1]*s[2]), + float32(c[0]*c[1]*s[2] + s[0]*s[1]*c[2]), + } + case XYX: + ret.W = float32(c[0]*c[1]*c[2] - s[0]*c[1]*s[2]) + ret.V = Vec3{float32(c[0]*c[1]*s[2] + s[0]*c[1]*c[2]), + float32(c[0]*s[1]*c[2] + s[0]*s[1]*s[2]), + float32(s[0]*s[1]*c[2] - c[0]*s[1]*s[2]), + } + case XZY: + ret.W = float32(c[0]*c[1]*c[2] + s[0]*s[1]*s[2]) + ret.V = Vec3{float32(s[0]*c[1]*c[2] - c[0]*s[1]*s[2]), + float32(c[0]*c[1]*s[2] - s[0]*s[1]*c[2]), + float32(c[0]*s[1]*c[2] + s[0]*c[1]*s[2]), + } + case XZX: + ret.W = float32(c[0]*c[1]*c[2] - s[0]*c[1]*s[2]) + ret.V = Vec3{float32(c[0]*c[1]*s[2] + s[0]*c[1]*c[2]), + float32(c[0]*s[1]*s[2] - s[0]*s[1]*c[2]), + float32(c[0]*s[1]*c[2] + s[0]*s[1]*s[2]), + } + default: + panic("Unsupported rotation order") + } + return ret +} + +// Mat4ToQuat converts a pure rotation matrix into a quaternion +func Mat4ToQuat(m Mat4) Quat { + // http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm + + if tr := m[0] + m[5] + m[10]; tr > 0 { + s := float32(0.5 / math.Sqrt(float64(tr+1.0))) + return Quat{ + 0.25 / s, + Vec3{ + (m[6] - m[9]) * s, + (m[8] - m[2]) * s, + (m[1] - m[4]) * s, + }, + } + } + + if (m[0] > m[5]) && (m[0] > m[10]) { + s := float32(2.0 * math.Sqrt(float64(1.0+m[0]-m[5]-m[10]))) + return Quat{ + (m[6] - m[9]) / s, + Vec3{ + 0.25 * s, + (m[4] + m[1]) / s, + (m[8] + m[2]) / s, + }, + } + } + + if m[5] > m[10] { + s := float32(2.0 * math.Sqrt(float64(1.0+m[5]-m[0]-m[10]))) + return Quat{ + (m[8] - m[2]) / s, + Vec3{ + (m[4] + m[1]) / s, + 0.25 * s, + (m[9] + m[6]) / s, + }, + } + + } + + s := float32(2.0 * math.Sqrt(float64(1.0+m[10]-m[0]-m[5]))) + return Quat{ + (m[1] - m[4]) / s, + Vec3{ + (m[8] + m[2]) / s, + (m[9] + m[6]) / s, + 0.25 * s, + }, + } +} + +// QuatLookAtV creates a rotation from an eye vector to a center vector +// +// It assumes the front of the rotated object at Z- and up at Y+ +func QuatLookAtV(eye, center, up Vec3) Quat { + // http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-17-quaternions/#I_need_an_equivalent_of_gluLookAt__How_do_I_orient_an_object_towards_a_point__ + // https://bitbucket.org/sinbad/ogre/src/d2ef494c4a2f5d6e2f0f17d3bfb9fd936d5423bb/OgreMain/src/OgreCamera.cpp?at=default#cl-161 + + direction := center.Sub(eye).Normalize() + + // Find the rotation between the front of the object (that we assume towards Z-, + // but this depends on your model) and the desired direction + rotDir := QuatBetweenVectors(Vec3{0, 0, -1}, direction) + + // Recompute up so that it's perpendicular to the direction + // You can skip that part if you really want to force up + //right := direction.Cross(up) + //up = right.Cross(direction) + + // Because of the 1rst rotation, the up is probably completely screwed up. + // Find the rotation between the "up" of the rotated object, and the desired up + upCur := rotDir.Rotate(Vec3{0, 1, 0}) + rotUp := QuatBetweenVectors(upCur, up) + + rotTarget := rotUp.Mul(rotDir) // remember, in reverse order. + return rotTarget.Inverse() // camera rotation should be inversed! +} + +// QuatBetweenVectors calculates the rotation between two vectors +func QuatBetweenVectors(start, dest Vec3) Quat { + // http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-17-quaternions/#I_need_an_equivalent_of_gluLookAt__How_do_I_orient_an_object_towards_a_point__ + // https://github.com/g-truc/glm/blob/0.9.5/glm/gtx/quaternion.inl#L225 + // https://bitbucket.org/sinbad/ogre/src/d2ef494c4a2f5d6e2f0f17d3bfb9fd936d5423bb/OgreMain/include/OgreVector3.h?at=default#cl-654 + + start = start.Normalize() + dest = dest.Normalize() + epsilon := float32(0.001) + + cosTheta := start.Dot(dest) + if cosTheta < -1.0+epsilon { + // special case when vectors in opposite directions: + // there is no "ideal" rotation axis + // So guess one; any will do as long as it's perpendicular to start + axis := Vec3{1, 0, 0}.Cross(start) + if axis.Dot(axis) < epsilon { + // bad luck, they were parallel, try again! + axis = Vec3{0, 1, 0}.Cross(start) + } + + return QuatRotate(math.Pi, axis.Normalize()) + } + + axis := start.Cross(dest) + s := float32(math.Sqrt(float64(1.0+cosTheta) * 2.0)) + + return Quat{ + s * 0.5, + axis.Mul(1.0 / s), + } +} diff --git a/vendor/github.com/go-gl/mathgl/mgl32/shapes.go b/vendor/github.com/go-gl/mathgl/mgl32/shapes.go new file mode 100644 index 0000000..5456872 --- /dev/null +++ b/vendor/github.com/go-gl/mathgl/mgl32/shapes.go @@ -0,0 +1,306 @@ +// Copyright 2014 The go-gl Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package mgl32 + +import ( + "fmt" + "math" +) + +// Generates a circle centered at (0,0) with a given radius. +// The radii are assumed to be in GL's coordinate sizing. +// +// Technically this draws an ellipse with two axes that match with the X and Y axes, the reason it has a radiusX and radiusY is because GL's coordinate system +// is proportional to screen width and screen height. So if you have a non-square viewport, a single radius will appear +// to "squash" the circle in one direction (usually the Y direction), so the X and Y radius allow for a circle to be made. +// A good way to get the correct radii is with mathgl.ScreenToGLCoords(radius, radius, screenWidth, screenHeight) which will get you the correct +// proportional GL coords. +// +// The numSlices argument specifies how many triangles you want your circle divided into, setting this +// number to too low a value may cause problem (and too high will cause it to take a lot of memory and time to compute +// without much gain in resolution). +// +// This uses discrete triangles, not a triangle fan +func Circle(radiusX, radiusY float32, numSlices int) []Vec2 { + twoPi := float32(2.0 * math.Pi) + + circlePoints := make([]Vec2, 0, numSlices*3) + center := Vec2{0.0, 0.0} + previous := Vec2{radiusX, 0.0} + + for theta := twoPi / float32(numSlices); !FloatEqual(theta, twoPi); theta = Clamp(theta+twoPi/float32(numSlices), 0.0, twoPi) { + sin, cos := math.Sincos(float64(theta)) + curr := Vec2{float32(cos) * radiusX, float32(sin) * radiusY} + + circlePoints = append(circlePoints, center, previous, curr) + previous = curr + } + + // Now add the final point at theta=2pi + circlePoints = append(circlePoints, center, previous, Vec2{radiusX, 0.0}) + return circlePoints +} + +// Generates a 2-triangle rectangle for use with GL_TRIANGLES. The width and height should use GL's proportions (that is, where a width of 1.0 +// is equivalent to half of the width of the render target); however, the y-coordinates grow downwards, not upwards. That is, it +// assumes you want the origin of the rectangle with the top-left corner at (0.0,0.0). +// +// Keep in mind that GL's coordinate system is proportional, so width=height will not result in a square unless your viewport is square. +// If you want to maintain proportionality regardless of screen size, use the results of w,h := ScreenToGLCoordsf(absoluteWidth, absoluteHeight, screenWidth, screenHeight); +// w,h=w+1,h-1 in the call to this function. (The w+1,h-1 step maps the coordinates to start at 0.0 rather than -1.0) +func Rect(width, height float32) []Vec2 { + return []Vec2{ + {0.0, 0.0}, + {0.0, -height}, + {width, -height}, + + {0.0, 0.0}, + {width, -height}, + {width, 0.0}, + } +} + +func QuadraticBezierCurve2D(t float32, cPoint1, cPoint2, cPoint3 Vec2) Vec2 { + if t < 0.0 || t > 1.0 { + panic("Can't interpolate on bezier curve with t out of range [0.0,1.0]") + } + + return cPoint1.Mul((1.0 - t) * (1.0 - t)).Add(cPoint2.Mul(2 * (1 - t) * t)).Add(cPoint3.Mul(t * t)) +} + +func QuadraticBezierCurve3D(t float32, cPoint1, cPoint2, cPoint3 Vec3) Vec3 { + if t < 0.0 || t > 1.0 { + panic("Can't interpolate on bezier curve with t out of range [0.0,1.0]") + } + + return cPoint1.Mul((1.0 - t) * (1.0 - t)).Add(cPoint2.Mul(2 * (1 - t) * t)).Add(cPoint3.Mul(t * t)) +} + +func CubicBezierCurve2D(t float32, cPoint1, cPoint2, cPoint3, cPoint4 Vec2) Vec2 { + if t < 0.0 || t > 1.0 { + panic("Can't interpolate on bezier curve with t out of range [0.0,1.0]") + } + + return cPoint1.Mul((1 - t) * (1 - t) * (1 - t)).Add(cPoint2.Mul(3 * (1 - t) * (1 - t) * t)).Add(cPoint3.Mul(3 * (1 - t) * t * t)).Add(cPoint4.Mul(t * t * t)) +} + +func CubicBezierCurve3D(t float32, cPoint1, cPoint2, cPoint3, cPoint4 Vec3) Vec3 { + if t < 0.0 || t > 1.0 { + panic("Can't interpolate on bezier curve with t out of range [0.0,1.0]") + } + + return cPoint1.Mul((1 - t) * (1 - t) * (1 - t)).Add(cPoint2.Mul(3 * (1 - t) * (1 - t) * t)).Add(cPoint3.Mul(3 * (1 - t) * t * t)).Add(cPoint4.Mul(t * t * t)) +} + +// Returns the point at point t along an n-control point Bezier curve +// +// t must be in the range 0.0 and 1.0 or this function will panic. Consider [0.0,1.0] to be similar to a percentage, +// 0.0 is first control point, and the point at 1.0 is the last control point. Any point in between is how far along the path you are between 0 and 1. +// +// This function is not sensitive to the coordinate system of the control points. It will correctly interpolate regardless of whether they're in screen coords, +// gl coords, or something else entirely +func BezierCurve2D(t float32, cPoints []Vec2) Vec2 { + if t < 0.0 || t > 1.0 { + panic("Input to bezier has t not in range [0,1]. If you think this is a precision error, use mathgl.Clamp[f|d] before calling this function") + } + + n := len(cPoints) - 1 + point := cPoints[0].Mul(float32(math.Pow(float64(1.0-t), float64(n)))) + + for i := 1; i <= n; i++ { + point = point.Add(cPoints[i].Mul(float32(float64(choose(n, i)) * math.Pow(float64(1-t), float64(n-i)) * math.Pow(float64(t), float64(i))))) // P += P_i * nCi * (1-t)^(n-i) * t^i + } + + return point +} + +// Same as the 2D version, except the line is in 3D space +func BezierCurve3D(t float32, cPoints []Vec3) Vec3 { + if t < 0.0 || t > 1.0 { + panic("Input to bezier has t not in range [0,1]. If you think this is a precision error, use mathgl.Clamp[f|d] before calling this function") + } + + n := len(cPoints) - 1 + point := cPoints[0].Mul(float32(math.Pow(float64(1.0-t), float64(n)))) + + for i := 1; i <= n; i++ { + point = point.Add(cPoints[i].Mul(float32(float64(choose(n, i)) * math.Pow(float64(1-t), float64(n-i)) * math.Pow(float64(t), float64(i))))) // P += P_i * nCi * (1-t)^(n-i) * t^i + } + + return point +} + +// Generates a bezier curve with controlPoints cPoints. The numPoints argument +// determines how many "samples" it makes along the line. For instance, a +// call to this with numPoints 2 will have exactly two points: the start and end points +// For any points above 2 it will divide it into numPoints-1 chunks (which means it will generate numPoints-2 vertices other than the beginning and end). +// So for 3 points it will divide it in half, 4 points into thirds, and so on. +// +// This is likely to get rather expensive for anything over perhaps a cubic curve. +func MakeBezierCurve2D(numPoints int, cPoints []Vec2) (line []Vec2) { + line = make([]Vec2, numPoints) + if numPoints == 0 { + return + } else if numPoints == 1 { + line[0] = cPoints[0] + return + } else if numPoints == 2 { + line[0] = cPoints[0] + line[1] = cPoints[len(cPoints)-1] + return + } + + line[0] = cPoints[0] + for i := 1; i < numPoints-1; i++ { + line[i] = BezierCurve2D(Clamp(float32(i)/float32(numPoints-1), 0.0, 1.0), cPoints) + } + line[numPoints-1] = cPoints[len(cPoints)-1] + + return +} + +// Same as the 2D version, except with the line in 3D space +func MakeBezierCurve3D(numPoints int, cPoints []Vec3) (line []Vec3) { + line = make([]Vec3, numPoints) + if numPoints == 0 { + return + } else if numPoints == 1 { + line[0] = cPoints[0] + return + } else if numPoints == 2 { + line[0] = cPoints[0] + line[1] = cPoints[len(cPoints)-1] + return + } + + line[0] = cPoints[0] + for i := 1; i < numPoints-1; i++ { + line[i] = BezierCurve3D(Clamp(float32(i)/float32(numPoints-1), 0.0, 1.0), cPoints) + } + line[numPoints-1] = cPoints[len(cPoints)-1] + + return +} + +// Creates a 2-dimensional Bezier surface of arbitrary degree in 3D Space +// Like the curve functions, if u or v are not in the range [0.0,1.0] the function will panic, use Clamp[f|d] +// to ensure it is correct. +// +// The control point matrix must not be jagged, or this will end up panicking from an index out of bounds exception +func BezierSurface(u, v float32, cPoints [][]Vec3) Vec3 { + if u < 0.0 || u > 1.0 || v < 1.0 || v > 1.0 { + panic("u or v not in range [0.0,1.0] in BezierSurface") + } + + n := len(cPoints) - 1 + m := len(cPoints[0]) - 1 + + point := cPoints[0][0].Mul(float32(math.Pow(float64(1.0-u), float64(n)) * math.Pow(float64(1.0-v), float64(m)))) + + for i := 0; i <= n; i++ { + for j := 0; j <= m; j++ { + if i == 0 && j == 0 { + continue + } + + point = point.Add(cPoints[i][j].Mul(float32(float64(choose(n, i)) * math.Pow(float64(u), float64(i)) * math.Pow(float64(1.0-u), float64(n-i)) * float64(choose(m, j)) * math.Pow(float64(v), float64(j)) * math.Pow(float64(1.0-v), float64(m-j))))) + } + } + + return point +} + +// Does interpolation over a spline of several bezier curves. Each bezier curve must have a finite range, +// though the spline may be disjoint. The bezier curves are not required to be in any particular order. +// +// If t is out of the range of all given curves, this function will panic +func BezierSplineInterpolate2D(t float32, ranges [][2]float32, cPoints [][]Vec2) Vec2 { + if len(ranges) != len(cPoints) { + panic("Each bezier curve needs a range") + } + + for i, curveRange := range ranges { + if t >= curveRange[0] && t <= curveRange[1] { + return BezierCurve2D((t-curveRange[0])/(curveRange[1]-curveRange[0]), cPoints[i]) + } + } + + panic("t is out of the range of all bezier curves in this spline") +} + +// Does interpolation over a spline of several bezier curves. Each bezier curve must have a finite range, +// though the spline may be disjoint. The bezier curves are not required to be in any particular order. +// +// If t is out of the range of all given curves, this function will panic +func BezierSplineInterpolate3D(t float32, ranges [][2]float32, cPoints [][]Vec3) Vec3 { + if len(ranges) != len(cPoints) { + panic("Each bezier curve needs a range") + } + + for i, curveRange := range ranges { + if t >= curveRange[0] && t <= curveRange[1] { + return BezierCurve3D((t-curveRange[0])/(curveRange[1]-curveRange[0]), cPoints[i]) + } + } + + panic("t is out of the range of all bezier curves in this spline") +} + +// Reticulates ALL the Splines +// +// For the overly serious: the function is just for fun. It does nothing except prints a Maxis reference. Technically you could "reticulate splines" +// by joining a bunch of splines together, but that ruins the joke. +func ReticulateSplines(ranges [][][2]float32, cPoints [][][]Vec2, withLlamas bool) { + if !withLlamas { + fmt.Println("You can't reticulate splines without llamas, silly.") + } else { + fmt.Println("Actually, you can't even reticulate splines WITH llamas") + } +} + +// Transform from pixel coordinates to GL coordinates. +// +// This assumes that your pixel coordinate system considers its origin to be in the top left corner (GL's is in the bottom left). +// The coordinates x and y may be out of the range [0,screenWidth-1] and [0,screeneHeight-1]. +// +// GL's coordinate system maps [screenWidth-1,0] to [1.0,1.0] and [0,screenHeight-1] to [-1.0,-1.0]. If x and y are out of the range, they'll still +// be mapped correctly, just off the screen. (e.g. if y = 2*(screenHeight-1) you'll get -3.0 for yOut) +// +// This is similar to Unproject, except for 2D cases and much simpler (especially since an inverse may always be found) +func ScreenToGLCoords(x, y int, screenWidth, screenHeight int) (xOut, yOut float32) { + xOut = 2.0*float32(x)/float32(screenWidth-1) - 1.0 + yOut = -2.0*float32(y)/float32(screenHeight-1) + 1.0 + + return +} + +// Transform from GL's proportional system to pixel coordinates. +// +// Assumes the pixel coordinate system has its origin in the top left corner. (GL's is in the bottom left) +// +// GL's coordinate system maps [screenWidth-1,0] to [1.0,1.0] and [0,screenHeight-1] to [-1.0,-1.0]. If x and y are out of the range, they'll still +// be mapped correctly, just off the screen. (e.g. if y=-3.0, you'll get 2*(screenHeight-1) for yOut) +// +// This is similar to Project, except for 2D cases and much simpler +func GLToScreenCoords(x, y float32, screenWidth, screenHeight int) (xOut, yOut int) { + xOut = int((x + 1.0) * float32(screenWidth-1) / 2.0) + yOut = int((1.0 - y) * float32(screenHeight-1) / 2.0) + + return +} + +func choose(n, k int) (result int) { + if k == 0 { + return 1 + } else if n == 0 { + return 0 + } + result = (n - (k - 1)) + for i := 2; i <= k; i++ { + result *= (n - (k - i)) / i + } + + return result +} diff --git a/vendor/github.com/go-gl/mathgl/mgl32/transform.go b/vendor/github.com/go-gl/mathgl/mgl32/transform.go new file mode 100644 index 0000000..4a03ed6 --- /dev/null +++ b/vendor/github.com/go-gl/mathgl/mgl32/transform.go @@ -0,0 +1,223 @@ +// Copyright 2014 The go-gl Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package mgl32 + +import "math" + +// Rotate2D returns a rotation Matrix about a angle in 2-D space. Specifically about the origin. +// It is a 2x2 matrix, if you need a 3x3 for Homogeneous math (e.g. composition with a Translation matrix) +// see HomogRotate2D +func Rotate2D(angle float32) Mat2 { + //angle = (angle * math.Pi) / 180.0 + sin, cos := float32(math.Sin(float64(angle))), float32(math.Cos(float64(angle))) + return Mat2{cos, sin, -sin, cos} +} + +// Rotate3DX returns a 3x3 (non-homogeneous) Matrix that rotates by angle about the X-axis +// +// Where c is cos(angle) and s is sin(angle) +// [1 0 0] +// [0 c -s] +// [0 s c ] +func Rotate3DX(angle float32) Mat3 { + //angle = (angle * math.Pi) / 180.0 + sin, cos := float32(math.Sin(float64(angle))), float32(math.Cos(float64(angle))) + + return Mat3{1, 0, 0, 0, cos, sin, 0, -sin, cos} +} + +// Rotate3DY returns a 3x3 (non-homogeneous) Matrix that rotates by angle about the Y-axis +// +// Where c is cos(angle) and s is sin(angle) +// [c 0 s] +// [0 1 0] +// [s 0 c ] +func Rotate3DY(angle float32) Mat3 { + //angle = (angle * math.Pi) / 180.0 + sin, cos := float32(math.Sin(float64(angle))), float32(math.Cos(float64(angle))) + + return Mat3{cos, 0, -sin, 0, 1, 0, sin, 0, cos} +} + +// Rotate3DZ returns a 3x3 (non-homogeneous) Matrix that rotates by angle about the Z-axis +// +// Where c is cos(angle) and s is sin(angle) +// [c -s 0] +// [s c 0] +// [0 0 1 ] +func Rotate3DZ(angle float32) Mat3 { + //angle = (angle * math.Pi) / 180.0 + sin, cos := float32(math.Sin(float64(angle))), float32(math.Cos(float64(angle))) + + return Mat3{cos, sin, 0, -sin, cos, 0, 0, 0, 1} +} + +// Translate2D returns a homogeneous (3x3 for 2D-space) Translation matrix that moves a point by Tx units in the x-direction and Ty units in the y-direction +// +// [[1, 0, Tx]] +// [[0, 1, Ty]] +// [[0, 0, 1 ]] +func Translate2D(Tx, Ty float32) Mat3 { + return Mat3{1, 0, 0, 0, 1, 0, float32(Tx), float32(Ty), 1} +} + +// Translate3D returns a homogeneous (4x4 for 3D-space) Translation matrix that moves a point by Tx units in the x-direction, Ty units in the y-direction, +// and Tz units in the z-direction +// +// [[1, 0, 0, Tx]] +// [[0, 1, 0, Ty]] +// [[0, 0, 1, Tz]] +// [[0, 0, 0, 1 ]] +func Translate3D(Tx, Ty, Tz float32) Mat4 { + return Mat4{1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, float32(Tx), float32(Ty), float32(Tz), 1} +} + +// Same as Rotate2D, except homogeneous (3x3 with the extra row/col being all zeroes with a one in the bottom right) +func HomogRotate2D(angle float32) Mat3 { + //angle = (angle * math.Pi) / 180.0 + sin, cos := float32(math.Sin(float64(angle))), float32(math.Cos(float64(angle))) + return Mat3{cos, sin, 0, -sin, cos, 0, 0, 0, 1} +} + +// Same as Rotate3DX, except homogeneous (4x4 with the extra row/col being all zeroes with a one in the bottom right) +func HomogRotate3DX(angle float32) Mat4 { + //angle = (angle * math.Pi) / 180.0 + sin, cos := float32(math.Sin(float64(angle))), float32(math.Cos(float64(angle))) + + return Mat4{1, 0, 0, 0, 0, cos, sin, 0, 0, -sin, cos, 0, 0, 0, 0, 1} +} + +// Same as Rotate3DY, except homogeneous (4x4 with the extra row/col being all zeroes with a one in the bottom right) +func HomogRotate3DY(angle float32) Mat4 { + //angle = (angle * math.Pi) / 180.0 + sin, cos := float32(math.Sin(float64(angle))), float32(math.Cos(float64(angle))) + return Mat4{cos, 0, -sin, 0, 0, 1, 0, 0, sin, 0, cos, 0, 0, 0, 0, 1} +} + +// Same as Rotate3DZ, except homogeneous (4x4 with the extra row/col being all zeroes with a one in the bottom right) +func HomogRotate3DZ(angle float32) Mat4 { + //angle = (angle * math.Pi) / 180.0 + sin, cos := float32(math.Sin(float64(angle))), float32(math.Cos(float64(angle))) + return Mat4{cos, sin, 0, 0, -sin, cos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1} +} + +// Scale3D creates a homogeneous 3D scaling matrix +// [[ scaleX, 0 , 0 , 0 ]] +// [[ 0 , scaleY, 0 , 0 ]] +// [[ 0 , 0 , scaleZ, 0 ]] +// [[ 0 , 0 , 0 , 1 ]] +func Scale3D(scaleX, scaleY, scaleZ float32) Mat4 { + + return Mat4{float32(scaleX), 0, 0, 0, 0, float32(scaleY), 0, 0, 0, 0, float32(scaleZ), 0, 0, 0, 0, 1} +} + +// Scale2D creates a homogeneous 2D scaling matrix +// [[ scaleX, 0 , 0 ]] +// [[ 0 , scaleY, 0 ]] +// [[ 0 , 0 , 1 ]] +func Scale2D(scaleX, scaleY float32) Mat3 { + return Mat3{float32(scaleX), 0, 0, 0, float32(scaleY), 0, 0, 0, 1} +} + +// ShearX2D creates a homogeneous 2D shear matrix along the X-axis +func ShearX2D(shear float32) Mat3 { + return Mat3{1, 0, 0, float32(shear), 1, 0, 0, 0, 1} +} + +// ShearY2D creates a homogeneous 2D shear matrix along the Y-axis +func ShearY2D(shear float32) Mat3 { + return Mat3{1, float32(shear), 0, 0, 1, 0, 0, 0, 1} +} + +// ShearX3D creates a homogeneous 3D shear matrix along the X-axis +func ShearX3D(shearY, shearZ float32) Mat4 { + + return Mat4{1, float32(shearY), float32(shearZ), 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1} +} + +// ShearY3D creates a homogeneous 3D shear matrix along the Y-axis +func ShearY3D(shearX, shearZ float32) Mat4 { + return Mat4{1, 0, 0, 0, float32(shearX), 1, float32(shearZ), 0, 0, 0, 1, 0, 0, 0, 0, 1} +} + +// ShearZ3D creates a homogeneous 3D shear matrix along the Z-axis +func ShearZ3D(shearX, shearY float32) Mat4 { + return Mat4{1, 0, 0, 0, 0, 1, 0, 0, float32(shearX), float32(shearY), 1, 0, 0, 0, 0, 1} +} + +// HomogRotate3D creates a 3D rotation Matrix that rotates by (radian) angle about some arbitrary axis given by a normalized Vector. +// It produces a homogeneous matrix (4x4) +// +// Where c is cos(angle) and s is sin(angle), and x, y, and z are the first, second, and third elements of the axis vector (respectively): +// +// [[ x^2(1-c)+c, xy(1-c)-zs, xz(1-c)+ys, 0 ]] +// [[ xy(1-c)+zs, y^2(1-c)+c, yz(1-c)-xs, 0 ]] +// [[ xz(1-c)-ys, yz(1-c)+xs, z^2(1-c)+c, 0 ]] +// [[ 0 , 0 , 0 , 1 ]] +func HomogRotate3D(angle float32, axis Vec3) Mat4 { + x, y, z := axis[0], axis[1], axis[2] + s, c := float32(math.Sin(float64(angle))), float32(math.Cos(float64(angle))) + k := 1 - c + + return Mat4{x*x*k + c, x*y*k + z*s, x*z*k - y*s, 0, x*y*k - z*s, y*y*k + c, y*z*k + x*s, 0, x*z*k + y*s, y*z*k - x*s, z*z*k + c, 0, 0, 0, 0, 1} +} + +// Extracts the 3d scaling from a homogeneous matrix +func Extract3DScale(m Mat4) (x, y, z float32) { + return float32(math.Sqrt(float64(m[0]*m[0] + m[1]*m[1] + m[2]*m[2]))), + float32(math.Sqrt(float64(m[4]*m[4] + m[5]*m[5] + m[6]*m[6]))), + float32(math.Sqrt(float64(m[8]*m[8] + m[9]*m[9] + m[10]*m[10]))) +} + +// Extracts the maximum scaling from a homogeneous matrix +func ExtractMaxScale(m Mat4) float32 { + scaleX := float64(m[0]*m[0] + m[1]*m[1] + m[2]*m[2]) + scaleY := float64(m[4]*m[4] + m[5]*m[5] + m[6]*m[6]) + scaleZ := float64(m[8]*m[8] + m[9]*m[9] + m[10]*m[10]) + + return float32(math.Sqrt(math.Max(scaleX, math.Max(scaleY, scaleZ)))) +} + +// Calculates the Normal of the Matrix (aka the inverse transpose) +func Mat4Normal(m Mat4) Mat3 { + n := m.Inv().Transpose() + return Mat3{n[0], n[1], n[2], n[4], n[5], n[6], n[8], n[9], n[10]} +} + +// Multiplies a 3D vector by a transformation given by +// the homogeneous 4D matrix m, applying any translation. +// If this transformation is non-affine, it will project this +// vector onto the plane w=1 before returning the result. +// +// This is similar to saying you're transforming and projecting a point. +// +// This is effectively equivalent to the GLSL code +// vec4 r = (m * vec4(v,1.)); +// r = r/r.w; +// vec3 newV = r.xyz; +func TransformCoordinate(v Vec3, m Mat4) Vec3 { + t := v.Vec4(1) + t = m.Mul4x1(t) + t = t.Mul(1 / t[3]) + + return t.Vec3() +} + +// Multiplies a 3D vector by a transformation given by +// the homogeneous 4D matrix m, NOT applying any translations. +// +// This is similar to saying you're applying a transformation +// to a direction or normal. Rotation still applies (as does scaling), +// but translating a direction or normal is meaningless. +// +// This is effectively equivalent to the GLSL code +// vec4 r = (m * vec4(v,0.)); +// vec3 newV = r.xyz +func TransformNormal(v Vec3, m Mat4) Vec3 { + t := v.Vec4(0) + t = m.Mul4x1(t) + + return t.Vec3() +} diff --git a/vendor/github.com/go-gl/mathgl/mgl32/util.go b/vendor/github.com/go-gl/mathgl/mgl32/util.go new file mode 100644 index 0000000..9757a05 --- /dev/null +++ b/vendor/github.com/go-gl/mathgl/mgl32/util.go @@ -0,0 +1,142 @@ +// Copyright 2014 The go-gl Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:generate go run codegen.go -template vector.tmpl -output vector.go +//go:generate go run codegen.go -template matrix.tmpl -output matrix.go +//go:generate go run codegen.go -mgl64 + +package mgl32 + +import ( + "math" +) + +// Epsilon is some tiny value that determines how precisely equal we want our floats to be +// This is exported and left as a variable in case you want to change the default threshold for the +// purposes of certain methods (e.g. Unproject uses the default epsilon when determining +// if the determinant is "close enough" to zero to mean there's no inverse). +// +// This is, obviously, not mutex protected so be **absolutely sure** that no functions using Epsilon +// are being executed when you change this. +var Epsilon float32 = 1e-10 + +// A direct copy of the math package's Abs. This is here for the mgl32 +// package, to prevent rampant type conversions during equality tests. +func Abs(a float32) float32 { + if a < 0 { + return -a + } else if a == 0 { + return 0 + } + + return a +} + +// FloatEqual is a safe utility function to compare floats. +// It's Taken from http://floating-point-gui.de/errors/comparison/ +// +// It is slightly altered to not call Abs when not needed. +func FloatEqual(a, b float32) bool { + return FloatEqualThreshold(a, b, Epsilon) +} + +// FloatEqualFunc is a utility closure that will generate a function that +// always approximately compares floats like FloatEqualThreshold with a different +// threshold. +func FloatEqualFunc(epsilon float32) func(float32, float32) bool { + return func(a, b float32) bool { + return FloatEqualThreshold(a, b, epsilon) + } +} + +var ( + MinNormal = float32(1.1754943508222875e-38) // 1 / 2**(127 - 1) + MinValue = float32(math.SmallestNonzeroFloat32) + MaxValue = float32(math.MaxFloat32) + + InfPos = float32(math.Inf(1)) + InfNeg = float32(math.Inf(-1)) + NaN = float32(math.NaN()) +) + +// FloatEqualThreshold is a utility function to compare floats. +// It's Taken from http://floating-point-gui.de/errors/comparison/ +// +// It is slightly altered to not call Abs when not needed. +// +// This differs from FloatEqual in that it lets you pass in your comparison threshold, so that you can adjust the comparison value to your specific needs +func FloatEqualThreshold(a, b, epsilon float32) bool { + if a == b { // Handles the case of inf or shortcuts the loop when no significant error has accumulated + return true + } + + diff := Abs(a - b) + if a*b == 0 || diff < MinNormal { // If a or b are 0 or both are extremely close to it + return diff < epsilon*epsilon + } + + // Else compare difference + return diff/(Abs(a)+Abs(b)) < epsilon +} + +// Clamp takes in a value and two thresholds. If the value is smaller than the low +// threshold, it returns the low threshold. If it's bigger than the high threshold +// it returns the high threshold. Otherwise it returns the value. +// +// Useful to prevent some functions from freaking out because a value was +// teeeeechnically out of range. +func Clamp(a, low, high float32) float32 { + if a < low { + return low + } else if a > high { + return high + } + + return a +} + +// ClampFunc generates a closure that returns its parameter +// clamped to the range [low,high]. +func ClampFunc(low, high float32) func(float32) float32 { + return func(a float32) float32 { + return Clamp(a, low, high) + } +} + +/* The IsClamped functions use strict equality (meaning: not the FloatEqual function) +there shouldn't be any major issues with this since clamp is often used to fix minor errors*/ + +// Checks if a is clamped between low and high as if +// Clamp(a, low, high) had been called. +// +// In most cases it's probably better to just call Clamp +// without checking this since it's relatively cheap. +func IsClamped(a, low, high float32) bool { + return a >= low && a <= high +} + +// If a > b, then a will be set to the value of b. +func SetMin(a, b *float32) { + if *b < *a { + *a = *b + } +} + +// If a < b, then a will be set to the value of b. +func SetMax(a, b *float32) { + if *a < *b { + *a = *b + } +} + +// Round shortens a float32 value to a specified precision (number of digits after the decimal point) +// with "round half up" tie-braking rule. Half-way values (23.5) are always rounded up (24). +func Round(v float32, precision int) float32 { + p := float64(precision) + t := float64(v) * math.Pow(10, p) + if t > 0 { + return float32(math.Floor(t+0.5) / math.Pow(10, p)) + } + return float32(math.Ceil(t-0.5) / math.Pow(10, p)) +} diff --git a/vendor/github.com/go-gl/mathgl/mgl32/vecn.go b/vendor/github.com/go-gl/mathgl/mgl32/vecn.go new file mode 100644 index 0000000..a09be05 --- /dev/null +++ b/vendor/github.com/go-gl/mathgl/mgl32/vecn.go @@ -0,0 +1,350 @@ +// Copyright 2014 The go-gl Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package mgl32 + +import ( + "math" +) + +// A vector of N elements backed by a slice +// +// As with MatMxN, this is not for hardcore linear algebra with large dimensions. Use github.com/gonum/matrix +// or something like BLAS/LAPACK for that. This is for corner cases in 3D math where you require +// something a little bigger that 4D, but still relatively small. +// +// This VecN uses several sync.Pool objects as a memory pool. The rule is that for any sized vector, the backing slice +// has CAPACITY (not length) of 2^p where p is Ceil(log_2(N)) -- or in other words, rounding up the base-2 +// log of the size of the vector. E.G. a VecN of size 17 will have a backing slice of Cap 32. +type VecN struct { + vec []float32 +} + +// Creates a new vector with a backing slice filled with the contents +// of initial. It is NOT backed by initial, but rather a slice with cap +// 2^p where p is Ceil(log_2(len(initial))), with the data from initial copied into +// it. +func NewVecNFromData(initial []float32) *VecN { + if initial == nil { + return &VecN{} + } + var internal []float32 + if shouldPool { + internal = grabFromPool(len(initial)) + } else { + internal = make([]float32, len(initial)) + } + copy(internal, initial) + return &VecN{vec: internal} +} + +// Creates a new vector with a backing slice of +// 2^p where p = Ceil(log_2(n)) +func NewVecN(n int) *VecN { + if shouldPool { + return &VecN{vec: grabFromPool(n)} + } else { + return &VecN{vec: make([]float32, n)} + } +} + +// Returns the raw slice backing the VecN +// +// This may be sent back to the memory pool at any time +// and you aren't advised to rely on this value +func (vn VecN) Raw() []float32 { + return vn.vec +} + +// Gets the element at index i from the vector. +// This does not bounds check, and will panic if i is +// out of range. +func (vn VecN) Get(i int) float32 { + return vn.vec[i] +} + +func (vn *VecN) Set(i int, val float32) { + vn.vec[i] = val +} + +// Sends the allocated memory through the callback if it exists +func (vn *VecN) destroy() { + if vn == nil || vn.vec == nil { + return + } + + if shouldPool { + returnToPool(vn.vec) + } + vn.vec = nil +} + +// Resizes the underlying slice to the desired amount, reallocating or retrieving from the pool +// if necessary. The values after a Resize cannot be expected to be related to the values before a Resize. +// +// If the caller is a nil pointer, this returns a value as if NewVecN(n) had been called, +// otherwise it simply returns the caller. +func (vn *VecN) Resize(n int) *VecN { + if vn == nil { + return NewVecN(n) + } + + if n <= cap(vn.vec) { + if vn.vec != nil { + vn.vec = vn.vec[:n] + } else { + vn.vec = []float32{} + } + return vn + } + + if shouldPool && vn.vec != nil { + returnToPool(vn.vec) + } + *vn = (*NewVecN(n)) + + return vn +} + +// Sets the vector's backing slice to the given +// new one. +func (vn *VecN) SetBackingSlice(newSlice []float32) { + vn.vec = newSlice +} + +// Return the len of the vector's underlying slice. +// This is not titled Len because it conflicts the package's +// convention of calling the Norm the Len. +func (vn *VecN) Size() int { + return len(vn.vec) +} + +// Returns the cap of the vector's underlying slice. +func (vn *VecN) Cap() int { + return cap(vn.vec) +} + +// Sets the vector's size to n and zeroes out the vector. +// If n is bigger than the vector's size, it will realloc. +func (vn *VecN) Zero(n int) { + vn.Resize(n) + for i := range vn.vec { + vn.vec[i] = 0 + } +} + +// Adds vn and addend, storing the result in dst. +// If dst does not have sufficient size it will be resized +// Dst may be one of the other arguments. If dst is nil, it will be allocated. +// The value returned is dst, for easier method chaining +// +// If vn and addend are not the same size, this function will add min(vn.Size(), addend.Size()) +// elements. +func (vn *VecN) Add(dst *VecN, subtrahend *VecN) *VecN { + if vn == nil || subtrahend == nil { + return nil + } + size := intMin(len(vn.vec), len(subtrahend.vec)) + dst = dst.Resize(size) + + for i := 0; i < size; i++ { + dst.vec[i] = vn.vec[i] + subtrahend.vec[i] + } + + return dst +} + +// Subtracts addend from vn, storing the result in dst. +// If dst does not have sufficient size it will be resized +// Dst may be one of the other arguments. If dst is nil, it will be allocated. +// The value returned is dst, for easier method chaining +// +// If vn and addend are not the same size, this function will add min(vn.Size(), addend.Size()) +// elements. +func (vn *VecN) Sub(dst *VecN, addend *VecN) *VecN { + if vn == nil || addend == nil { + return nil + } + size := intMin(len(vn.vec), len(addend.vec)) + dst = dst.Resize(size) + + for i := 0; i < size; i++ { + dst.vec[i] = vn.vec[i] - addend.vec[i] + } + + return dst +} + +// Takes the binary cross product of vn and other, and stores it in dst. +// If either vn or other are not of size 3 this function will panic +// +// If dst is not of sufficient size, or is nil, a new slice is allocated. +// Dst is permitted to be one of the other arguments +func (vn *VecN) Cross(dst *VecN, other *VecN) *VecN { + if vn == nil || other == nil { + return nil + } + if len(vn.vec) != 3 || len(other.vec) != 3 { + panic("Cannot take binary cross product of non-3D elements (7D cross product not implemented)") + } + + dst = dst.Resize(3) + dst.vec[0], dst.vec[1], dst.vec[2] = vn.vec[1]*other.vec[2]-vn.vec[2]*other.vec[1], vn.vec[2]*other.vec[0]-vn.vec[0]*other.vec[2], vn.vec[0]*other.vec[1]-vn.vec[1]*other.vec[0] + + return dst +} + +func intMin(a, b int) int { + if a < b { + return a + } + + return b +} + +// Computes the dot product of two VecNs, if +// the two vectors are not of the same length -- this +// will return NaN. +func (vn *VecN) Dot(other *VecN) float32 { + if vn == nil || other == nil || len(vn.vec) != len(other.vec) { + return float32(math.NaN()) + } + + var result float32 = 0.0 + for i, el := range vn.vec { + result += el * other.vec[i] + } + + return result +} + +// Computes the vector length (also called the Norm) of the +// vector. Equivalent to math.Sqrt(vn.Dot(vn)) with the appropriate +// type conversions. +// +// If vn is nil, this returns NaN +func (vn *VecN) Len() float32 { + if vn == nil { + return float32(math.NaN()) + } + if len(vn.vec) == 0 { + return 0 + } + + return float32(math.Sqrt(float64(vn.Dot(vn)))) +} + +// Normalizes the vector and stores the result in dst, which +// will be returned. Dst will be appropraitely resized to the +// size of vn. +// +// The destination can be vn itself and nothing will go wrong. +// +// This is equivalent to vn.Mul(dst, 1/vn.Len()) +func (vn *VecN) Normalize(dst *VecN) *VecN { + if vn == nil { + return nil + } + + return vn.Mul(dst, 1/vn.Len()) +} + +// Multiplied the vector by some scalar value and stores the result in dst, which +// will be returned. Dst will be appropraitely resized to the +// size of vn. +// +// The destination can be vn itself and nothing will go wrong. +func (vn *VecN) Mul(dst *VecN, c float32) *VecN { + if vn == nil { + return nil + } + dst = dst.Resize(len(vn.vec)) + + for i, el := range vn.vec { + dst.vec[i] = el * c + } + + return dst +} + +// Performs the vector outer product between vn and v2. +// The outer product is like a "reverse" dot product. Where the dot product +// aligns both vectors with the "sized" part facing "inward" (Vec3*Vec3=Mat1x3*Mat3x1=Mat1x1=Scalar). +// The outer product multiplied them with it facing "outward" +// (Vec3*Vec3=Mat3x1*Mat1x3=Mat3x3). +// +// The matrix dst will be Reshaped to the correct size, if vn or v2 are nil, +// this returns nil. +func (vn *VecN) OuterProd(dst *MatMxN, v2 *VecN) *MatMxN { + if vn == nil || v2 == nil { + return nil + } + + dst = dst.Reshape(len(vn.vec), len(v2.vec)) + + for c, el1 := range v2.vec { + for r, el2 := range vn.vec { + dst.Set(r, c, el1*el2) + } + } + + return dst +} + +func (vn *VecN) ApproxEqual(vn2 *VecN) bool { + if vn == nil || vn2 == nil || len(vn.vec) != len(vn2.vec) { + return false + } + + for i, el := range vn.vec { + if !FloatEqual(el, vn2.vec[i]) { + return false + } + } + + return true +} + +func (vn *VecN) ApproxEqualThreshold(vn2 *VecN, epsilon float32) bool { + if vn == nil || vn2 == nil || len(vn.vec) != len(vn2.vec) { + return false + } + + for i, el := range vn.vec { + if !FloatEqualThreshold(el, vn2.vec[i], epsilon) { + return false + } + } + + return true +} + +func (vn *VecN) ApproxEqualFunc(vn2 *VecN, comp func(float32, float32) bool) bool { + if vn == nil || vn2 == nil || len(vn.vec) != len(vn2.vec) { + return false + } + + for i, el := range vn.vec { + if !comp(el, vn2.vec[i]) { + return false + } + } + + return true +} + +func (vn *VecN) Vec2() Vec2 { + raw := vn.Raw() + return Vec2{raw[0], raw[1]} +} + +func (vn *VecN) Vec3() Vec3 { + raw := vn.Raw() + return Vec3{raw[0], raw[1], raw[2]} +} + +func (vn *VecN) Vec4() Vec4 { + raw := vn.Raw() + return Vec4{raw[0], raw[1], raw[2], raw[3]} +} diff --git a/vendor/github.com/go-gl/mathgl/mgl32/vector.go b/vendor/github.com/go-gl/mathgl/mgl32/vector.go new file mode 100644 index 0000000..aacfb3e --- /dev/null +++ b/vendor/github.com/go-gl/mathgl/mgl32/vector.go @@ -0,0 +1,562 @@ +// Copyright 2014 The go-gl/mathgl Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// This file is generated by codegen.go; DO NOT EDIT +// Edit vector.tmpl and run "go generate" to make changes. + +package mgl32 + +import ( + "golang.org/x/image/math/f32" + "math" +) + +type Vec2 f32.Vec2 +type Vec3 f32.Vec3 +type Vec4 f32.Vec4 + +func (v Vec2) Vec3(z float32) Vec3 { + return Vec3{v[0], v[1], z} +} + +func (v Vec2) Vec4(z, w float32) Vec4 { + return Vec4{v[0], v[1], z, w} +} + +func (v Vec3) Vec2() Vec2 { + return Vec2{v[0], v[1]} +} + +func (v Vec3) Vec4(w float32) Vec4 { + return Vec4{v[0], v[1], v[2], w} +} + +func (v Vec4) Vec2() Vec2 { + return Vec2{v[0], v[1]} +} + +func (v Vec4) Vec3() Vec3 { + return Vec3{v[0], v[1], v[2]} +} + +// Elem extracts the elements of the vector for direct value assignment. +func (v Vec2) Elem() (x, y float32) { + return v[0], v[1] +} + +// Elem extracts the elements of the vector for direct value assignment. +func (v Vec3) Elem() (x, y, z float32) { + return v[0], v[1], v[2] +} + +// Elem extracts the elements of the vector for direct value assignment. +func (v Vec4) Elem() (x, y, z, w float32) { + return v[0], v[1], v[2], v[3] +} + +// The vector cross product is an operation only defined on 3D vectors. It is equivalent to +// Vec3{v1[1]*v2[2]-v1[2]*v2[1], v1[2]*v2[0]-v1[0]*v2[2], v1[0]*v2[1] - v1[1]*v2[0]}. +// Another interpretation is that it's the vector whose magnitude is |v1||v2|sin(theta) +// where theta is the angle between v1 and v2. +// +// The cross product is most often used for finding surface normals. The cross product of vectors +// will generate a vector that is perpendicular to the plane they form. +// +// Technically, a generalized cross product exists as an "(N-1)ary" operation +// (that is, the 4D cross product requires 3 4D vectors). But the binary +// 3D (and 7D) cross product is the most important. It can be considered +// the area of a parallelogram with sides v1 and v2. +// +// Like the dot product, the cross product is roughly a measure of directionality. +// Two normalized perpendicular vectors will return a vector with a magnitude of +// 1.0 or -1.0 and two parallel vectors will return a vector with magnitude 0.0. +// The cross product is "anticommutative" meaning v1.Cross(v2) = -v2.Cross(v1), +// this property can be useful to know when finding normals, +// as taking the wrong cross product can lead to the opposite normal of the one you want. +func (v1 Vec3) Cross(v2 Vec3) Vec3 { + return Vec3{v1[1]*v2[2] - v1[2]*v2[1], v1[2]*v2[0] - v1[0]*v2[2], v1[0]*v2[1] - v1[1]*v2[0]} +} + +// Add performs element-wise addition between two vectors. It is equivalent to iterating +// over every element of v1 and adding the corresponding element of v2 to it. +func (v1 Vec2) Add(v2 Vec2) Vec2 { + return Vec2{v1[0] + v2[0], v1[1] + v2[1]} +} + +// Sub performs element-wise subtraction between two vectors. It is equivalent to iterating +// over every element of v1 and subtracting the corresponding element of v2 from it. +func (v1 Vec2) Sub(v2 Vec2) Vec2 { + return Vec2{v1[0] - v2[0], v1[1] - v2[1]} +} + +// Mul performs a scalar multiplication between the vector and some constant value +// c. This is equivalent to iterating over every vector element and multiplying by c. +func (v1 Vec2) Mul(c float32) Vec2 { + return Vec2{v1[0] * c, v1[1] * c} +} + +// Dot returns the dot product of this vector with another. There are multiple ways +// to describe this value. One is the multiplication of their lengths and cos(theta) where +// theta is the angle between the vectors: v1.v2 = |v1||v2|cos(theta). +// +// The other (and what is actually done) is the sum of the element-wise multiplication of all +// elements. So for instance, two Vec3s would yield v1.x * v2.x + v1.y * v2.y + v1.z * v2.z. +// +// This means that the dot product of a vector and itself is the square of its Len (within +// the bounds of floating points error). +// +// The dot product is roughly a measure of how closely two vectors are to pointing in the same +// direction. If both vectors are normalized, the value will be -1 for opposite pointing, +// one for same pointing, and 0 for perpendicular vectors. +func (v1 Vec2) Dot(v2 Vec2) float32 { + return v1[0]*v2[0] + v1[1]*v2[1] +} + +// Len returns the vector's length. Note that this is NOT the dimension of +// the vector (len(v)), but the mathematical length. This is equivalent to the square +// root of the sum of the squares of all elements. E.G. for a Vec2 it's +// math.Hypot(v[0], v[1]). +func (v1 Vec2) Len() float32 { + + return float32(math.Hypot(float64(v1[0]), float64(v1[1]))) + +} + +// Normalize normalizes the vector. Normalization is (1/|v|)*v, +// making this equivalent to v.Scale(1/v.Len()). If the len is 0.0, +// this function will return an infinite value for all elements due +// to how floating point division works in Go (n/0.0 = math.Inf(Sign(n))). +// +// Normalization makes a vector's Len become 1.0 (within the margin of floating point error), +// while maintaining its directionality. +// +// (Can be seen here: http://play.golang.org/p/Aaj7SnbqIp ) +func (v1 Vec2) Normalize() Vec2 { + l := 1.0 / v1.Len() + return Vec2{v1[0] * l, v1[1] * l} +} + +// ApproxEqual takes in a vector and does an element-wise +// approximate float comparison as if FloatEqual had been used +func (v1 Vec2) ApproxEqual(v2 Vec2) bool { + for i := range v1 { + if !FloatEqual(v1[i], v2[i]) { + return false + } + } + return true +} + +// ApproxThresholdEq takes in a threshold for comparing two floats, and uses it to do an +// element-wise comparison of the vector to another. +func (v1 Vec2) ApproxEqualThreshold(v2 Vec2, threshold float32) bool { + for i := range v1 { + if !FloatEqualThreshold(v1[i], v2[i], threshold) { + return false + } + } + return true +} + +// ApproxFuncEq takes in a func that compares two floats, and uses it to do an element-wise +// comparison of the vector to another. This is intended to be used with FloatEqualFunc +func (v1 Vec2) ApproxFuncEqual(v2 Vec2, eq func(float32, float32) bool) bool { + for i := range v1 { + if !eq(v1[i], v2[i]) { + return false + } + } + return true +} + +// This is an element access func, it is equivalent to v[n] where +// n is some valid index. The mappings are XYZW (X=0, Y=1 etc). Benchmarks +// show that this is more or less as fast as direct acces, probably due to +// inlining, so use v[0] or v.X() depending on personal preference. +func (v Vec2) X() float32 { + return v[0] +} + +// This is an element access func, it is equivalent to v[n] where +// n is some valid index. The mappings are XYZW (X=0, Y=1 etc). Benchmarks +// show that this is more or less as fast as direct acces, probably due to +// inlining, so use v[0] or v.X() depending on personal preference. +func (v Vec2) Y() float32 { + return v[1] +} + +// Does the vector outer product +// of two vectors. The outer product produces an +// 2x2 matrix. E.G. a Vec2 * Vec2 = Mat2. +// +// The outer product can be thought of as the "opposite" +// of the Dot product. The Dot product treats both vectors like matrices +// oriented such that the left one has N columns and the right has N rows. +// So Vec3.Vec3 = Mat1x3*Mat3x1 = Mat1 = Scalar. +// +// The outer product orients it so they're facing "outward": Vec2*Vec3 +// = Mat2x1*Mat1x3 = Mat2x3. +func (v1 Vec2) OuterProd2(v2 Vec2) Mat2 { + return Mat2{v1[0] * v2[0], v1[1] * v2[0], v1[0] * v2[1], v1[1] * v2[1]} +} + +// Does the vector outer product +// of two vectors. The outer product produces an +// 2x3 matrix. E.G. a Vec2 * Vec3 = Mat2x3. +// +// The outer product can be thought of as the "opposite" +// of the Dot product. The Dot product treats both vectors like matrices +// oriented such that the left one has N columns and the right has N rows. +// So Vec3.Vec3 = Mat1x3*Mat3x1 = Mat1 = Scalar. +// +// The outer product orients it so they're facing "outward": Vec2*Vec3 +// = Mat2x1*Mat1x3 = Mat2x3. +func (v1 Vec2) OuterProd3(v2 Vec3) Mat2x3 { + return Mat2x3{v1[0] * v2[0], v1[1] * v2[0], v1[0] * v2[1], v1[1] * v2[1], v1[0] * v2[2], v1[1] * v2[2]} +} + +// Does the vector outer product +// of two vectors. The outer product produces an +// 2x4 matrix. E.G. a Vec2 * Vec4 = Mat2x4. +// +// The outer product can be thought of as the "opposite" +// of the Dot product. The Dot product treats both vectors like matrices +// oriented such that the left one has N columns and the right has N rows. +// So Vec3.Vec3 = Mat1x3*Mat3x1 = Mat1 = Scalar. +// +// The outer product orients it so they're facing "outward": Vec2*Vec3 +// = Mat2x1*Mat1x3 = Mat2x3. +func (v1 Vec2) OuterProd4(v2 Vec4) Mat2x4 { + return Mat2x4{v1[0] * v2[0], v1[1] * v2[0], v1[0] * v2[1], v1[1] * v2[1], v1[0] * v2[2], v1[1] * v2[2], v1[0] * v2[3], v1[1] * v2[3]} +} + +// Add performs element-wise addition between two vectors. It is equivalent to iterating +// over every element of v1 and adding the corresponding element of v2 to it. +func (v1 Vec3) Add(v2 Vec3) Vec3 { + return Vec3{v1[0] + v2[0], v1[1] + v2[1], v1[2] + v2[2]} +} + +// Sub performs element-wise subtraction between two vectors. It is equivalent to iterating +// over every element of v1 and subtracting the corresponding element of v2 from it. +func (v1 Vec3) Sub(v2 Vec3) Vec3 { + return Vec3{v1[0] - v2[0], v1[1] - v2[1], v1[2] - v2[2]} +} + +// Mul performs a scalar multiplication between the vector and some constant value +// c. This is equivalent to iterating over every vector element and multiplying by c. +func (v1 Vec3) Mul(c float32) Vec3 { + return Vec3{v1[0] * c, v1[1] * c, v1[2] * c} +} + +// Dot returns the dot product of this vector with another. There are multiple ways +// to describe this value. One is the multiplication of their lengths and cos(theta) where +// theta is the angle between the vectors: v1.v2 = |v1||v2|cos(theta). +// +// The other (and what is actually done) is the sum of the element-wise multiplication of all +// elements. So for instance, two Vec3s would yield v1.x * v2.x + v1.y * v2.y + v1.z * v2.z. +// +// This means that the dot product of a vector and itself is the square of its Len (within +// the bounds of floating points error). +// +// The dot product is roughly a measure of how closely two vectors are to pointing in the same +// direction. If both vectors are normalized, the value will be -1 for opposite pointing, +// one for same pointing, and 0 for perpendicular vectors. +func (v1 Vec3) Dot(v2 Vec3) float32 { + return v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2] +} + +// Len returns the vector's length. Note that this is NOT the dimension of +// the vector (len(v)), but the mathematical length. This is equivalent to the square +// root of the sum of the squares of all elements. E.G. for a Vec2 it's +// math.Hypot(v[0], v[1]). +func (v1 Vec3) Len() float32 { + + return float32(math.Sqrt(float64(v1[0]*v1[0] + v1[1]*v1[1] + v1[2]*v1[2]))) + +} + +// Normalize normalizes the vector. Normalization is (1/|v|)*v, +// making this equivalent to v.Scale(1/v.Len()). If the len is 0.0, +// this function will return an infinite value for all elements due +// to how floating point division works in Go (n/0.0 = math.Inf(Sign(n))). +// +// Normalization makes a vector's Len become 1.0 (within the margin of floating point error), +// while maintaining its directionality. +// +// (Can be seen here: http://play.golang.org/p/Aaj7SnbqIp ) +func (v1 Vec3) Normalize() Vec3 { + l := 1.0 / v1.Len() + return Vec3{v1[0] * l, v1[1] * l, v1[2] * l} +} + +// ApproxEqual takes in a vector and does an element-wise +// approximate float comparison as if FloatEqual had been used +func (v1 Vec3) ApproxEqual(v2 Vec3) bool { + for i := range v1 { + if !FloatEqual(v1[i], v2[i]) { + return false + } + } + return true +} + +// ApproxThresholdEq takes in a threshold for comparing two floats, and uses it to do an +// element-wise comparison of the vector to another. +func (v1 Vec3) ApproxEqualThreshold(v2 Vec3, threshold float32) bool { + for i := range v1 { + if !FloatEqualThreshold(v1[i], v2[i], threshold) { + return false + } + } + return true +} + +// ApproxFuncEq takes in a func that compares two floats, and uses it to do an element-wise +// comparison of the vector to another. This is intended to be used with FloatEqualFunc +func (v1 Vec3) ApproxFuncEqual(v2 Vec3, eq func(float32, float32) bool) bool { + for i := range v1 { + if !eq(v1[i], v2[i]) { + return false + } + } + return true +} + +// This is an element access func, it is equivalent to v[n] where +// n is some valid index. The mappings are XYZW (X=0, Y=1 etc). Benchmarks +// show that this is more or less as fast as direct acces, probably due to +// inlining, so use v[0] or v.X() depending on personal preference. +func (v Vec3) X() float32 { + return v[0] +} + +// This is an element access func, it is equivalent to v[n] where +// n is some valid index. The mappings are XYZW (X=0, Y=1 etc). Benchmarks +// show that this is more or less as fast as direct acces, probably due to +// inlining, so use v[0] or v.X() depending on personal preference. +func (v Vec3) Y() float32 { + return v[1] +} + +// This is an element access func, it is equivalent to v[n] where +// n is some valid index. The mappings are XYZW (X=0, Y=1 etc). Benchmarks +// show that this is more or less as fast as direct acces, probably due to +// inlining, so use v[0] or v.X() depending on personal preference. +func (v Vec3) Z() float32 { + return v[2] +} + +// Does the vector outer product +// of two vectors. The outer product produces an +// 3x2 matrix. E.G. a Vec3 * Vec2 = Mat3x2. +// +// The outer product can be thought of as the "opposite" +// of the Dot product. The Dot product treats both vectors like matrices +// oriented such that the left one has N columns and the right has N rows. +// So Vec3.Vec3 = Mat1x3*Mat3x1 = Mat1 = Scalar. +// +// The outer product orients it so they're facing "outward": Vec2*Vec3 +// = Mat2x1*Mat1x3 = Mat2x3. +func (v1 Vec3) OuterProd2(v2 Vec2) Mat3x2 { + return Mat3x2{v1[0] * v2[0], v1[1] * v2[0], v1[2] * v2[0], v1[0] * v2[1], v1[1] * v2[1], v1[2] * v2[1]} +} + +// Does the vector outer product +// of two vectors. The outer product produces an +// 3x3 matrix. E.G. a Vec3 * Vec3 = Mat3. +// +// The outer product can be thought of as the "opposite" +// of the Dot product. The Dot product treats both vectors like matrices +// oriented such that the left one has N columns and the right has N rows. +// So Vec3.Vec3 = Mat1x3*Mat3x1 = Mat1 = Scalar. +// +// The outer product orients it so they're facing "outward": Vec2*Vec3 +// = Mat2x1*Mat1x3 = Mat2x3. +func (v1 Vec3) OuterProd3(v2 Vec3) Mat3 { + return Mat3{v1[0] * v2[0], v1[1] * v2[0], v1[2] * v2[0], v1[0] * v2[1], v1[1] * v2[1], v1[2] * v2[1], v1[0] * v2[2], v1[1] * v2[2], v1[2] * v2[2]} +} + +// Does the vector outer product +// of two vectors. The outer product produces an +// 3x4 matrix. E.G. a Vec3 * Vec4 = Mat3x4. +// +// The outer product can be thought of as the "opposite" +// of the Dot product. The Dot product treats both vectors like matrices +// oriented such that the left one has N columns and the right has N rows. +// So Vec3.Vec3 = Mat1x3*Mat3x1 = Mat1 = Scalar. +// +// The outer product orients it so they're facing "outward": Vec2*Vec3 +// = Mat2x1*Mat1x3 = Mat2x3. +func (v1 Vec3) OuterProd4(v2 Vec4) Mat3x4 { + return Mat3x4{v1[0] * v2[0], v1[1] * v2[0], v1[2] * v2[0], v1[0] * v2[1], v1[1] * v2[1], v1[2] * v2[1], v1[0] * v2[2], v1[1] * v2[2], v1[2] * v2[2], v1[0] * v2[3], v1[1] * v2[3], v1[2] * v2[3]} +} + +// Add performs element-wise addition between two vectors. It is equivalent to iterating +// over every element of v1 and adding the corresponding element of v2 to it. +func (v1 Vec4) Add(v2 Vec4) Vec4 { + return Vec4{v1[0] + v2[0], v1[1] + v2[1], v1[2] + v2[2], v1[3] + v2[3]} +} + +// Sub performs element-wise subtraction between two vectors. It is equivalent to iterating +// over every element of v1 and subtracting the corresponding element of v2 from it. +func (v1 Vec4) Sub(v2 Vec4) Vec4 { + return Vec4{v1[0] - v2[0], v1[1] - v2[1], v1[2] - v2[2], v1[3] - v2[3]} +} + +// Mul performs a scalar multiplication between the vector and some constant value +// c. This is equivalent to iterating over every vector element and multiplying by c. +func (v1 Vec4) Mul(c float32) Vec4 { + return Vec4{v1[0] * c, v1[1] * c, v1[2] * c, v1[3] * c} +} + +// Dot returns the dot product of this vector with another. There are multiple ways +// to describe this value. One is the multiplication of their lengths and cos(theta) where +// theta is the angle between the vectors: v1.v2 = |v1||v2|cos(theta). +// +// The other (and what is actually done) is the sum of the element-wise multiplication of all +// elements. So for instance, two Vec3s would yield v1.x * v2.x + v1.y * v2.y + v1.z * v2.z. +// +// This means that the dot product of a vector and itself is the square of its Len (within +// the bounds of floating points error). +// +// The dot product is roughly a measure of how closely two vectors are to pointing in the same +// direction. If both vectors are normalized, the value will be -1 for opposite pointing, +// one for same pointing, and 0 for perpendicular vectors. +func (v1 Vec4) Dot(v2 Vec4) float32 { + return v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2] + v1[3]*v2[3] +} + +// Len returns the vector's length. Note that this is NOT the dimension of +// the vector (len(v)), but the mathematical length. This is equivalent to the square +// root of the sum of the squares of all elements. E.G. for a Vec2 it's +// math.Hypot(v[0], v[1]). +func (v1 Vec4) Len() float32 { + + return float32(math.Sqrt(float64(v1[0]*v1[0] + v1[1]*v1[1] + v1[2]*v1[2] + v1[3]*v1[3]))) + +} + +// Normalize normalizes the vector. Normalization is (1/|v|)*v, +// making this equivalent to v.Scale(1/v.Len()). If the len is 0.0, +// this function will return an infinite value for all elements due +// to how floating point division works in Go (n/0.0 = math.Inf(Sign(n))). +// +// Normalization makes a vector's Len become 1.0 (within the margin of floating point error), +// while maintaining its directionality. +// +// (Can be seen here: http://play.golang.org/p/Aaj7SnbqIp ) +func (v1 Vec4) Normalize() Vec4 { + l := 1.0 / v1.Len() + return Vec4{v1[0] * l, v1[1] * l, v1[2] * l, v1[3] * l} +} + +// ApproxEqual takes in a vector and does an element-wise +// approximate float comparison as if FloatEqual had been used +func (v1 Vec4) ApproxEqual(v2 Vec4) bool { + for i := range v1 { + if !FloatEqual(v1[i], v2[i]) { + return false + } + } + return true +} + +// ApproxThresholdEq takes in a threshold for comparing two floats, and uses it to do an +// element-wise comparison of the vector to another. +func (v1 Vec4) ApproxEqualThreshold(v2 Vec4, threshold float32) bool { + for i := range v1 { + if !FloatEqualThreshold(v1[i], v2[i], threshold) { + return false + } + } + return true +} + +// ApproxFuncEq takes in a func that compares two floats, and uses it to do an element-wise +// comparison of the vector to another. This is intended to be used with FloatEqualFunc +func (v1 Vec4) ApproxFuncEqual(v2 Vec4, eq func(float32, float32) bool) bool { + for i := range v1 { + if !eq(v1[i], v2[i]) { + return false + } + } + return true +} + +// This is an element access func, it is equivalent to v[n] where +// n is some valid index. The mappings are XYZW (X=0, Y=1 etc). Benchmarks +// show that this is more or less as fast as direct acces, probably due to +// inlining, so use v[0] or v.X() depending on personal preference. +func (v Vec4) X() float32 { + return v[0] +} + +// This is an element access func, it is equivalent to v[n] where +// n is some valid index. The mappings are XYZW (X=0, Y=1 etc). Benchmarks +// show that this is more or less as fast as direct acces, probably due to +// inlining, so use v[0] or v.X() depending on personal preference. +func (v Vec4) Y() float32 { + return v[1] +} + +// This is an element access func, it is equivalent to v[n] where +// n is some valid index. The mappings are XYZW (X=0, Y=1 etc). Benchmarks +// show that this is more or less as fast as direct acces, probably due to +// inlining, so use v[0] or v.X() depending on personal preference. +func (v Vec4) Z() float32 { + return v[2] +} + +// This is an element access func, it is equivalent to v[n] where +// n is some valid index. The mappings are XYZW (X=0, Y=1 etc). Benchmarks +// show that this is more or less as fast as direct acces, probably due to +// inlining, so use v[0] or v.X() depending on personal preference. +func (v Vec4) W() float32 { + return v[3] +} + +// Does the vector outer product +// of two vectors. The outer product produces an +// 4x2 matrix. E.G. a Vec4 * Vec2 = Mat4x2. +// +// The outer product can be thought of as the "opposite" +// of the Dot product. The Dot product treats both vectors like matrices +// oriented such that the left one has N columns and the right has N rows. +// So Vec3.Vec3 = Mat1x3*Mat3x1 = Mat1 = Scalar. +// +// The outer product orients it so they're facing "outward": Vec2*Vec3 +// = Mat2x1*Mat1x3 = Mat2x3. +func (v1 Vec4) OuterProd2(v2 Vec2) Mat4x2 { + return Mat4x2{v1[0] * v2[0], v1[1] * v2[0], v1[2] * v2[0], v1[3] * v2[0], v1[0] * v2[1], v1[1] * v2[1], v1[2] * v2[1], v1[3] * v2[1]} +} + +// Does the vector outer product +// of two vectors. The outer product produces an +// 4x3 matrix. E.G. a Vec4 * Vec3 = Mat4x3. +// +// The outer product can be thought of as the "opposite" +// of the Dot product. The Dot product treats both vectors like matrices +// oriented such that the left one has N columns and the right has N rows. +// So Vec3.Vec3 = Mat1x3*Mat3x1 = Mat1 = Scalar. +// +// The outer product orients it so they're facing "outward": Vec2*Vec3 +// = Mat2x1*Mat1x3 = Mat2x3. +func (v1 Vec4) OuterProd3(v2 Vec3) Mat4x3 { + return Mat4x3{v1[0] * v2[0], v1[1] * v2[0], v1[2] * v2[0], v1[3] * v2[0], v1[0] * v2[1], v1[1] * v2[1], v1[2] * v2[1], v1[3] * v2[1], v1[0] * v2[2], v1[1] * v2[2], v1[2] * v2[2], v1[3] * v2[2]} +} + +// Does the vector outer product +// of two vectors. The outer product produces an +// 4x4 matrix. E.G. a Vec4 * Vec4 = Mat4. +// +// The outer product can be thought of as the "opposite" +// of the Dot product. The Dot product treats both vectors like matrices +// oriented such that the left one has N columns and the right has N rows. +// So Vec3.Vec3 = Mat1x3*Mat3x1 = Mat1 = Scalar. +// +// The outer product orients it so they're facing "outward": Vec2*Vec3 +// = Mat2x1*Mat1x3 = Mat2x3. +func (v1 Vec4) OuterProd4(v2 Vec4) Mat4 { + return Mat4{v1[0] * v2[0], v1[1] * v2[0], v1[2] * v2[0], v1[3] * v2[0], v1[0] * v2[1], v1[1] * v2[1], v1[2] * v2[1], v1[3] * v2[1], v1[0] * v2[2], v1[1] * v2[2], v1[2] * v2[2], v1[3] * v2[2], v1[0] * v2[3], v1[1] * v2[3], v1[2] * v2[3], v1[3] * v2[3]} +} diff --git a/vendor/github.com/go-gl/mathgl/mgl32/vector.tmpl b/vendor/github.com/go-gl/mathgl/mgl32/vector.tmpl new file mode 100644 index 0000000..40b497b --- /dev/null +++ b/vendor/github.com/go-gl/mathgl/mgl32/vector.tmpl @@ -0,0 +1,207 @@ +// Copyright 2014 The go-gl/mathgl Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// <<.Comment>> +// Edit <<.TemplateName>> and run "go generate" to make changes. + +package mgl32 + +import ( + "golang.org/x/image/math/f32" + "math" +) + +type Vec2 f32.Vec2 +type Vec3 f32.Vec3 +type Vec4 f32.Vec4 + +func (v Vec2) Vec3(z float32) Vec3 { + return Vec3{v[0], v[1], z} +} + +func (v Vec2) Vec4(z, w float32) Vec4 { + return Vec4{v[0], v[1], z, w} +} + +func (v Vec3) Vec2() Vec2 { + return Vec2{v[0], v[1]} +} + +func (v Vec3) Vec4(w float32) Vec4 { + return Vec4{v[0], v[1], v[2], w} +} + +func (v Vec4) Vec2() Vec2 { + return Vec2{v[0], v[1]} +} + +func (v Vec4) Vec3() Vec3 { + return Vec3{v[0], v[1], v[2]} +} + +// Elem extracts the elements of the vector for direct value assignment. +func (v Vec2) Elem() (x, y float32) { + return v[0], v[1] +} + +// Elem extracts the elements of the vector for direct value assignment. +func (v Vec3) Elem() (x, y, z float32) { + return v[0], v[1], v[2] +} + +// Elem extracts the elements of the vector for direct value assignment. +func (v Vec4) Elem() (x, y, z, w float32) { + return v[0], v[1], v[2], v[3] +} + +// The vector cross product is an operation only defined on 3D vectors. It is equivalent to +// Vec3{v1[1]*v2[2]-v1[2]*v2[1], v1[2]*v2[0]-v1[0]*v2[2], v1[0]*v2[1] - v1[1]*v2[0]}. +// Another interpretation is that it's the vector whose magnitude is |v1||v2|sin(theta) +// where theta is the angle between v1 and v2. +// +// The cross product is most often used for finding surface normals. The cross product of vectors +// will generate a vector that is perpendicular to the plane they form. +// +// Technically, a generalized cross product exists as an "(N-1)ary" operation +// (that is, the 4D cross product requires 3 4D vectors). But the binary +// 3D (and 7D) cross product is the most important. It can be considered +// the area of a parallelogram with sides v1 and v2. +// +// Like the dot product, the cross product is roughly a measure of directionality. +// Two normalized perpendicular vectors will return a vector with a magnitude of +// 1.0 or -1.0 and two parallel vectors will return a vector with magnitude 0.0. +// The cross product is "anticommutative" meaning v1.Cross(v2) = -v2.Cross(v1), +// this property can be useful to know when finding normals, +// as taking the wrong cross product can lead to the opposite normal of the one you want. +func (v1 Vec3) Cross(v2 Vec3) Vec3 { + return Vec3{v1[1]*v2[2] - v1[2]*v2[1], v1[2]*v2[0] - v1[0]*v2[2], v1[0]*v2[1] - v1[1]*v2[0]} +} + + +<> +<> +<<$type := typename $m 1>> + +// Add performs element-wise addition between two vectors. It is equivalent to iterating +// over every element of v1 and adding the corresponding element of v2 to it. +func (v1 <<$type>>) Add(v2 <<$type>>) <<$type>> { + return <<$type>>{<> v1[<<$i>>] + v2[<<$i>>], <>} +} + +// Sub performs element-wise subtraction between two vectors. It is equivalent to iterating +// over every element of v1 and subtracting the corresponding element of v2 from it. +func (v1 <<$type>>) Sub(v2 <<$type>>) <<$type>> { + return <<$type>>{<> v1[<<$i>>] - v2[<<$i>>], <>} +} + +// Mul performs a scalar multiplication between the vector and some constant value +// c. This is equivalent to iterating over every vector element and multiplying by c. +func (v1 <<$type>>) Mul(c float32) <<$type>> { + return <<$type>>{<> v1[<<$i>>] * c, <>} +} + +// Dot returns the dot product of this vector with another. There are multiple ways +// to describe this value. One is the multiplication of their lengths and cos(theta) where +// theta is the angle between the vectors: v1.v2 = |v1||v2|cos(theta). +// +// The other (and what is actually done) is the sum of the element-wise multiplication of all +// elements. So for instance, two Vec3s would yield v1.x * v2.x + v1.y * v2.y + v1.z * v2.z. +// +// This means that the dot product of a vector and itself is the square of its Len (within +// the bounds of floating points error). +// +// The dot product is roughly a measure of how closely two vectors are to pointing in the same +// direction. If both vectors are normalized, the value will be -1 for opposite pointing, +// one for same pointing, and 0 for perpendicular vectors. +func (v1 <<$type>>) Dot(v2 <<$type>>) float32 { + return <><> v1[<<$i>>]*v2[<<$i>>] <> +} + +// Len returns the vector's length. Note that this is NOT the dimension of +// the vector (len(v)), but the mathematical length. This is equivalent to the square +// root of the sum of the squares of all elements. E.G. for a Vec2 it's +// math.Hypot(v[0], v[1]). +func (v1 <<$type>>) Len() float32 { + <> + return float32(math.Hypot(float64(v1[0]), float64(v1[1]))) + <> + return float32(math.Sqrt(float64(<>))) + <> +} + +// Normalize normalizes the vector. Normalization is (1/|v|)*v, +// making this equivalent to v.Scale(1/v.Len()). If the len is 0.0, +// this function will return an infinite value for all elements due +// to how floating point division works in Go (n/0.0 = math.Inf(Sign(n))). +// +// Normalization makes a vector's Len become 1.0 (within the margin of floating point error), +// while maintaining its directionality. +// +// (Can be seen here: http://play.golang.org/p/Aaj7SnbqIp ) +func (v1 <<$type>>) Normalize() <<$type>> { + l := 1.0 / v1.Len() + return <<$type>>{<>v1[<<$i>>] * l,<>} +} + +// ApproxEqual takes in a vector and does an element-wise +// approximate float comparison as if FloatEqual had been used +func (v1 <<$type>>) ApproxEqual(v2 <<$type>>) bool { + for i := range v1 { + if !FloatEqual(v1[i], v2[i]) { + return false + } + } + return true +} + +// ApproxThresholdEq takes in a threshold for comparing two floats, and uses it to do an +// element-wise comparison of the vector to another. +func (v1 <<$type>>) ApproxEqualThreshold(v2 <<$type>>, threshold float32) bool { + for i := range v1 { + if !FloatEqualThreshold(v1[i], v2[i], threshold) { + return false + } + } + return true +} + +// ApproxFuncEq takes in a func that compares two floats, and uses it to do an element-wise +// comparison of the vector to another. This is intended to be used with FloatEqualFunc +func (v1 <<$type>>) ApproxFuncEqual(v2 <<$type>>, eq func(float32, float32) bool) bool { + for i := range v1 { + if !eq(v1[i], v2[i]) { + return false + } + } + return true +} + +<> +// This is an element access func, it is equivalent to v[n] where +// n is some valid index. The mappings are XYZW (X=0, Y=1 etc). Benchmarks +// show that this is more or less as fast as direct acces, probably due to +// inlining, so use v[0] or v.X() depending on personal preference. +func (v <<$type>>) <>() float32 { + return v[<<$i>>] +} +<> + +<> +// Does the vector outer product +// of two vectors. The outer product produces an +// <<$m>>x<<$n>> matrix. E.G. a Vec<<$m>> * Vec<<$n>> = <>. +// +// The outer product can be thought of as the "opposite" +// of the Dot product. The Dot product treats both vectors like matrices +// oriented such that the left one has N columns and the right has N rows. +// So Vec3.Vec3 = Mat1x3*Mat3x1 = Mat1 = Scalar. +// +// The outer product orients it so they're facing "outward": Vec2*Vec3 +// = Mat2x1*Mat1x3 = Mat2x3. +func (v1 <<$type>>) OuterProd<<$n>>(v2 <>) <> { + return <>{<>v1[<<$i.M>>] * v2[<<$i.N>>], <>} +} +<> + +<> <> diff --git a/vendor/github.com/golang/freetype/AUTHORS b/vendor/github.com/golang/freetype/AUTHORS new file mode 100644 index 0000000..5773ac7 --- /dev/null +++ b/vendor/github.com/golang/freetype/AUTHORS @@ -0,0 +1,20 @@ +# This is the official list of Freetype-Go authors for copyright purposes. +# This file is distinct from the CONTRIBUTORS files. +# See the latter for an explanation. +# +# Freetype-Go is derived from Freetype, which is written in C. The latter +# is copyright 1996-2010 David Turner, Robert Wilhelm, and Werner Lemberg. + +# Names should be added to this file as +# Name or Organization +# The email address is not required for organizations. + +# Please keep the list sorted. + +Google Inc. +Jeff R. Allen +Maksim Kochkin +Michael Fogleman +Rémy Oudompheng +Roger Peppe +Steven Edwards diff --git a/vendor/github.com/golang/freetype/CONTRIBUTORS b/vendor/github.com/golang/freetype/CONTRIBUTORS new file mode 100644 index 0000000..7a1b0a2 --- /dev/null +++ b/vendor/github.com/golang/freetype/CONTRIBUTORS @@ -0,0 +1,38 @@ +# This is the official list of people who can contribute +# (and typically have contributed) code to the Freetype-Go repository. +# The AUTHORS file lists the copyright holders; this file +# lists people. For example, Google employees are listed here +# but not in AUTHORS, because Google holds the copyright. +# +# The submission process automatically checks to make sure +# that people submitting code are listed in this file (by email address). +# +# Names should be added to this file only after verifying that +# the individual or the individual's organization has agreed to +# the appropriate Contributor License Agreement, found here: +# +# http://code.google.com/legal/individual-cla-v1.0.html +# http://code.google.com/legal/corporate-cla-v1.0.html +# +# The agreement for individuals can be filled out on the web. +# +# When adding J Random Contributor's name to this file, +# either J's name or J's organization's name should be +# added to the AUTHORS file, depending on whether the +# individual or corporate CLA was used. + +# Names should be added to this file like so: +# Name + +# Please keep the list sorted. + +Andrew Gerrand +Jeff R. Allen +Maksim Kochkin +Michael Fogleman +Nigel Tao +Rémy Oudompheng +Rob Pike +Roger Peppe +Russ Cox +Steven Edwards diff --git a/vendor/github.com/golang/freetype/LICENSE b/vendor/github.com/golang/freetype/LICENSE new file mode 100644 index 0000000..e854ba5 --- /dev/null +++ b/vendor/github.com/golang/freetype/LICENSE @@ -0,0 +1,12 @@ +Use of the Freetype-Go software is subject to your choice of exactly one of +the following two licenses: + * The FreeType License, which is similar to the original BSD license with + an advertising clause, or + * The GNU General Public License (GPL), version 2 or later. + +The text of these licenses are available in the licenses/ftl.txt and the +licenses/gpl.txt files respectively. They are also available at +http://freetype.sourceforge.net/license.html + +The Luxi fonts in the testdata directory are licensed separately. See the +testdata/COPYING file for details. diff --git a/vendor/github.com/golang/freetype/README b/vendor/github.com/golang/freetype/README new file mode 100644 index 0000000..39b3d82 --- /dev/null +++ b/vendor/github.com/golang/freetype/README @@ -0,0 +1,21 @@ +The Freetype font rasterizer in the Go programming language. + +To download and install from source: +$ go get github.com/golang/freetype + +It is an incomplete port: + * It only supports TrueType fonts, and not Type 1 fonts nor bitmap fonts. + * It only supports the Unicode encoding. + +There are also some implementation differences: + * It uses a 26.6 fixed point co-ordinate system everywhere internally, + as opposed to the original Freetype's mix of 26.6 (or 10.6 for 16-bit + systems) in some places, and 24.8 in the "smooth" rasterizer. + +Freetype-Go is derived from Freetype, which is written in C. Freetype is +copyright 1996-2010 David Turner, Robert Wilhelm, and Werner Lemberg. +Freetype-Go is copyright The Freetype-Go Authors, who are listed in the +AUTHORS file. + +Unless otherwise noted, the Freetype-Go source files are distributed +under the BSD-style license found in the LICENSE file. diff --git a/vendor/github.com/golang/freetype/freetype.go b/vendor/github.com/golang/freetype/freetype.go new file mode 100644 index 0000000..9603586 --- /dev/null +++ b/vendor/github.com/golang/freetype/freetype.go @@ -0,0 +1,341 @@ +// Copyright 2010 The Freetype-Go Authors. All rights reserved. +// Use of this source code is governed by your choice of either the +// FreeType License or the GNU General Public License version 2 (or +// any later version), both of which can be found in the LICENSE file. + +// The freetype package provides a convenient API to draw text onto an image. +// Use the freetype/raster and freetype/truetype packages for lower level +// control over rasterization and TrueType parsing. +package freetype // import "github.com/golang/freetype" + +import ( + "errors" + "image" + "image/draw" + + "github.com/golang/freetype/raster" + "github.com/golang/freetype/truetype" + "golang.org/x/image/font" + "golang.org/x/image/math/fixed" +) + +// These constants determine the size of the glyph cache. The cache is keyed +// primarily by the glyph index modulo nGlyphs, and secondarily by sub-pixel +// position for the mask image. Sub-pixel positions are quantized to +// nXFractions possible values in both the x and y directions. +const ( + nGlyphs = 256 + nXFractions = 4 + nYFractions = 1 +) + +// An entry in the glyph cache is keyed explicitly by the glyph index and +// implicitly by the quantized x and y fractional offset. It maps to a mask +// image and an offset. +type cacheEntry struct { + valid bool + glyph truetype.Index + advanceWidth fixed.Int26_6 + mask *image.Alpha + offset image.Point +} + +// ParseFont just calls the Parse function from the freetype/truetype package. +// It is provided here so that code that imports this package doesn't need +// to also include the freetype/truetype package. +func ParseFont(b []byte) (*truetype.Font, error) { + return truetype.Parse(b) +} + +// Pt converts from a co-ordinate pair measured in pixels to a fixed.Point26_6 +// co-ordinate pair measured in fixed.Int26_6 units. +func Pt(x, y int) fixed.Point26_6 { + return fixed.Point26_6{ + X: fixed.Int26_6(x << 6), + Y: fixed.Int26_6(y << 6), + } +} + +// A Context holds the state for drawing text in a given font and size. +type Context struct { + r *raster.Rasterizer + f *truetype.Font + glyphBuf truetype.GlyphBuf + // clip is the clip rectangle for drawing. + clip image.Rectangle + // dst and src are the destination and source images for drawing. + dst draw.Image + src image.Image + // fontSize and dpi are used to calculate scale. scale is the number of + // 26.6 fixed point units in 1 em. hinting is the hinting policy. + fontSize, dpi float64 + scale fixed.Int26_6 + hinting font.Hinting + // cache is the glyph cache. + cache [nGlyphs * nXFractions * nYFractions]cacheEntry +} + +// PointToFixed converts the given number of points (as in "a 12 point font") +// into a 26.6 fixed point number of pixels. +func (c *Context) PointToFixed(x float64) fixed.Int26_6 { + return fixed.Int26_6(x * float64(c.dpi) * (64.0 / 72.0)) +} + +// drawContour draws the given closed contour with the given offset. +func (c *Context) drawContour(ps []truetype.Point, dx, dy fixed.Int26_6) { + if len(ps) == 0 { + return + } + + // The low bit of each point's Flags value is whether the point is on the + // curve. Truetype fonts only have quadratic Bézier curves, not cubics. + // Thus, two consecutive off-curve points imply an on-curve point in the + // middle of those two. + // + // See http://chanae.walon.org/pub/ttf/ttf_glyphs.htm for more details. + + // ps[0] is a truetype.Point measured in FUnits and positive Y going + // upwards. start is the same thing measured in fixed point units and + // positive Y going downwards, and offset by (dx, dy). + start := fixed.Point26_6{ + X: dx + ps[0].X, + Y: dy - ps[0].Y, + } + others := []truetype.Point(nil) + if ps[0].Flags&0x01 != 0 { + others = ps[1:] + } else { + last := fixed.Point26_6{ + X: dx + ps[len(ps)-1].X, + Y: dy - ps[len(ps)-1].Y, + } + if ps[len(ps)-1].Flags&0x01 != 0 { + start = last + others = ps[:len(ps)-1] + } else { + start = fixed.Point26_6{ + X: (start.X + last.X) / 2, + Y: (start.Y + last.Y) / 2, + } + others = ps + } + } + c.r.Start(start) + q0, on0 := start, true + for _, p := range others { + q := fixed.Point26_6{ + X: dx + p.X, + Y: dy - p.Y, + } + on := p.Flags&0x01 != 0 + if on { + if on0 { + c.r.Add1(q) + } else { + c.r.Add2(q0, q) + } + } else { + if on0 { + // No-op. + } else { + mid := fixed.Point26_6{ + X: (q0.X + q.X) / 2, + Y: (q0.Y + q.Y) / 2, + } + c.r.Add2(q0, mid) + } + } + q0, on0 = q, on + } + // Close the curve. + if on0 { + c.r.Add1(start) + } else { + c.r.Add2(q0, start) + } +} + +// rasterize returns the advance width, glyph mask and integer-pixel offset +// to render the given glyph at the given sub-pixel offsets. +// The 26.6 fixed point arguments fx and fy must be in the range [0, 1). +func (c *Context) rasterize(glyph truetype.Index, fx, fy fixed.Int26_6) ( + fixed.Int26_6, *image.Alpha, image.Point, error) { + + if err := c.glyphBuf.Load(c.f, c.scale, glyph, c.hinting); err != nil { + return 0, nil, image.Point{}, err + } + // Calculate the integer-pixel bounds for the glyph. + xmin := int(fx+c.glyphBuf.Bounds.Min.X) >> 6 + ymin := int(fy-c.glyphBuf.Bounds.Max.Y) >> 6 + xmax := int(fx+c.glyphBuf.Bounds.Max.X+0x3f) >> 6 + ymax := int(fy-c.glyphBuf.Bounds.Min.Y+0x3f) >> 6 + if xmin > xmax || ymin > ymax { + return 0, nil, image.Point{}, errors.New("freetype: negative sized glyph") + } + // A TrueType's glyph's nodes can have negative co-ordinates, but the + // rasterizer clips anything left of x=0 or above y=0. xmin and ymin are + // the pixel offsets, based on the font's FUnit metrics, that let a + // negative co-ordinate in TrueType space be non-negative in rasterizer + // space. xmin and ymin are typically <= 0. + fx -= fixed.Int26_6(xmin << 6) + fy -= fixed.Int26_6(ymin << 6) + // Rasterize the glyph's vectors. + c.r.Clear() + e0 := 0 + for _, e1 := range c.glyphBuf.Ends { + c.drawContour(c.glyphBuf.Points[e0:e1], fx, fy) + e0 = e1 + } + a := image.NewAlpha(image.Rect(0, 0, xmax-xmin, ymax-ymin)) + c.r.Rasterize(raster.NewAlphaSrcPainter(a)) + return c.glyphBuf.AdvanceWidth, a, image.Point{xmin, ymin}, nil +} + +// glyph returns the advance width, glyph mask and integer-pixel offset to +// render the given glyph at the given sub-pixel point. It is a cache for the +// rasterize method. Unlike rasterize, p's co-ordinates do not have to be in +// the range [0, 1). +func (c *Context) glyph(glyph truetype.Index, p fixed.Point26_6) ( + fixed.Int26_6, *image.Alpha, image.Point, error) { + + // Split p.X and p.Y into their integer and fractional parts. + ix, fx := int(p.X>>6), p.X&0x3f + iy, fy := int(p.Y>>6), p.Y&0x3f + // Calculate the index t into the cache array. + tg := int(glyph) % nGlyphs + tx := int(fx) / (64 / nXFractions) + ty := int(fy) / (64 / nYFractions) + t := ((tg*nXFractions)+tx)*nYFractions + ty + // Check for a cache hit. + if e := c.cache[t]; e.valid && e.glyph == glyph { + return e.advanceWidth, e.mask, e.offset.Add(image.Point{ix, iy}), nil + } + // Rasterize the glyph and put the result into the cache. + advanceWidth, mask, offset, err := c.rasterize(glyph, fx, fy) + if err != nil { + return 0, nil, image.Point{}, err + } + c.cache[t] = cacheEntry{true, glyph, advanceWidth, mask, offset} + return advanceWidth, mask, offset.Add(image.Point{ix, iy}), nil +} + +// DrawString draws s at p and returns p advanced by the text extent. The text +// is placed so that the left edge of the em square of the first character of s +// and the baseline intersect at p. The majority of the affected pixels will be +// above and to the right of the point, but some may be below or to the left. +// For example, drawing a string that starts with a 'J' in an italic font may +// affect pixels below and left of the point. +// +// p is a fixed.Point26_6 and can therefore represent sub-pixel positions. +func (c *Context) DrawString(s string, p fixed.Point26_6) (fixed.Point26_6, error) { + if c.f == nil { + return fixed.Point26_6{}, errors.New("freetype: DrawText called with a nil font") + } + prev, hasPrev := truetype.Index(0), false + for _, rune := range s { + index := c.f.Index(rune) + if hasPrev { + kern := c.f.Kern(c.scale, prev, index) + if c.hinting != font.HintingNone { + kern = (kern + 32) &^ 63 + } + p.X += kern + } + advanceWidth, mask, offset, err := c.glyph(index, p) + if err != nil { + return fixed.Point26_6{}, err + } + p.X += advanceWidth + glyphRect := mask.Bounds().Add(offset) + dr := c.clip.Intersect(glyphRect) + if !dr.Empty() { + mp := image.Point{0, dr.Min.Y - glyphRect.Min.Y} + draw.DrawMask(c.dst, dr, c.src, image.ZP, mask, mp, draw.Over) + } + prev, hasPrev = index, true + } + return p, nil +} + +// recalc recalculates scale and bounds values from the font size, screen +// resolution and font metrics, and invalidates the glyph cache. +func (c *Context) recalc() { + c.scale = fixed.Int26_6(c.fontSize * c.dpi * (64.0 / 72.0)) + if c.f == nil { + c.r.SetBounds(0, 0) + } else { + // Set the rasterizer's bounds to be big enough to handle the largest glyph. + b := c.f.Bounds(c.scale) + xmin := +int(b.Min.X) >> 6 + ymin := -int(b.Max.Y) >> 6 + xmax := +int(b.Max.X+63) >> 6 + ymax := -int(b.Min.Y-63) >> 6 + c.r.SetBounds(xmax-xmin, ymax-ymin) + } + for i := range c.cache { + c.cache[i] = cacheEntry{} + } +} + +// SetDPI sets the screen resolution in dots per inch. +func (c *Context) SetDPI(dpi float64) { + if c.dpi == dpi { + return + } + c.dpi = dpi + c.recalc() +} + +// SetFont sets the font used to draw text. +func (c *Context) SetFont(f *truetype.Font) { + if c.f == f { + return + } + c.f = f + c.recalc() +} + +// SetFontSize sets the font size in points (as in "a 12 point font"). +func (c *Context) SetFontSize(fontSize float64) { + if c.fontSize == fontSize { + return + } + c.fontSize = fontSize + c.recalc() +} + +// SetHinting sets the hinting policy. +func (c *Context) SetHinting(hinting font.Hinting) { + c.hinting = hinting + for i := range c.cache { + c.cache[i] = cacheEntry{} + } +} + +// SetDst sets the destination image for draw operations. +func (c *Context) SetDst(dst draw.Image) { + c.dst = dst +} + +// SetSrc sets the source image for draw operations. This is typically an +// image.Uniform. +func (c *Context) SetSrc(src image.Image) { + c.src = src +} + +// SetClip sets the clip rectangle for drawing. +func (c *Context) SetClip(clip image.Rectangle) { + c.clip = clip +} + +// TODO(nigeltao): implement Context.SetGamma. + +// NewContext creates a new Context. +func NewContext() *Context { + return &Context{ + r: raster.NewRasterizer(0, 0), + fontSize: 12, + dpi: 72, + scale: 12 << 6, + } +} diff --git a/vendor/github.com/golang/freetype/raster/geom.go b/vendor/github.com/golang/freetype/raster/geom.go new file mode 100644 index 0000000..f3696ea --- /dev/null +++ b/vendor/github.com/golang/freetype/raster/geom.go @@ -0,0 +1,245 @@ +// Copyright 2010 The Freetype-Go Authors. All rights reserved. +// Use of this source code is governed by your choice of either the +// FreeType License or the GNU General Public License version 2 (or +// any later version), both of which can be found in the LICENSE file. + +package raster + +import ( + "fmt" + "math" + + "golang.org/x/image/math/fixed" +) + +// maxAbs returns the maximum of abs(a) and abs(b). +func maxAbs(a, b fixed.Int26_6) fixed.Int26_6 { + if a < 0 { + a = -a + } + if b < 0 { + b = -b + } + if a < b { + return b + } + return a +} + +// pNeg returns the vector -p, or equivalently p rotated by 180 degrees. +func pNeg(p fixed.Point26_6) fixed.Point26_6 { + return fixed.Point26_6{-p.X, -p.Y} +} + +// pDot returns the dot product p·q. +func pDot(p fixed.Point26_6, q fixed.Point26_6) fixed.Int52_12 { + px, py := int64(p.X), int64(p.Y) + qx, qy := int64(q.X), int64(q.Y) + return fixed.Int52_12(px*qx + py*qy) +} + +// pLen returns the length of the vector p. +func pLen(p fixed.Point26_6) fixed.Int26_6 { + // TODO(nigeltao): use fixed point math. + x := float64(p.X) + y := float64(p.Y) + return fixed.Int26_6(math.Sqrt(x*x + y*y)) +} + +// pNorm returns the vector p normalized to the given length, or zero if p is +// degenerate. +func pNorm(p fixed.Point26_6, length fixed.Int26_6) fixed.Point26_6 { + d := pLen(p) + if d == 0 { + return fixed.Point26_6{} + } + s, t := int64(length), int64(d) + x := int64(p.X) * s / t + y := int64(p.Y) * s / t + return fixed.Point26_6{fixed.Int26_6(x), fixed.Int26_6(y)} +} + +// pRot45CW returns the vector p rotated clockwise by 45 degrees. +// +// Note that the Y-axis grows downwards, so {1, 0}.Rot45CW is {1/√2, 1/√2}. +func pRot45CW(p fixed.Point26_6) fixed.Point26_6 { + // 181/256 is approximately 1/√2, or sin(π/4). + px, py := int64(p.X), int64(p.Y) + qx := (+px - py) * 181 / 256 + qy := (+px + py) * 181 / 256 + return fixed.Point26_6{fixed.Int26_6(qx), fixed.Int26_6(qy)} +} + +// pRot90CW returns the vector p rotated clockwise by 90 degrees. +// +// Note that the Y-axis grows downwards, so {1, 0}.Rot90CW is {0, 1}. +func pRot90CW(p fixed.Point26_6) fixed.Point26_6 { + return fixed.Point26_6{-p.Y, p.X} +} + +// pRot135CW returns the vector p rotated clockwise by 135 degrees. +// +// Note that the Y-axis grows downwards, so {1, 0}.Rot135CW is {-1/√2, 1/√2}. +func pRot135CW(p fixed.Point26_6) fixed.Point26_6 { + // 181/256 is approximately 1/√2, or sin(π/4). + px, py := int64(p.X), int64(p.Y) + qx := (-px - py) * 181 / 256 + qy := (+px - py) * 181 / 256 + return fixed.Point26_6{fixed.Int26_6(qx), fixed.Int26_6(qy)} +} + +// pRot45CCW returns the vector p rotated counter-clockwise by 45 degrees. +// +// Note that the Y-axis grows downwards, so {1, 0}.Rot45CCW is {1/√2, -1/√2}. +func pRot45CCW(p fixed.Point26_6) fixed.Point26_6 { + // 181/256 is approximately 1/√2, or sin(π/4). + px, py := int64(p.X), int64(p.Y) + qx := (+px + py) * 181 / 256 + qy := (-px + py) * 181 / 256 + return fixed.Point26_6{fixed.Int26_6(qx), fixed.Int26_6(qy)} +} + +// pRot90CCW returns the vector p rotated counter-clockwise by 90 degrees. +// +// Note that the Y-axis grows downwards, so {1, 0}.Rot90CCW is {0, -1}. +func pRot90CCW(p fixed.Point26_6) fixed.Point26_6 { + return fixed.Point26_6{p.Y, -p.X} +} + +// pRot135CCW returns the vector p rotated counter-clockwise by 135 degrees. +// +// Note that the Y-axis grows downwards, so {1, 0}.Rot135CCW is {-1/√2, -1/√2}. +func pRot135CCW(p fixed.Point26_6) fixed.Point26_6 { + // 181/256 is approximately 1/√2, or sin(π/4). + px, py := int64(p.X), int64(p.Y) + qx := (-px + py) * 181 / 256 + qy := (-px - py) * 181 / 256 + return fixed.Point26_6{fixed.Int26_6(qx), fixed.Int26_6(qy)} +} + +// An Adder accumulates points on a curve. +type Adder interface { + // Start starts a new curve at the given point. + Start(a fixed.Point26_6) + // Add1 adds a linear segment to the current curve. + Add1(b fixed.Point26_6) + // Add2 adds a quadratic segment to the current curve. + Add2(b, c fixed.Point26_6) + // Add3 adds a cubic segment to the current curve. + Add3(b, c, d fixed.Point26_6) +} + +// A Path is a sequence of curves, and a curve is a start point followed by a +// sequence of linear, quadratic or cubic segments. +type Path []fixed.Int26_6 + +// String returns a human-readable representation of a Path. +func (p Path) String() string { + s := "" + for i := 0; i < len(p); { + if i != 0 { + s += " " + } + switch p[i] { + case 0: + s += "S0" + fmt.Sprint([]fixed.Int26_6(p[i+1:i+3])) + i += 4 + case 1: + s += "A1" + fmt.Sprint([]fixed.Int26_6(p[i+1:i+3])) + i += 4 + case 2: + s += "A2" + fmt.Sprint([]fixed.Int26_6(p[i+1:i+5])) + i += 6 + case 3: + s += "A3" + fmt.Sprint([]fixed.Int26_6(p[i+1:i+7])) + i += 8 + default: + panic("freetype/raster: bad path") + } + } + return s +} + +// Clear cancels any previous calls to p.Start or p.AddXxx. +func (p *Path) Clear() { + *p = (*p)[:0] +} + +// Start starts a new curve at the given point. +func (p *Path) Start(a fixed.Point26_6) { + *p = append(*p, 0, a.X, a.Y, 0) +} + +// Add1 adds a linear segment to the current curve. +func (p *Path) Add1(b fixed.Point26_6) { + *p = append(*p, 1, b.X, b.Y, 1) +} + +// Add2 adds a quadratic segment to the current curve. +func (p *Path) Add2(b, c fixed.Point26_6) { + *p = append(*p, 2, b.X, b.Y, c.X, c.Y, 2) +} + +// Add3 adds a cubic segment to the current curve. +func (p *Path) Add3(b, c, d fixed.Point26_6) { + *p = append(*p, 3, b.X, b.Y, c.X, c.Y, d.X, d.Y, 3) +} + +// AddPath adds the Path q to p. +func (p *Path) AddPath(q Path) { + *p = append(*p, q...) +} + +// AddStroke adds a stroked Path. +func (p *Path) AddStroke(q Path, width fixed.Int26_6, cr Capper, jr Joiner) { + Stroke(p, q, width, cr, jr) +} + +// firstPoint returns the first point in a non-empty Path. +func (p Path) firstPoint() fixed.Point26_6 { + return fixed.Point26_6{p[1], p[2]} +} + +// lastPoint returns the last point in a non-empty Path. +func (p Path) lastPoint() fixed.Point26_6 { + return fixed.Point26_6{p[len(p)-3], p[len(p)-2]} +} + +// addPathReversed adds q reversed to p. +// For example, if q consists of a linear segment from A to B followed by a +// quadratic segment from B to C to D, then the values of q looks like: +// index: 01234567890123 +// value: 0AA01BB12CCDD2 +// So, when adding q backwards to p, we want to Add2(C, B) followed by Add1(A). +func addPathReversed(p Adder, q Path) { + if len(q) == 0 { + return + } + i := len(q) - 1 + for { + switch q[i] { + case 0: + return + case 1: + i -= 4 + p.Add1( + fixed.Point26_6{q[i-2], q[i-1]}, + ) + case 2: + i -= 6 + p.Add2( + fixed.Point26_6{q[i+2], q[i+3]}, + fixed.Point26_6{q[i-2], q[i-1]}, + ) + case 3: + i -= 8 + p.Add3( + fixed.Point26_6{q[i+4], q[i+5]}, + fixed.Point26_6{q[i+2], q[i+3]}, + fixed.Point26_6{q[i-2], q[i-1]}, + ) + default: + panic("freetype/raster: bad path") + } + } +} diff --git a/vendor/github.com/golang/freetype/raster/paint.go b/vendor/github.com/golang/freetype/raster/paint.go new file mode 100644 index 0000000..652256c --- /dev/null +++ b/vendor/github.com/golang/freetype/raster/paint.go @@ -0,0 +1,287 @@ +// Copyright 2010 The Freetype-Go Authors. All rights reserved. +// Use of this source code is governed by your choice of either the +// FreeType License or the GNU General Public License version 2 (or +// any later version), both of which can be found in the LICENSE file. + +package raster + +import ( + "image" + "image/color" + "image/draw" + "math" +) + +// A Span is a horizontal segment of pixels with constant alpha. X0 is an +// inclusive bound and X1 is exclusive, the same as for slices. A fully opaque +// Span has Alpha == 0xffff. +type Span struct { + Y, X0, X1 int + Alpha uint32 +} + +// A Painter knows how to paint a batch of Spans. Rasterization may involve +// Painting multiple batches, and done will be true for the final batch. The +// Spans' Y values are monotonically increasing during a rasterization. Paint +// may use all of ss as scratch space during the call. +type Painter interface { + Paint(ss []Span, done bool) +} + +// The PainterFunc type adapts an ordinary function to the Painter interface. +type PainterFunc func(ss []Span, done bool) + +// Paint just delegates the call to f. +func (f PainterFunc) Paint(ss []Span, done bool) { f(ss, done) } + +// An AlphaOverPainter is a Painter that paints Spans onto a *image.Alpha using +// the Over Porter-Duff composition operator. +type AlphaOverPainter struct { + Image *image.Alpha +} + +// Paint satisfies the Painter interface. +func (r AlphaOverPainter) Paint(ss []Span, done bool) { + b := r.Image.Bounds() + for _, s := range ss { + if s.Y < b.Min.Y { + continue + } + if s.Y >= b.Max.Y { + return + } + if s.X0 < b.Min.X { + s.X0 = b.Min.X + } + if s.X1 > b.Max.X { + s.X1 = b.Max.X + } + if s.X0 >= s.X1 { + continue + } + base := (s.Y-r.Image.Rect.Min.Y)*r.Image.Stride - r.Image.Rect.Min.X + p := r.Image.Pix[base+s.X0 : base+s.X1] + a := int(s.Alpha >> 8) + for i, c := range p { + v := int(c) + p[i] = uint8((v*255 + (255-v)*a) / 255) + } + } +} + +// NewAlphaOverPainter creates a new AlphaOverPainter for the given image. +func NewAlphaOverPainter(m *image.Alpha) AlphaOverPainter { + return AlphaOverPainter{m} +} + +// An AlphaSrcPainter is a Painter that paints Spans onto a *image.Alpha using +// the Src Porter-Duff composition operator. +type AlphaSrcPainter struct { + Image *image.Alpha +} + +// Paint satisfies the Painter interface. +func (r AlphaSrcPainter) Paint(ss []Span, done bool) { + b := r.Image.Bounds() + for _, s := range ss { + if s.Y < b.Min.Y { + continue + } + if s.Y >= b.Max.Y { + return + } + if s.X0 < b.Min.X { + s.X0 = b.Min.X + } + if s.X1 > b.Max.X { + s.X1 = b.Max.X + } + if s.X0 >= s.X1 { + continue + } + base := (s.Y-r.Image.Rect.Min.Y)*r.Image.Stride - r.Image.Rect.Min.X + p := r.Image.Pix[base+s.X0 : base+s.X1] + color := uint8(s.Alpha >> 8) + for i := range p { + p[i] = color + } + } +} + +// NewAlphaSrcPainter creates a new AlphaSrcPainter for the given image. +func NewAlphaSrcPainter(m *image.Alpha) AlphaSrcPainter { + return AlphaSrcPainter{m} +} + +// An RGBAPainter is a Painter that paints Spans onto a *image.RGBA. +type RGBAPainter struct { + // Image is the image to compose onto. + Image *image.RGBA + // Op is the Porter-Duff composition operator. + Op draw.Op + // cr, cg, cb and ca are the 16-bit color to paint the spans. + cr, cg, cb, ca uint32 +} + +// Paint satisfies the Painter interface. +func (r *RGBAPainter) Paint(ss []Span, done bool) { + b := r.Image.Bounds() + for _, s := range ss { + if s.Y < b.Min.Y { + continue + } + if s.Y >= b.Max.Y { + return + } + if s.X0 < b.Min.X { + s.X0 = b.Min.X + } + if s.X1 > b.Max.X { + s.X1 = b.Max.X + } + if s.X0 >= s.X1 { + continue + } + // This code mimics drawGlyphOver in $GOROOT/src/image/draw/draw.go. + ma := s.Alpha + const m = 1<<16 - 1 + i0 := (s.Y-r.Image.Rect.Min.Y)*r.Image.Stride + (s.X0-r.Image.Rect.Min.X)*4 + i1 := i0 + (s.X1-s.X0)*4 + if r.Op == draw.Over { + for i := i0; i < i1; i += 4 { + dr := uint32(r.Image.Pix[i+0]) + dg := uint32(r.Image.Pix[i+1]) + db := uint32(r.Image.Pix[i+2]) + da := uint32(r.Image.Pix[i+3]) + a := (m - (r.ca * ma / m)) * 0x101 + r.Image.Pix[i+0] = uint8((dr*a + r.cr*ma) / m >> 8) + r.Image.Pix[i+1] = uint8((dg*a + r.cg*ma) / m >> 8) + r.Image.Pix[i+2] = uint8((db*a + r.cb*ma) / m >> 8) + r.Image.Pix[i+3] = uint8((da*a + r.ca*ma) / m >> 8) + } + } else { + for i := i0; i < i1; i += 4 { + r.Image.Pix[i+0] = uint8(r.cr * ma / m >> 8) + r.Image.Pix[i+1] = uint8(r.cg * ma / m >> 8) + r.Image.Pix[i+2] = uint8(r.cb * ma / m >> 8) + r.Image.Pix[i+3] = uint8(r.ca * ma / m >> 8) + } + } + } +} + +// SetColor sets the color to paint the spans. +func (r *RGBAPainter) SetColor(c color.Color) { + r.cr, r.cg, r.cb, r.ca = c.RGBA() +} + +// NewRGBAPainter creates a new RGBAPainter for the given image. +func NewRGBAPainter(m *image.RGBA) *RGBAPainter { + return &RGBAPainter{Image: m} +} + +// A MonochromePainter wraps another Painter, quantizing each Span's alpha to +// be either fully opaque or fully transparent. +type MonochromePainter struct { + Painter Painter + y, x0, x1 int +} + +// Paint delegates to the wrapped Painter after quantizing each Span's alpha +// value and merging adjacent fully opaque Spans. +func (m *MonochromePainter) Paint(ss []Span, done bool) { + // We compact the ss slice, discarding any Spans whose alpha quantizes to zero. + j := 0 + for _, s := range ss { + if s.Alpha >= 0x8000 { + if m.y == s.Y && m.x1 == s.X0 { + m.x1 = s.X1 + } else { + ss[j] = Span{m.y, m.x0, m.x1, 1<<16 - 1} + j++ + m.y, m.x0, m.x1 = s.Y, s.X0, s.X1 + } + } + } + if done { + // Flush the accumulated Span. + finalSpan := Span{m.y, m.x0, m.x1, 1<<16 - 1} + if j < len(ss) { + ss[j] = finalSpan + j++ + m.Painter.Paint(ss[:j], true) + } else if j == len(ss) { + m.Painter.Paint(ss, false) + if cap(ss) > 0 { + ss = ss[:1] + } else { + ss = make([]Span, 1) + } + ss[0] = finalSpan + m.Painter.Paint(ss, true) + } else { + panic("unreachable") + } + // Reset the accumulator, so that this Painter can be re-used. + m.y, m.x0, m.x1 = 0, 0, 0 + } else { + m.Painter.Paint(ss[:j], false) + } +} + +// NewMonochromePainter creates a new MonochromePainter that wraps the given +// Painter. +func NewMonochromePainter(p Painter) *MonochromePainter { + return &MonochromePainter{Painter: p} +} + +// A GammaCorrectionPainter wraps another Painter, performing gamma-correction +// on each Span's alpha value. +type GammaCorrectionPainter struct { + // Painter is the wrapped Painter. + Painter Painter + // a is the precomputed alpha values for linear interpolation, with fully + // opaque == 0xffff. + a [256]uint16 + // gammaIsOne is whether gamma correction is a no-op. + gammaIsOne bool +} + +// Paint delegates to the wrapped Painter after performing gamma-correction on +// each Span. +func (g *GammaCorrectionPainter) Paint(ss []Span, done bool) { + if !g.gammaIsOne { + const n = 0x101 + for i, s := range ss { + if s.Alpha == 0 || s.Alpha == 0xffff { + continue + } + p, q := s.Alpha/n, s.Alpha%n + // The resultant alpha is a linear interpolation of g.a[p] and g.a[p+1]. + a := uint32(g.a[p])*(n-q) + uint32(g.a[p+1])*q + ss[i].Alpha = (a + n/2) / n + } + } + g.Painter.Paint(ss, done) +} + +// SetGamma sets the gamma value. +func (g *GammaCorrectionPainter) SetGamma(gamma float64) { + g.gammaIsOne = gamma == 1 + if g.gammaIsOne { + return + } + for i := 0; i < 256; i++ { + a := float64(i) / 0xff + a = math.Pow(a, gamma) + g.a[i] = uint16(0xffff * a) + } +} + +// NewGammaCorrectionPainter creates a new GammaCorrectionPainter that wraps +// the given Painter. +func NewGammaCorrectionPainter(p Painter, gamma float64) *GammaCorrectionPainter { + g := &GammaCorrectionPainter{Painter: p} + g.SetGamma(gamma) + return g +} diff --git a/vendor/github.com/golang/freetype/raster/raster.go b/vendor/github.com/golang/freetype/raster/raster.go new file mode 100644 index 0000000..7e6cd4e --- /dev/null +++ b/vendor/github.com/golang/freetype/raster/raster.go @@ -0,0 +1,601 @@ +// Copyright 2010 The Freetype-Go Authors. All rights reserved. +// Use of this source code is governed by your choice of either the +// FreeType License or the GNU General Public License version 2 (or +// any later version), both of which can be found in the LICENSE file. + +// Package raster provides an anti-aliasing 2-D rasterizer. +// +// It is part of the larger Freetype suite of font-related packages, but the +// raster package is not specific to font rasterization, and can be used +// standalone without any other Freetype package. +// +// Rasterization is done by the same area/coverage accumulation algorithm as +// the Freetype "smooth" module, and the Anti-Grain Geometry library. A +// description of the area/coverage algorithm is at +// http://projects.tuxee.net/cl-vectors/section-the-cl-aa-algorithm +package raster // import "github.com/golang/freetype/raster" + +import ( + "strconv" + + "golang.org/x/image/math/fixed" +) + +// A cell is part of a linked list (for a given yi co-ordinate) of accumulated +// area/coverage for the pixel at (xi, yi). +type cell struct { + xi int + area, cover int + next int +} + +type Rasterizer struct { + // If false, the default behavior is to use the even-odd winding fill + // rule during Rasterize. + UseNonZeroWinding bool + // An offset (in pixels) to the painted spans. + Dx, Dy int + + // The width of the Rasterizer. The height is implicit in len(cellIndex). + width int + // splitScaleN is the scaling factor used to determine how many times + // to decompose a quadratic or cubic segment into a linear approximation. + splitScale2, splitScale3 int + + // The current pen position. + a fixed.Point26_6 + // The current cell and its area/coverage being accumulated. + xi, yi int + area, cover int + + // Saved cells. + cell []cell + // Linked list of cells, one per row. + cellIndex []int + // Buffers. + cellBuf [256]cell + cellIndexBuf [64]int + spanBuf [64]Span +} + +// findCell returns the index in r.cell for the cell corresponding to +// (r.xi, r.yi). The cell is created if necessary. +func (r *Rasterizer) findCell() int { + if r.yi < 0 || r.yi >= len(r.cellIndex) { + return -1 + } + xi := r.xi + if xi < 0 { + xi = -1 + } else if xi > r.width { + xi = r.width + } + i, prev := r.cellIndex[r.yi], -1 + for i != -1 && r.cell[i].xi <= xi { + if r.cell[i].xi == xi { + return i + } + i, prev = r.cell[i].next, i + } + c := len(r.cell) + if c == cap(r.cell) { + buf := make([]cell, c, 4*c) + copy(buf, r.cell) + r.cell = buf[0 : c+1] + } else { + r.cell = r.cell[0 : c+1] + } + r.cell[c] = cell{xi, 0, 0, i} + if prev == -1 { + r.cellIndex[r.yi] = c + } else { + r.cell[prev].next = c + } + return c +} + +// saveCell saves any accumulated r.area/r.cover for (r.xi, r.yi). +func (r *Rasterizer) saveCell() { + if r.area != 0 || r.cover != 0 { + i := r.findCell() + if i != -1 { + r.cell[i].area += r.area + r.cell[i].cover += r.cover + } + r.area = 0 + r.cover = 0 + } +} + +// setCell sets the (xi, yi) cell that r is accumulating area/coverage for. +func (r *Rasterizer) setCell(xi, yi int) { + if r.xi != xi || r.yi != yi { + r.saveCell() + r.xi, r.yi = xi, yi + } +} + +// scan accumulates area/coverage for the yi'th scanline, going from +// x0 to x1 in the horizontal direction (in 26.6 fixed point co-ordinates) +// and from y0f to y1f fractional vertical units within that scanline. +func (r *Rasterizer) scan(yi int, x0, y0f, x1, y1f fixed.Int26_6) { + // Break the 26.6 fixed point X co-ordinates into integral and fractional parts. + x0i := int(x0) / 64 + x0f := x0 - fixed.Int26_6(64*x0i) + x1i := int(x1) / 64 + x1f := x1 - fixed.Int26_6(64*x1i) + + // A perfectly horizontal scan. + if y0f == y1f { + r.setCell(x1i, yi) + return + } + dx, dy := x1-x0, y1f-y0f + // A single cell scan. + if x0i == x1i { + r.area += int((x0f + x1f) * dy) + r.cover += int(dy) + return + } + // There are at least two cells. Apart from the first and last cells, + // all intermediate cells go through the full width of the cell, + // or 64 units in 26.6 fixed point format. + var ( + p, q, edge0, edge1 fixed.Int26_6 + xiDelta int + ) + if dx > 0 { + p, q = (64-x0f)*dy, dx + edge0, edge1, xiDelta = 0, 64, 1 + } else { + p, q = x0f*dy, -dx + edge0, edge1, xiDelta = 64, 0, -1 + } + yDelta, yRem := p/q, p%q + if yRem < 0 { + yDelta -= 1 + yRem += q + } + // Do the first cell. + xi, y := x0i, y0f + r.area += int((x0f + edge1) * yDelta) + r.cover += int(yDelta) + xi, y = xi+xiDelta, y+yDelta + r.setCell(xi, yi) + if xi != x1i { + // Do all the intermediate cells. + p = 64 * (y1f - y + yDelta) + fullDelta, fullRem := p/q, p%q + if fullRem < 0 { + fullDelta -= 1 + fullRem += q + } + yRem -= q + for xi != x1i { + yDelta = fullDelta + yRem += fullRem + if yRem >= 0 { + yDelta += 1 + yRem -= q + } + r.area += int(64 * yDelta) + r.cover += int(yDelta) + xi, y = xi+xiDelta, y+yDelta + r.setCell(xi, yi) + } + } + // Do the last cell. + yDelta = y1f - y + r.area += int((edge0 + x1f) * yDelta) + r.cover += int(yDelta) +} + +// Start starts a new curve at the given point. +func (r *Rasterizer) Start(a fixed.Point26_6) { + r.setCell(int(a.X/64), int(a.Y/64)) + r.a = a +} + +// Add1 adds a linear segment to the current curve. +func (r *Rasterizer) Add1(b fixed.Point26_6) { + x0, y0 := r.a.X, r.a.Y + x1, y1 := b.X, b.Y + dx, dy := x1-x0, y1-y0 + // Break the 26.6 fixed point Y co-ordinates into integral and fractional + // parts. + y0i := int(y0) / 64 + y0f := y0 - fixed.Int26_6(64*y0i) + y1i := int(y1) / 64 + y1f := y1 - fixed.Int26_6(64*y1i) + + if y0i == y1i { + // There is only one scanline. + r.scan(y0i, x0, y0f, x1, y1f) + + } else if dx == 0 { + // This is a vertical line segment. We avoid calling r.scan and instead + // manipulate r.area and r.cover directly. + var ( + edge0, edge1 fixed.Int26_6 + yiDelta int + ) + if dy > 0 { + edge0, edge1, yiDelta = 0, 64, 1 + } else { + edge0, edge1, yiDelta = 64, 0, -1 + } + x0i, yi := int(x0)/64, y0i + x0fTimes2 := (int(x0) - (64 * x0i)) * 2 + // Do the first pixel. + dcover := int(edge1 - y0f) + darea := int(x0fTimes2 * dcover) + r.area += darea + r.cover += dcover + yi += yiDelta + r.setCell(x0i, yi) + // Do all the intermediate pixels. + dcover = int(edge1 - edge0) + darea = int(x0fTimes2 * dcover) + for yi != y1i { + r.area += darea + r.cover += dcover + yi += yiDelta + r.setCell(x0i, yi) + } + // Do the last pixel. + dcover = int(y1f - edge0) + darea = int(x0fTimes2 * dcover) + r.area += darea + r.cover += dcover + + } else { + // There are at least two scanlines. Apart from the first and last + // scanlines, all intermediate scanlines go through the full height of + // the row, or 64 units in 26.6 fixed point format. + var ( + p, q, edge0, edge1 fixed.Int26_6 + yiDelta int + ) + if dy > 0 { + p, q = (64-y0f)*dx, dy + edge0, edge1, yiDelta = 0, 64, 1 + } else { + p, q = y0f*dx, -dy + edge0, edge1, yiDelta = 64, 0, -1 + } + xDelta, xRem := p/q, p%q + if xRem < 0 { + xDelta -= 1 + xRem += q + } + // Do the first scanline. + x, yi := x0, y0i + r.scan(yi, x, y0f, x+xDelta, edge1) + x, yi = x+xDelta, yi+yiDelta + r.setCell(int(x)/64, yi) + if yi != y1i { + // Do all the intermediate scanlines. + p = 64 * dx + fullDelta, fullRem := p/q, p%q + if fullRem < 0 { + fullDelta -= 1 + fullRem += q + } + xRem -= q + for yi != y1i { + xDelta = fullDelta + xRem += fullRem + if xRem >= 0 { + xDelta += 1 + xRem -= q + } + r.scan(yi, x, edge0, x+xDelta, edge1) + x, yi = x+xDelta, yi+yiDelta + r.setCell(int(x)/64, yi) + } + } + // Do the last scanline. + r.scan(yi, x, edge0, x1, y1f) + } + // The next lineTo starts from b. + r.a = b +} + +// Add2 adds a quadratic segment to the current curve. +func (r *Rasterizer) Add2(b, c fixed.Point26_6) { + // Calculate nSplit (the number of recursive decompositions) based on how + // 'curvy' it is. Specifically, how much the middle point b deviates from + // (a+c)/2. + dev := maxAbs(r.a.X-2*b.X+c.X, r.a.Y-2*b.Y+c.Y) / fixed.Int26_6(r.splitScale2) + nsplit := 0 + for dev > 0 { + dev /= 4 + nsplit++ + } + // dev is 32-bit, and nsplit++ every time we shift off 2 bits, so maxNsplit + // is 16. + const maxNsplit = 16 + if nsplit > maxNsplit { + panic("freetype/raster: Add2 nsplit too large: " + strconv.Itoa(nsplit)) + } + // Recursively decompose the curve nSplit levels deep. + var ( + pStack [2*maxNsplit + 3]fixed.Point26_6 + sStack [maxNsplit + 1]int + i int + ) + sStack[0] = nsplit + pStack[0] = c + pStack[1] = b + pStack[2] = r.a + for i >= 0 { + s := sStack[i] + p := pStack[2*i:] + if s > 0 { + // Split the quadratic curve p[:3] into an equivalent set of two + // shorter curves: p[:3] and p[2:5]. The new p[4] is the old p[2], + // and p[0] is unchanged. + mx := p[1].X + p[4].X = p[2].X + p[3].X = (p[4].X + mx) / 2 + p[1].X = (p[0].X + mx) / 2 + p[2].X = (p[1].X + p[3].X) / 2 + my := p[1].Y + p[4].Y = p[2].Y + p[3].Y = (p[4].Y + my) / 2 + p[1].Y = (p[0].Y + my) / 2 + p[2].Y = (p[1].Y + p[3].Y) / 2 + // The two shorter curves have one less split to do. + sStack[i] = s - 1 + sStack[i+1] = s - 1 + i++ + } else { + // Replace the level-0 quadratic with a two-linear-piece + // approximation. + midx := (p[0].X + 2*p[1].X + p[2].X) / 4 + midy := (p[0].Y + 2*p[1].Y + p[2].Y) / 4 + r.Add1(fixed.Point26_6{midx, midy}) + r.Add1(p[0]) + i-- + } + } +} + +// Add3 adds a cubic segment to the current curve. +func (r *Rasterizer) Add3(b, c, d fixed.Point26_6) { + // Calculate nSplit (the number of recursive decompositions) based on how + // 'curvy' it is. + dev2 := maxAbs(r.a.X-3*(b.X+c.X)+d.X, r.a.Y-3*(b.Y+c.Y)+d.Y) / fixed.Int26_6(r.splitScale2) + dev3 := maxAbs(r.a.X-2*b.X+d.X, r.a.Y-2*b.Y+d.Y) / fixed.Int26_6(r.splitScale3) + nsplit := 0 + for dev2 > 0 || dev3 > 0 { + dev2 /= 8 + dev3 /= 4 + nsplit++ + } + // devN is 32-bit, and nsplit++ every time we shift off 2 bits, so + // maxNsplit is 16. + const maxNsplit = 16 + if nsplit > maxNsplit { + panic("freetype/raster: Add3 nsplit too large: " + strconv.Itoa(nsplit)) + } + // Recursively decompose the curve nSplit levels deep. + var ( + pStack [3*maxNsplit + 4]fixed.Point26_6 + sStack [maxNsplit + 1]int + i int + ) + sStack[0] = nsplit + pStack[0] = d + pStack[1] = c + pStack[2] = b + pStack[3] = r.a + for i >= 0 { + s := sStack[i] + p := pStack[3*i:] + if s > 0 { + // Split the cubic curve p[:4] into an equivalent set of two + // shorter curves: p[:4] and p[3:7]. The new p[6] is the old p[3], + // and p[0] is unchanged. + m01x := (p[0].X + p[1].X) / 2 + m12x := (p[1].X + p[2].X) / 2 + m23x := (p[2].X + p[3].X) / 2 + p[6].X = p[3].X + p[5].X = m23x + p[1].X = m01x + p[2].X = (m01x + m12x) / 2 + p[4].X = (m12x + m23x) / 2 + p[3].X = (p[2].X + p[4].X) / 2 + m01y := (p[0].Y + p[1].Y) / 2 + m12y := (p[1].Y + p[2].Y) / 2 + m23y := (p[2].Y + p[3].Y) / 2 + p[6].Y = p[3].Y + p[5].Y = m23y + p[1].Y = m01y + p[2].Y = (m01y + m12y) / 2 + p[4].Y = (m12y + m23y) / 2 + p[3].Y = (p[2].Y + p[4].Y) / 2 + // The two shorter curves have one less split to do. + sStack[i] = s - 1 + sStack[i+1] = s - 1 + i++ + } else { + // Replace the level-0 cubic with a two-linear-piece approximation. + midx := (p[0].X + 3*(p[1].X+p[2].X) + p[3].X) / 8 + midy := (p[0].Y + 3*(p[1].Y+p[2].Y) + p[3].Y) / 8 + r.Add1(fixed.Point26_6{midx, midy}) + r.Add1(p[0]) + i-- + } + } +} + +// AddPath adds the given Path. +func (r *Rasterizer) AddPath(p Path) { + for i := 0; i < len(p); { + switch p[i] { + case 0: + r.Start( + fixed.Point26_6{p[i+1], p[i+2]}, + ) + i += 4 + case 1: + r.Add1( + fixed.Point26_6{p[i+1], p[i+2]}, + ) + i += 4 + case 2: + r.Add2( + fixed.Point26_6{p[i+1], p[i+2]}, + fixed.Point26_6{p[i+3], p[i+4]}, + ) + i += 6 + case 3: + r.Add3( + fixed.Point26_6{p[i+1], p[i+2]}, + fixed.Point26_6{p[i+3], p[i+4]}, + fixed.Point26_6{p[i+5], p[i+6]}, + ) + i += 8 + default: + panic("freetype/raster: bad path") + } + } +} + +// AddStroke adds a stroked Path. +func (r *Rasterizer) AddStroke(q Path, width fixed.Int26_6, cr Capper, jr Joiner) { + Stroke(r, q, width, cr, jr) +} + +// areaToAlpha converts an area value to a uint32 alpha value. A completely +// filled pixel corresponds to an area of 64*64*2, and an alpha of 0xffff. The +// conversion of area values greater than this depends on the winding rule: +// even-odd or non-zero. +func (r *Rasterizer) areaToAlpha(area int) uint32 { + // The C Freetype implementation (version 2.3.12) does "alpha := area>>1" + // without the +1. Round-to-nearest gives a more symmetric result than + // round-down. The C implementation also returns 8-bit alpha, not 16-bit + // alpha. + a := (area + 1) >> 1 + if a < 0 { + a = -a + } + alpha := uint32(a) + if r.UseNonZeroWinding { + if alpha > 0x0fff { + alpha = 0x0fff + } + } else { + alpha &= 0x1fff + if alpha > 0x1000 { + alpha = 0x2000 - alpha + } else if alpha == 0x1000 { + alpha = 0x0fff + } + } + // alpha is now in the range [0x0000, 0x0fff]. Convert that 12-bit alpha to + // 16-bit alpha. + return alpha<<4 | alpha>>8 +} + +// Rasterize converts r's accumulated curves into Spans for p. The Spans passed +// to p are non-overlapping, and sorted by Y and then X. They all have non-zero +// width (and 0 <= X0 < X1 <= r.width) and non-zero A, except for the final +// Span, which has Y, X0, X1 and A all equal to zero. +func (r *Rasterizer) Rasterize(p Painter) { + r.saveCell() + s := 0 + for yi := 0; yi < len(r.cellIndex); yi++ { + xi, cover := 0, 0 + for c := r.cellIndex[yi]; c != -1; c = r.cell[c].next { + if cover != 0 && r.cell[c].xi > xi { + alpha := r.areaToAlpha(cover * 64 * 2) + if alpha != 0 { + xi0, xi1 := xi, r.cell[c].xi + if xi0 < 0 { + xi0 = 0 + } + if xi1 >= r.width { + xi1 = r.width + } + if xi0 < xi1 { + r.spanBuf[s] = Span{yi + r.Dy, xi0 + r.Dx, xi1 + r.Dx, alpha} + s++ + } + } + } + cover += r.cell[c].cover + alpha := r.areaToAlpha(cover*64*2 - r.cell[c].area) + xi = r.cell[c].xi + 1 + if alpha != 0 { + xi0, xi1 := r.cell[c].xi, xi + if xi0 < 0 { + xi0 = 0 + } + if xi1 >= r.width { + xi1 = r.width + } + if xi0 < xi1 { + r.spanBuf[s] = Span{yi + r.Dy, xi0 + r.Dx, xi1 + r.Dx, alpha} + s++ + } + } + if s > len(r.spanBuf)-2 { + p.Paint(r.spanBuf[:s], false) + s = 0 + } + } + } + p.Paint(r.spanBuf[:s], true) +} + +// Clear cancels any previous calls to r.Start or r.AddXxx. +func (r *Rasterizer) Clear() { + r.a = fixed.Point26_6{} + r.xi = 0 + r.yi = 0 + r.area = 0 + r.cover = 0 + r.cell = r.cell[:0] + for i := 0; i < len(r.cellIndex); i++ { + r.cellIndex[i] = -1 + } +} + +// SetBounds sets the maximum width and height of the rasterized image and +// calls Clear. The width and height are in pixels, not fixed.Int26_6 units. +func (r *Rasterizer) SetBounds(width, height int) { + if width < 0 { + width = 0 + } + if height < 0 { + height = 0 + } + // Use the same ssN heuristic as the C Freetype (version 2.4.0) + // implementation. + ss2, ss3 := 32, 16 + if width > 24 || height > 24 { + ss2, ss3 = 2*ss2, 2*ss3 + if width > 120 || height > 120 { + ss2, ss3 = 2*ss2, 2*ss3 + } + } + r.width = width + r.splitScale2 = ss2 + r.splitScale3 = ss3 + r.cell = r.cellBuf[:0] + if height > len(r.cellIndexBuf) { + r.cellIndex = make([]int, height) + } else { + r.cellIndex = r.cellIndexBuf[:height] + } + r.Clear() +} + +// NewRasterizer creates a new Rasterizer with the given bounds. +func NewRasterizer(width, height int) *Rasterizer { + r := new(Rasterizer) + r.SetBounds(width, height) + return r +} diff --git a/vendor/github.com/golang/freetype/raster/stroke.go b/vendor/github.com/golang/freetype/raster/stroke.go new file mode 100644 index 0000000..bcc66b2 --- /dev/null +++ b/vendor/github.com/golang/freetype/raster/stroke.go @@ -0,0 +1,483 @@ +// Copyright 2010 The Freetype-Go Authors. All rights reserved. +// Use of this source code is governed by your choice of either the +// FreeType License or the GNU General Public License version 2 (or +// any later version), both of which can be found in the LICENSE file. + +package raster + +import ( + "golang.org/x/image/math/fixed" +) + +// Two points are considered practically equal if the square of the distance +// between them is less than one quarter (i.e. 1024 / 4096). +const epsilon = fixed.Int52_12(1024) + +// A Capper signifies how to begin or end a stroked path. +type Capper interface { + // Cap adds a cap to p given a pivot point and the normal vector of a + // terminal segment. The normal's length is half of the stroke width. + Cap(p Adder, halfWidth fixed.Int26_6, pivot, n1 fixed.Point26_6) +} + +// The CapperFunc type adapts an ordinary function to be a Capper. +type CapperFunc func(Adder, fixed.Int26_6, fixed.Point26_6, fixed.Point26_6) + +func (f CapperFunc) Cap(p Adder, halfWidth fixed.Int26_6, pivot, n1 fixed.Point26_6) { + f(p, halfWidth, pivot, n1) +} + +// A Joiner signifies how to join interior nodes of a stroked path. +type Joiner interface { + // Join adds a join to the two sides of a stroked path given a pivot + // point and the normal vectors of the trailing and leading segments. + // Both normals have length equal to half of the stroke width. + Join(lhs, rhs Adder, halfWidth fixed.Int26_6, pivot, n0, n1 fixed.Point26_6) +} + +// The JoinerFunc type adapts an ordinary function to be a Joiner. +type JoinerFunc func(lhs, rhs Adder, halfWidth fixed.Int26_6, pivot, n0, n1 fixed.Point26_6) + +func (f JoinerFunc) Join(lhs, rhs Adder, halfWidth fixed.Int26_6, pivot, n0, n1 fixed.Point26_6) { + f(lhs, rhs, halfWidth, pivot, n0, n1) +} + +// RoundCapper adds round caps to a stroked path. +var RoundCapper Capper = CapperFunc(roundCapper) + +func roundCapper(p Adder, halfWidth fixed.Int26_6, pivot, n1 fixed.Point26_6) { + // The cubic Bézier approximation to a circle involves the magic number + // (√2 - 1) * 4/3, which is approximately 35/64. + const k = 35 + e := pRot90CCW(n1) + side := pivot.Add(e) + start, end := pivot.Sub(n1), pivot.Add(n1) + d, e := n1.Mul(k), e.Mul(k) + p.Add3(start.Add(e), side.Sub(d), side) + p.Add3(side.Add(d), end.Add(e), end) +} + +// ButtCapper adds butt caps to a stroked path. +var ButtCapper Capper = CapperFunc(buttCapper) + +func buttCapper(p Adder, halfWidth fixed.Int26_6, pivot, n1 fixed.Point26_6) { + p.Add1(pivot.Add(n1)) +} + +// SquareCapper adds square caps to a stroked path. +var SquareCapper Capper = CapperFunc(squareCapper) + +func squareCapper(p Adder, halfWidth fixed.Int26_6, pivot, n1 fixed.Point26_6) { + e := pRot90CCW(n1) + side := pivot.Add(e) + p.Add1(side.Sub(n1)) + p.Add1(side.Add(n1)) + p.Add1(pivot.Add(n1)) +} + +// RoundJoiner adds round joins to a stroked path. +var RoundJoiner Joiner = JoinerFunc(roundJoiner) + +func roundJoiner(lhs, rhs Adder, haflWidth fixed.Int26_6, pivot, n0, n1 fixed.Point26_6) { + dot := pDot(pRot90CW(n0), n1) + if dot >= 0 { + addArc(lhs, pivot, n0, n1) + rhs.Add1(pivot.Sub(n1)) + } else { + lhs.Add1(pivot.Add(n1)) + addArc(rhs, pivot, pNeg(n0), pNeg(n1)) + } +} + +// BevelJoiner adds bevel joins to a stroked path. +var BevelJoiner Joiner = JoinerFunc(bevelJoiner) + +func bevelJoiner(lhs, rhs Adder, haflWidth fixed.Int26_6, pivot, n0, n1 fixed.Point26_6) { + lhs.Add1(pivot.Add(n1)) + rhs.Add1(pivot.Sub(n1)) +} + +// addArc adds a circular arc from pivot+n0 to pivot+n1 to p. The shorter of +// the two possible arcs is taken, i.e. the one spanning <= 180 degrees. The +// two vectors n0 and n1 must be of equal length. +func addArc(p Adder, pivot, n0, n1 fixed.Point26_6) { + // r2 is the square of the length of n0. + r2 := pDot(n0, n0) + if r2 < epsilon { + // The arc radius is so small that we collapse to a straight line. + p.Add1(pivot.Add(n1)) + return + } + // We approximate the arc by 0, 1, 2 or 3 45-degree quadratic segments plus + // a final quadratic segment from s to n1. Each 45-degree segment has + // control points {1, 0}, {1, tan(π/8)} and {1/√2, 1/√2} suitably scaled, + // rotated and translated. tan(π/8) is approximately 27/64. + const tpo8 = 27 + var s fixed.Point26_6 + // We determine which octant the angle between n0 and n1 is in via three + // dot products. m0, m1 and m2 are n0 rotated clockwise by 45, 90 and 135 + // degrees. + m0 := pRot45CW(n0) + m1 := pRot90CW(n0) + m2 := pRot90CW(m0) + if pDot(m1, n1) >= 0 { + if pDot(n0, n1) >= 0 { + if pDot(m2, n1) <= 0 { + // n1 is between 0 and 45 degrees clockwise of n0. + s = n0 + } else { + // n1 is between 45 and 90 degrees clockwise of n0. + p.Add2(pivot.Add(n0).Add(m1.Mul(tpo8)), pivot.Add(m0)) + s = m0 + } + } else { + pm1, n0t := pivot.Add(m1), n0.Mul(tpo8) + p.Add2(pivot.Add(n0).Add(m1.Mul(tpo8)), pivot.Add(m0)) + p.Add2(pm1.Add(n0t), pm1) + if pDot(m0, n1) >= 0 { + // n1 is between 90 and 135 degrees clockwise of n0. + s = m1 + } else { + // n1 is between 135 and 180 degrees clockwise of n0. + p.Add2(pm1.Sub(n0t), pivot.Add(m2)) + s = m2 + } + } + } else { + if pDot(n0, n1) >= 0 { + if pDot(m0, n1) >= 0 { + // n1 is between 0 and 45 degrees counter-clockwise of n0. + s = n0 + } else { + // n1 is between 45 and 90 degrees counter-clockwise of n0. + p.Add2(pivot.Add(n0).Sub(m1.Mul(tpo8)), pivot.Sub(m2)) + s = pNeg(m2) + } + } else { + pm1, n0t := pivot.Sub(m1), n0.Mul(tpo8) + p.Add2(pivot.Add(n0).Sub(m1.Mul(tpo8)), pivot.Sub(m2)) + p.Add2(pm1.Add(n0t), pm1) + if pDot(m2, n1) <= 0 { + // n1 is between 90 and 135 degrees counter-clockwise of n0. + s = pNeg(m1) + } else { + // n1 is between 135 and 180 degrees counter-clockwise of n0. + p.Add2(pm1.Sub(n0t), pivot.Sub(m0)) + s = pNeg(m0) + } + } + } + // The final quadratic segment has two endpoints s and n1 and the middle + // control point is a multiple of s.Add(n1), i.e. it is on the angle + // bisector of those two points. The multiple ranges between 128/256 and + // 150/256 as the angle between s and n1 ranges between 0 and 45 degrees. + // + // When the angle is 0 degrees (i.e. s and n1 are coincident) then + // s.Add(n1) is twice s and so the middle control point of the degenerate + // quadratic segment should be half s.Add(n1), and half = 128/256. + // + // When the angle is 45 degrees then 150/256 is the ratio of the lengths of + // the two vectors {1, tan(π/8)} and {1 + 1/√2, 1/√2}. + // + // d is the normalized dot product between s and n1. Since the angle ranges + // between 0 and 45 degrees then d ranges between 256/256 and 181/256. + d := 256 * pDot(s, n1) / r2 + multiple := fixed.Int26_6(150-(150-128)*(d-181)/(256-181)) >> 2 + p.Add2(pivot.Add(s.Add(n1).Mul(multiple)), pivot.Add(n1)) +} + +// midpoint returns the midpoint of two Points. +func midpoint(a, b fixed.Point26_6) fixed.Point26_6 { + return fixed.Point26_6{(a.X + b.X) / 2, (a.Y + b.Y) / 2} +} + +// angleGreaterThan45 returns whether the angle between two vectors is more +// than 45 degrees. +func angleGreaterThan45(v0, v1 fixed.Point26_6) bool { + v := pRot45CCW(v0) + return pDot(v, v1) < 0 || pDot(pRot90CW(v), v1) < 0 +} + +// interpolate returns the point (1-t)*a + t*b. +func interpolate(a, b fixed.Point26_6, t fixed.Int52_12) fixed.Point26_6 { + s := 1<<12 - t + x := s*fixed.Int52_12(a.X) + t*fixed.Int52_12(b.X) + y := s*fixed.Int52_12(a.Y) + t*fixed.Int52_12(b.Y) + return fixed.Point26_6{fixed.Int26_6(x >> 12), fixed.Int26_6(y >> 12)} +} + +// curviest2 returns the value of t for which the quadratic parametric curve +// (1-t)²*a + 2*t*(1-t).b + t²*c has maximum curvature. +// +// The curvature of the parametric curve f(t) = (x(t), y(t)) is +// |x′y″-y′x″| / (x′²+y′²)^(3/2). +// +// Let d = b-a and e = c-2*b+a, so that f′(t) = 2*d+2*e*t and f″(t) = 2*e. +// The curvature's numerator is (2*dx+2*ex*t)*(2*ey)-(2*dy+2*ey*t)*(2*ex), +// which simplifies to 4*dx*ey-4*dy*ex, which is constant with respect to t. +// +// Thus, curvature is extreme where the denominator is extreme, i.e. where +// (x′²+y′²) is extreme. The first order condition is that +// 2*x′*x″+2*y′*y″ = 0, or (dx+ex*t)*ex + (dy+ey*t)*ey = 0. +// Solving for t gives t = -(dx*ex+dy*ey) / (ex*ex+ey*ey). +func curviest2(a, b, c fixed.Point26_6) fixed.Int52_12 { + dx := int64(b.X - a.X) + dy := int64(b.Y - a.Y) + ex := int64(c.X - 2*b.X + a.X) + ey := int64(c.Y - 2*b.Y + a.Y) + if ex == 0 && ey == 0 { + return 2048 + } + return fixed.Int52_12(-4096 * (dx*ex + dy*ey) / (ex*ex + ey*ey)) +} + +// A stroker holds state for stroking a path. +type stroker struct { + // p is the destination that records the stroked path. + p Adder + // u is the half-width of the stroke. + u fixed.Int26_6 + // cr and jr specify how to end and connect path segments. + cr Capper + jr Joiner + // r is the reverse path. Stroking a path involves constructing two + // parallel paths 2*u apart. The first path is added immediately to p, + // the second path is accumulated in r and eventually added in reverse. + r Path + // a is the most recent segment point. anorm is the segment normal of + // length u at that point. + a, anorm fixed.Point26_6 +} + +// addNonCurvy2 adds a quadratic segment to the stroker, where the segment +// defined by (k.a, b, c) achieves maximum curvature at either k.a or c. +func (k *stroker) addNonCurvy2(b, c fixed.Point26_6) { + // We repeatedly divide the segment at its middle until it is straight + // enough to approximate the stroke by just translating the control points. + // ds and ps are stacks of depths and points. t is the top of the stack. + const maxDepth = 5 + var ( + ds [maxDepth + 1]int + ps [2*maxDepth + 3]fixed.Point26_6 + t int + ) + // Initially the ps stack has one quadratic segment of depth zero. + ds[0] = 0 + ps[2] = k.a + ps[1] = b + ps[0] = c + anorm := k.anorm + var cnorm fixed.Point26_6 + + for { + depth := ds[t] + a := ps[2*t+2] + b := ps[2*t+1] + c := ps[2*t+0] + ab := b.Sub(a) + bc := c.Sub(b) + abIsSmall := pDot(ab, ab) < fixed.Int52_12(1<<12) + bcIsSmall := pDot(bc, bc) < fixed.Int52_12(1<<12) + if abIsSmall && bcIsSmall { + // Approximate the segment by a circular arc. + cnorm = pRot90CCW(pNorm(bc, k.u)) + mac := midpoint(a, c) + addArc(k.p, mac, anorm, cnorm) + addArc(&k.r, mac, pNeg(anorm), pNeg(cnorm)) + } else if depth < maxDepth && angleGreaterThan45(ab, bc) { + // Divide the segment in two and push both halves on the stack. + mab := midpoint(a, b) + mbc := midpoint(b, c) + t++ + ds[t+0] = depth + 1 + ds[t-1] = depth + 1 + ps[2*t+2] = a + ps[2*t+1] = mab + ps[2*t+0] = midpoint(mab, mbc) + ps[2*t-1] = mbc + continue + } else { + // Translate the control points. + bnorm := pRot90CCW(pNorm(c.Sub(a), k.u)) + cnorm = pRot90CCW(pNorm(bc, k.u)) + k.p.Add2(b.Add(bnorm), c.Add(cnorm)) + k.r.Add2(b.Sub(bnorm), c.Sub(cnorm)) + } + if t == 0 { + k.a, k.anorm = c, cnorm + return + } + t-- + anorm = cnorm + } + panic("unreachable") +} + +// Add1 adds a linear segment to the stroker. +func (k *stroker) Add1(b fixed.Point26_6) { + bnorm := pRot90CCW(pNorm(b.Sub(k.a), k.u)) + if len(k.r) == 0 { + k.p.Start(k.a.Add(bnorm)) + k.r.Start(k.a.Sub(bnorm)) + } else { + k.jr.Join(k.p, &k.r, k.u, k.a, k.anorm, bnorm) + } + k.p.Add1(b.Add(bnorm)) + k.r.Add1(b.Sub(bnorm)) + k.a, k.anorm = b, bnorm +} + +// Add2 adds a quadratic segment to the stroker. +func (k *stroker) Add2(b, c fixed.Point26_6) { + ab := b.Sub(k.a) + bc := c.Sub(b) + abnorm := pRot90CCW(pNorm(ab, k.u)) + if len(k.r) == 0 { + k.p.Start(k.a.Add(abnorm)) + k.r.Start(k.a.Sub(abnorm)) + } else { + k.jr.Join(k.p, &k.r, k.u, k.a, k.anorm, abnorm) + } + + // Approximate nearly-degenerate quadratics by linear segments. + abIsSmall := pDot(ab, ab) < epsilon + bcIsSmall := pDot(bc, bc) < epsilon + if abIsSmall || bcIsSmall { + acnorm := pRot90CCW(pNorm(c.Sub(k.a), k.u)) + k.p.Add1(c.Add(acnorm)) + k.r.Add1(c.Sub(acnorm)) + k.a, k.anorm = c, acnorm + return + } + + // The quadratic segment (k.a, b, c) has a point of maximum curvature. + // If this occurs at an end point, we process the segment as a whole. + t := curviest2(k.a, b, c) + if t <= 0 || 4096 <= t { + k.addNonCurvy2(b, c) + return + } + + // Otherwise, we perform a de Casteljau decomposition at the point of + // maximum curvature and process the two straighter parts. + mab := interpolate(k.a, b, t) + mbc := interpolate(b, c, t) + mabc := interpolate(mab, mbc, t) + + // If the vectors ab and bc are close to being in opposite directions, + // then the decomposition can become unstable, so we approximate the + // quadratic segment by two linear segments joined by an arc. + bcnorm := pRot90CCW(pNorm(bc, k.u)) + if pDot(abnorm, bcnorm) < -fixed.Int52_12(k.u)*fixed.Int52_12(k.u)*2047/2048 { + pArc := pDot(abnorm, bc) < 0 + + k.p.Add1(mabc.Add(abnorm)) + if pArc { + z := pRot90CW(abnorm) + addArc(k.p, mabc, abnorm, z) + addArc(k.p, mabc, z, bcnorm) + } + k.p.Add1(mabc.Add(bcnorm)) + k.p.Add1(c.Add(bcnorm)) + + k.r.Add1(mabc.Sub(abnorm)) + if !pArc { + z := pRot90CW(abnorm) + addArc(&k.r, mabc, pNeg(abnorm), z) + addArc(&k.r, mabc, z, pNeg(bcnorm)) + } + k.r.Add1(mabc.Sub(bcnorm)) + k.r.Add1(c.Sub(bcnorm)) + + k.a, k.anorm = c, bcnorm + return + } + + // Process the decomposed parts. + k.addNonCurvy2(mab, mabc) + k.addNonCurvy2(mbc, c) +} + +// Add3 adds a cubic segment to the stroker. +func (k *stroker) Add3(b, c, d fixed.Point26_6) { + panic("freetype/raster: stroke unimplemented for cubic segments") +} + +// stroke adds the stroked Path q to p, where q consists of exactly one curve. +func (k *stroker) stroke(q Path) { + // Stroking is implemented by deriving two paths each k.u apart from q. + // The left-hand-side path is added immediately to k.p; the right-hand-side + // path is accumulated in k.r. Once we've finished adding the LHS to k.p, + // we add the RHS in reverse order. + k.r = make(Path, 0, len(q)) + k.a = fixed.Point26_6{q[1], q[2]} + for i := 4; i < len(q); { + switch q[i] { + case 1: + k.Add1( + fixed.Point26_6{q[i+1], q[i+2]}, + ) + i += 4 + case 2: + k.Add2( + fixed.Point26_6{q[i+1], q[i+2]}, + fixed.Point26_6{q[i+3], q[i+4]}, + ) + i += 6 + case 3: + k.Add3( + fixed.Point26_6{q[i+1], q[i+2]}, + fixed.Point26_6{q[i+3], q[i+4]}, + fixed.Point26_6{q[i+5], q[i+6]}, + ) + i += 8 + default: + panic("freetype/raster: bad path") + } + } + if len(k.r) == 0 { + return + } + // TODO(nigeltao): if q is a closed curve then we should join the first and + // last segments instead of capping them. + k.cr.Cap(k.p, k.u, q.lastPoint(), pNeg(k.anorm)) + addPathReversed(k.p, k.r) + pivot := q.firstPoint() + k.cr.Cap(k.p, k.u, pivot, pivot.Sub(fixed.Point26_6{k.r[1], k.r[2]})) +} + +// Stroke adds q stroked with the given width to p. The result is typically +// self-intersecting and should be rasterized with UseNonZeroWinding. +// cr and jr may be nil, which defaults to a RoundCapper or RoundJoiner. +func Stroke(p Adder, q Path, width fixed.Int26_6, cr Capper, jr Joiner) { + if len(q) == 0 { + return + } + if cr == nil { + cr = RoundCapper + } + if jr == nil { + jr = RoundJoiner + } + if q[0] != 0 { + panic("freetype/raster: bad path") + } + s := stroker{p: p, u: width / 2, cr: cr, jr: jr} + i := 0 + for j := 4; j < len(q); { + switch q[j] { + case 0: + s.stroke(q[i:j]) + i, j = j, j+4 + case 1: + j += 4 + case 2: + j += 6 + case 3: + j += 8 + default: + panic("freetype/raster: bad path") + } + } + s.stroke(q[i:]) +} diff --git a/vendor/github.com/golang/freetype/testdata/COPYING b/vendor/github.com/golang/freetype/testdata/COPYING new file mode 100644 index 0000000..78c6065 --- /dev/null +++ b/vendor/github.com/golang/freetype/testdata/COPYING @@ -0,0 +1,42 @@ +Luxi fonts copyright (c) 2001 by Bigelow & Holmes Inc. Luxi font +instruction code copyright (c) 2001 by URW++ GmbH. All Rights +Reserved. Luxi is a registered trademark of Bigelow & Holmes Inc. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of these Fonts and associated documentation files (the "Font +Software"), to deal in the Font Software, including without +limitation the rights to use, copy, merge, publish, distribute, +sublicense, and/or sell copies of the Font Software, and to permit +persons to whom the Font Software is furnished to do so, subject to +the following conditions: + +The above copyright and trademark notices and this permission notice +shall be included in all copies of one or more of the Font Software. + +The Font Software may not be modified, altered, or added to, and in +particular the designs of glyphs or characters in the Fonts may not +be modified nor may additional glyphs or characters be added to the +Fonts. This License becomes null and void when the Fonts or Font +Software have been modified. + +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL +BIGELOW & HOLMES INC. OR URW++ GMBH. BE LIABLE FOR ANY CLAIM, DAMAGES +OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, +INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR +INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT +SOFTWARE. + +Except as contained in this notice, the names of Bigelow & Holmes +Inc. and URW++ GmbH. shall not be used in advertising or otherwise to +promote the sale, use or other dealings in this Font Software without +prior written authorization from Bigelow & Holmes Inc. and URW++ GmbH. + +For further information, contact: + +info@urwpp.de +or +design@bigelowandholmes.com diff --git a/vendor/github.com/golang/freetype/truetype/face.go b/vendor/github.com/golang/freetype/truetype/face.go new file mode 100644 index 0000000..099006f --- /dev/null +++ b/vendor/github.com/golang/freetype/truetype/face.go @@ -0,0 +1,507 @@ +// Copyright 2015 The Freetype-Go Authors. All rights reserved. +// Use of this source code is governed by your choice of either the +// FreeType License or the GNU General Public License version 2 (or +// any later version), both of which can be found in the LICENSE file. + +package truetype + +import ( + "image" + "math" + + "github.com/golang/freetype/raster" + "golang.org/x/image/font" + "golang.org/x/image/math/fixed" +) + +func powerOf2(i int) bool { + return i != 0 && (i&(i-1)) == 0 +} + +// Options are optional arguments to NewFace. +type Options struct { + // Size is the font size in points, as in "a 10 point font size". + // + // A zero value means to use a 12 point font size. + Size float64 + + // DPI is the dots-per-inch resolution. + // + // A zero value means to use 72 DPI. + DPI float64 + + // Hinting is how to quantize the glyph nodes. + // + // A zero value means to use no hinting. + Hinting font.Hinting + + // GlyphCacheEntries is the number of entries in the glyph mask image + // cache. + // + // If non-zero, it must be a power of 2. + // + // A zero value means to use 512 entries. + GlyphCacheEntries int + + // SubPixelsX is the number of sub-pixel locations a glyph's dot is + // quantized to, in the horizontal direction. For example, a value of 8 + // means that the dot is quantized to 1/8th of a pixel. This quantization + // only affects the glyph mask image, not its bounding box or advance + // width. A higher value gives a more faithful glyph image, but reduces the + // effectiveness of the glyph cache. + // + // If non-zero, it must be a power of 2, and be between 1 and 64 inclusive. + // + // A zero value means to use 4 sub-pixel locations. + SubPixelsX int + + // SubPixelsY is the number of sub-pixel locations a glyph's dot is + // quantized to, in the vertical direction. For example, a value of 8 + // means that the dot is quantized to 1/8th of a pixel. This quantization + // only affects the glyph mask image, not its bounding box or advance + // width. A higher value gives a more faithful glyph image, but reduces the + // effectiveness of the glyph cache. + // + // If non-zero, it must be a power of 2, and be between 1 and 64 inclusive. + // + // A zero value means to use 1 sub-pixel location. + SubPixelsY int +} + +func (o *Options) size() float64 { + if o != nil && o.Size > 0 { + return o.Size + } + return 12 +} + +func (o *Options) dpi() float64 { + if o != nil && o.DPI > 0 { + return o.DPI + } + return 72 +} + +func (o *Options) hinting() font.Hinting { + if o != nil { + switch o.Hinting { + case font.HintingVertical, font.HintingFull: + // TODO: support vertical hinting. + return font.HintingFull + } + } + return font.HintingNone +} + +func (o *Options) glyphCacheEntries() int { + if o != nil && powerOf2(o.GlyphCacheEntries) { + return o.GlyphCacheEntries + } + // 512 is 128 * 4 * 1, which lets us cache 128 glyphs at 4 * 1 subpixel + // locations in the X and Y direction. + return 512 +} + +func (o *Options) subPixelsX() (value uint32, halfQuantum, mask fixed.Int26_6) { + if o != nil { + switch o.SubPixelsX { + case 1, 2, 4, 8, 16, 32, 64: + return subPixels(o.SubPixelsX) + } + } + // This default value of 4 isn't based on anything scientific, merely as + // small a number as possible that looks almost as good as no quantization, + // or returning subPixels(64). + return subPixels(4) +} + +func (o *Options) subPixelsY() (value uint32, halfQuantum, mask fixed.Int26_6) { + if o != nil { + switch o.SubPixelsX { + case 1, 2, 4, 8, 16, 32, 64: + return subPixels(o.SubPixelsX) + } + } + // This default value of 1 isn't based on anything scientific, merely that + // vertical sub-pixel glyph rendering is pretty rare. Baseline locations + // can usually afford to snap to the pixel grid, so the vertical direction + // doesn't have the deal with the horizontal's fractional advance widths. + return subPixels(1) +} + +// subPixels returns q and the bias and mask that leads to q quantized +// sub-pixel locations per full pixel. +// +// For example, q == 4 leads to a bias of 8 and a mask of 0xfffffff0, or -16, +// because we want to round fractions of fixed.Int26_6 as: +// - 0 to 7 rounds to 0. +// - 8 to 23 rounds to 16. +// - 24 to 39 rounds to 32. +// - 40 to 55 rounds to 48. +// - 56 to 63 rounds to 64. +// which means to add 8 and then bitwise-and with -16, in two's complement +// representation. +// +// When q == 1, we want bias == 32 and mask == -64. +// When q == 2, we want bias == 16 and mask == -32. +// When q == 4, we want bias == 8 and mask == -16. +// ... +// When q == 64, we want bias == 0 and mask == -1. (The no-op case). +// The pattern is clear. +func subPixels(q int) (value uint32, bias, mask fixed.Int26_6) { + return uint32(q), 32 / fixed.Int26_6(q), -64 / fixed.Int26_6(q) +} + +// glyphCacheEntry caches the arguments and return values of rasterize. +type glyphCacheEntry struct { + key glyphCacheKey + val glyphCacheVal +} + +type glyphCacheKey struct { + index Index + fx, fy uint8 +} + +type glyphCacheVal struct { + advanceWidth fixed.Int26_6 + offset image.Point + gw int + gh int +} + +type indexCacheEntry struct { + rune rune + index Index +} + +// NewFace returns a new font.Face for the given Font. +func NewFace(f *Font, opts *Options) font.Face { + a := &face{ + f: f, + hinting: opts.hinting(), + scale: fixed.Int26_6(0.5 + (opts.size() * opts.dpi() * 64 / 72)), + glyphCache: make([]glyphCacheEntry, opts.glyphCacheEntries()), + } + a.subPixelX, a.subPixelBiasX, a.subPixelMaskX = opts.subPixelsX() + a.subPixelY, a.subPixelBiasY, a.subPixelMaskY = opts.subPixelsY() + + // Fill the cache with invalid entries. Valid glyph cache entries have fx + // and fy in the range [0, 64). Valid index cache entries have rune >= 0. + for i := range a.glyphCache { + a.glyphCache[i].key.fy = 0xff + } + for i := range a.indexCache { + a.indexCache[i].rune = -1 + } + + // Set the rasterizer's bounds to be big enough to handle the largest glyph. + b := f.Bounds(a.scale) + xmin := +int(b.Min.X) >> 6 + ymin := -int(b.Max.Y) >> 6 + xmax := +int(b.Max.X+63) >> 6 + ymax := -int(b.Min.Y-63) >> 6 + a.maxw = xmax - xmin + a.maxh = ymax - ymin + a.masks = image.NewAlpha(image.Rect(0, 0, a.maxw, a.maxh*len(a.glyphCache))) + a.r.SetBounds(a.maxw, a.maxh) + a.p = facePainter{a} + + return a +} + +type face struct { + f *Font + hinting font.Hinting + scale fixed.Int26_6 + subPixelX uint32 + subPixelBiasX fixed.Int26_6 + subPixelMaskX fixed.Int26_6 + subPixelY uint32 + subPixelBiasY fixed.Int26_6 + subPixelMaskY fixed.Int26_6 + masks *image.Alpha + glyphCache []glyphCacheEntry + r raster.Rasterizer + p raster.Painter + paintOffset int + maxw int + maxh int + glyphBuf GlyphBuf + indexCache [indexCacheLen]indexCacheEntry + + // TODO: clip rectangle? +} + +const indexCacheLen = 256 + +func (a *face) index(r rune) Index { + const mask = indexCacheLen - 1 + c := &a.indexCache[r&mask] + if c.rune == r { + return c.index + } + i := a.f.Index(r) + c.rune = r + c.index = i + return i +} + +// Close satisfies the font.Face interface. +func (a *face) Close() error { return nil } + +// Metrics satisfies the font.Face interface. +func (a *face) Metrics() font.Metrics { + scale := float64(a.scale) + fupe := float64(a.f.FUnitsPerEm()) + return font.Metrics{ + Height: a.scale, + Ascent: fixed.Int26_6(math.Ceil(scale * float64(+a.f.ascent) / fupe)), + Descent: fixed.Int26_6(math.Ceil(scale * float64(-a.f.descent) / fupe)), + } +} + +// Kern satisfies the font.Face interface. +func (a *face) Kern(r0, r1 rune) fixed.Int26_6 { + i0 := a.index(r0) + i1 := a.index(r1) + kern := a.f.Kern(a.scale, i0, i1) + if a.hinting != font.HintingNone { + kern = (kern + 32) &^ 63 + } + return kern +} + +// Glyph satisfies the font.Face interface. +func (a *face) Glyph(dot fixed.Point26_6, r rune) ( + dr image.Rectangle, mask image.Image, maskp image.Point, advance fixed.Int26_6, ok bool) { + + // Quantize to the sub-pixel granularity. + dotX := (dot.X + a.subPixelBiasX) & a.subPixelMaskX + dotY := (dot.Y + a.subPixelBiasY) & a.subPixelMaskY + + // Split the coordinates into their integer and fractional parts. + ix, fx := int(dotX>>6), dotX&0x3f + iy, fy := int(dotY>>6), dotY&0x3f + + index := a.index(r) + cIndex := uint32(index) + cIndex = cIndex*a.subPixelX - uint32(fx/a.subPixelMaskX) + cIndex = cIndex*a.subPixelY - uint32(fy/a.subPixelMaskY) + cIndex &= uint32(len(a.glyphCache) - 1) + a.paintOffset = a.maxh * int(cIndex) + k := glyphCacheKey{ + index: index, + fx: uint8(fx), + fy: uint8(fy), + } + var v glyphCacheVal + if a.glyphCache[cIndex].key != k { + var ok bool + v, ok = a.rasterize(index, fx, fy) + if !ok { + return image.Rectangle{}, nil, image.Point{}, 0, false + } + a.glyphCache[cIndex] = glyphCacheEntry{k, v} + } else { + v = a.glyphCache[cIndex].val + } + + dr.Min = image.Point{ + X: ix + v.offset.X, + Y: iy + v.offset.Y, + } + dr.Max = image.Point{ + X: dr.Min.X + v.gw, + Y: dr.Min.Y + v.gh, + } + return dr, a.masks, image.Point{Y: a.paintOffset}, v.advanceWidth, true +} + +func (a *face) GlyphBounds(r rune) (bounds fixed.Rectangle26_6, advance fixed.Int26_6, ok bool) { + if err := a.glyphBuf.Load(a.f, a.scale, a.index(r), a.hinting); err != nil { + return fixed.Rectangle26_6{}, 0, false + } + xmin := +a.glyphBuf.Bounds.Min.X + ymin := -a.glyphBuf.Bounds.Max.Y + xmax := +a.glyphBuf.Bounds.Max.X + ymax := -a.glyphBuf.Bounds.Min.Y + if xmin > xmax || ymin > ymax { + return fixed.Rectangle26_6{}, 0, false + } + return fixed.Rectangle26_6{ + Min: fixed.Point26_6{ + X: xmin, + Y: ymin, + }, + Max: fixed.Point26_6{ + X: xmax, + Y: ymax, + }, + }, a.glyphBuf.AdvanceWidth, true +} + +func (a *face) GlyphAdvance(r rune) (advance fixed.Int26_6, ok bool) { + if err := a.glyphBuf.Load(a.f, a.scale, a.index(r), a.hinting); err != nil { + return 0, false + } + return a.glyphBuf.AdvanceWidth, true +} + +// rasterize returns the advance width, integer-pixel offset to render at, and +// the width and height of the given glyph at the given sub-pixel offsets. +// +// The 26.6 fixed point arguments fx and fy must be in the range [0, 1). +func (a *face) rasterize(index Index, fx, fy fixed.Int26_6) (v glyphCacheVal, ok bool) { + if err := a.glyphBuf.Load(a.f, a.scale, index, a.hinting); err != nil { + return glyphCacheVal{}, false + } + // Calculate the integer-pixel bounds for the glyph. + xmin := int(fx+a.glyphBuf.Bounds.Min.X) >> 6 + ymin := int(fy-a.glyphBuf.Bounds.Max.Y) >> 6 + xmax := int(fx+a.glyphBuf.Bounds.Max.X+0x3f) >> 6 + ymax := int(fy-a.glyphBuf.Bounds.Min.Y+0x3f) >> 6 + if xmin > xmax || ymin > ymax { + return glyphCacheVal{}, false + } + // A TrueType's glyph's nodes can have negative co-ordinates, but the + // rasterizer clips anything left of x=0 or above y=0. xmin and ymin are + // the pixel offsets, based on the font's FUnit metrics, that let a + // negative co-ordinate in TrueType space be non-negative in rasterizer + // space. xmin and ymin are typically <= 0. + fx -= fixed.Int26_6(xmin << 6) + fy -= fixed.Int26_6(ymin << 6) + // Rasterize the glyph's vectors. + a.r.Clear() + pixOffset := a.paintOffset * a.maxw + clear(a.masks.Pix[pixOffset : pixOffset+a.maxw*a.maxh]) + e0 := 0 + for _, e1 := range a.glyphBuf.Ends { + a.drawContour(a.glyphBuf.Points[e0:e1], fx, fy) + e0 = e1 + } + a.r.Rasterize(a.p) + return glyphCacheVal{ + a.glyphBuf.AdvanceWidth, + image.Point{xmin, ymin}, + xmax - xmin, + ymax - ymin, + }, true +} + +func clear(pix []byte) { + for i := range pix { + pix[i] = 0 + } +} + +// drawContour draws the given closed contour with the given offset. +func (a *face) drawContour(ps []Point, dx, dy fixed.Int26_6) { + if len(ps) == 0 { + return + } + + // The low bit of each point's Flags value is whether the point is on the + // curve. Truetype fonts only have quadratic Bézier curves, not cubics. + // Thus, two consecutive off-curve points imply an on-curve point in the + // middle of those two. + // + // See http://chanae.walon.org/pub/ttf/ttf_glyphs.htm for more details. + + // ps[0] is a truetype.Point measured in FUnits and positive Y going + // upwards. start is the same thing measured in fixed point units and + // positive Y going downwards, and offset by (dx, dy). + start := fixed.Point26_6{ + X: dx + ps[0].X, + Y: dy - ps[0].Y, + } + var others []Point + if ps[0].Flags&0x01 != 0 { + others = ps[1:] + } else { + last := fixed.Point26_6{ + X: dx + ps[len(ps)-1].X, + Y: dy - ps[len(ps)-1].Y, + } + if ps[len(ps)-1].Flags&0x01 != 0 { + start = last + others = ps[:len(ps)-1] + } else { + start = fixed.Point26_6{ + X: (start.X + last.X) / 2, + Y: (start.Y + last.Y) / 2, + } + others = ps + } + } + a.r.Start(start) + q0, on0 := start, true + for _, p := range others { + q := fixed.Point26_6{ + X: dx + p.X, + Y: dy - p.Y, + } + on := p.Flags&0x01 != 0 + if on { + if on0 { + a.r.Add1(q) + } else { + a.r.Add2(q0, q) + } + } else { + if on0 { + // No-op. + } else { + mid := fixed.Point26_6{ + X: (q0.X + q.X) / 2, + Y: (q0.Y + q.Y) / 2, + } + a.r.Add2(q0, mid) + } + } + q0, on0 = q, on + } + // Close the curve. + if on0 { + a.r.Add1(start) + } else { + a.r.Add2(q0, start) + } +} + +// facePainter is like a raster.AlphaSrcPainter, with an additional Y offset +// (face.paintOffset) to the painted spans. +type facePainter struct { + a *face +} + +func (p facePainter) Paint(ss []raster.Span, done bool) { + m := p.a.masks + b := m.Bounds() + b.Min.Y = p.a.paintOffset + b.Max.Y = p.a.paintOffset + p.a.maxh + for _, s := range ss { + s.Y += p.a.paintOffset + if s.Y < b.Min.Y { + continue + } + if s.Y >= b.Max.Y { + return + } + if s.X0 < b.Min.X { + s.X0 = b.Min.X + } + if s.X1 > b.Max.X { + s.X1 = b.Max.X + } + if s.X0 >= s.X1 { + continue + } + base := (s.Y-m.Rect.Min.Y)*m.Stride - m.Rect.Min.X + p := m.Pix[base+s.X0 : base+s.X1] + color := uint8(s.Alpha >> 8) + for i := range p { + p[i] = color + } + } +} diff --git a/vendor/github.com/golang/freetype/truetype/glyph.go b/vendor/github.com/golang/freetype/truetype/glyph.go new file mode 100644 index 0000000..6157ad8 --- /dev/null +++ b/vendor/github.com/golang/freetype/truetype/glyph.go @@ -0,0 +1,522 @@ +// Copyright 2010 The Freetype-Go Authors. All rights reserved. +// Use of this source code is governed by your choice of either the +// FreeType License or the GNU General Public License version 2 (or +// any later version), both of which can be found in the LICENSE file. + +package truetype + +import ( + "golang.org/x/image/font" + "golang.org/x/image/math/fixed" +) + +// TODO: implement VerticalHinting. + +// A Point is a co-ordinate pair plus whether it is 'on' a contour or an 'off' +// control point. +type Point struct { + X, Y fixed.Int26_6 + // The Flags' LSB means whether or not this Point is 'on' the contour. + // Other bits are reserved for internal use. + Flags uint32 +} + +// A GlyphBuf holds a glyph's contours. A GlyphBuf can be re-used to load a +// series of glyphs from a Font. +type GlyphBuf struct { + // AdvanceWidth is the glyph's advance width. + AdvanceWidth fixed.Int26_6 + // Bounds is the glyph's bounding box. + Bounds fixed.Rectangle26_6 + // Points contains all Points from all contours of the glyph. If hinting + // was used to load a glyph then Unhinted contains those Points before they + // were hinted, and InFontUnits contains those Points before they were + // hinted and scaled. + Points, Unhinted, InFontUnits []Point + // Ends is the point indexes of the end point of each contour. The length + // of Ends is the number of contours in the glyph. The i'th contour + // consists of points Points[Ends[i-1]:Ends[i]], where Ends[-1] is + // interpreted to mean zero. + Ends []int + + font *Font + scale fixed.Int26_6 + hinting font.Hinting + hinter hinter + // phantomPoints are the co-ordinates of the synthetic phantom points + // used for hinting and bounding box calculations. + phantomPoints [4]Point + // pp1x is the X co-ordinate of the first phantom point. The '1' is + // using 1-based indexing; pp1x is almost always phantomPoints[0].X. + // TODO: eliminate this and consistently use phantomPoints[0].X. + pp1x fixed.Int26_6 + // metricsSet is whether the glyph's metrics have been set yet. For a + // compound glyph, a sub-glyph may override the outer glyph's metrics. + metricsSet bool + // tmp is a scratch buffer. + tmp []Point +} + +// Flags for decoding a glyph's contours. These flags are documented at +// http://developer.apple.com/fonts/TTRefMan/RM06/Chap6glyf.html. +const ( + flagOnCurve = 1 << iota + flagXShortVector + flagYShortVector + flagRepeat + flagPositiveXShortVector + flagPositiveYShortVector + + // The remaining flags are for internal use. + flagTouchedX + flagTouchedY +) + +// The same flag bits (0x10 and 0x20) are overloaded to have two meanings, +// dependent on the value of the flag{X,Y}ShortVector bits. +const ( + flagThisXIsSame = flagPositiveXShortVector + flagThisYIsSame = flagPositiveYShortVector +) + +// Load loads a glyph's contours from a Font, overwriting any previously loaded +// contours for this GlyphBuf. scale is the number of 26.6 fixed point units in +// 1 em, i is the glyph index, and h is the hinting policy. +func (g *GlyphBuf) Load(f *Font, scale fixed.Int26_6, i Index, h font.Hinting) error { + g.Points = g.Points[:0] + g.Unhinted = g.Unhinted[:0] + g.InFontUnits = g.InFontUnits[:0] + g.Ends = g.Ends[:0] + g.font = f + g.hinting = h + g.scale = scale + g.pp1x = 0 + g.phantomPoints = [4]Point{} + g.metricsSet = false + + if h != font.HintingNone { + if err := g.hinter.init(f, scale); err != nil { + return err + } + } + if err := g.load(0, i, true); err != nil { + return err + } + // TODO: this selection of either g.pp1x or g.phantomPoints[0].X isn't ideal, + // and should be cleaned up once we have all the testScaling tests passing, + // plus additional tests for Freetype-Go's bounding boxes matching C Freetype's. + pp1x := g.pp1x + if h != font.HintingNone { + pp1x = g.phantomPoints[0].X + } + if pp1x != 0 { + for i := range g.Points { + g.Points[i].X -= pp1x + } + } + + advanceWidth := g.phantomPoints[1].X - g.phantomPoints[0].X + if h != font.HintingNone { + if len(f.hdmx) >= 8 { + if n := u32(f.hdmx, 4); n > 3+uint32(i) { + for hdmx := f.hdmx[8:]; uint32(len(hdmx)) >= n; hdmx = hdmx[n:] { + if fixed.Int26_6(hdmx[0]) == scale>>6 { + advanceWidth = fixed.Int26_6(hdmx[2+i]) << 6 + break + } + } + } + } + advanceWidth = (advanceWidth + 32) &^ 63 + } + g.AdvanceWidth = advanceWidth + + // Set g.Bounds to the 'control box', which is the bounding box of the + // Bézier curves' control points. This is easier to calculate, no smaller + // than and often equal to the tightest possible bounding box of the curves + // themselves. This approach is what C Freetype does. We can't just scale + // the nominal bounding box in the glyf data as the hinting process and + // phantom point adjustment may move points outside of that box. + if len(g.Points) == 0 { + g.Bounds = fixed.Rectangle26_6{} + } else { + p := g.Points[0] + g.Bounds.Min.X = p.X + g.Bounds.Max.X = p.X + g.Bounds.Min.Y = p.Y + g.Bounds.Max.Y = p.Y + for _, p := range g.Points[1:] { + if g.Bounds.Min.X > p.X { + g.Bounds.Min.X = p.X + } else if g.Bounds.Max.X < p.X { + g.Bounds.Max.X = p.X + } + if g.Bounds.Min.Y > p.Y { + g.Bounds.Min.Y = p.Y + } else if g.Bounds.Max.Y < p.Y { + g.Bounds.Max.Y = p.Y + } + } + // Snap the box to the grid, if hinting is on. + if h != font.HintingNone { + g.Bounds.Min.X &^= 63 + g.Bounds.Min.Y &^= 63 + g.Bounds.Max.X += 63 + g.Bounds.Max.X &^= 63 + g.Bounds.Max.Y += 63 + g.Bounds.Max.Y &^= 63 + } + } + return nil +} + +func (g *GlyphBuf) load(recursion uint32, i Index, useMyMetrics bool) (err error) { + // The recursion limit here is arbitrary, but defends against malformed glyphs. + if recursion >= 32 { + return UnsupportedError("excessive compound glyph recursion") + } + // Find the relevant slice of g.font.glyf. + var g0, g1 uint32 + if g.font.locaOffsetFormat == locaOffsetFormatShort { + g0 = 2 * uint32(u16(g.font.loca, 2*int(i))) + g1 = 2 * uint32(u16(g.font.loca, 2*int(i)+2)) + } else { + g0 = u32(g.font.loca, 4*int(i)) + g1 = u32(g.font.loca, 4*int(i)+4) + } + + // Decode the contour count and nominal bounding box, from the first + // 10 bytes of the glyf data. boundsYMin and boundsXMax, at offsets 4 + // and 6, are unused. + glyf, ne, boundsXMin, boundsYMax := []byte(nil), 0, fixed.Int26_6(0), fixed.Int26_6(0) + if g0+10 <= g1 { + glyf = g.font.glyf[g0:g1] + ne = int(int16(u16(glyf, 0))) + boundsXMin = fixed.Int26_6(int16(u16(glyf, 2))) + boundsYMax = fixed.Int26_6(int16(u16(glyf, 8))) + } + + // Create the phantom points. + uhm, pp1x := g.font.unscaledHMetric(i), fixed.Int26_6(0) + uvm := g.font.unscaledVMetric(i, boundsYMax) + g.phantomPoints = [4]Point{ + {X: boundsXMin - uhm.LeftSideBearing}, + {X: boundsXMin - uhm.LeftSideBearing + uhm.AdvanceWidth}, + {X: uhm.AdvanceWidth / 2, Y: boundsYMax + uvm.TopSideBearing}, + {X: uhm.AdvanceWidth / 2, Y: boundsYMax + uvm.TopSideBearing - uvm.AdvanceHeight}, + } + if len(glyf) == 0 { + g.addPhantomsAndScale(len(g.Points), len(g.Points), true, true) + copy(g.phantomPoints[:], g.Points[len(g.Points)-4:]) + g.Points = g.Points[:len(g.Points)-4] + // TODO: also trim g.InFontUnits and g.Unhinted? + return nil + } + + // Load and hint the contours. + if ne < 0 { + if ne != -1 { + // http://developer.apple.com/fonts/TTRefMan/RM06/Chap6glyf.html says that + // "the values -2, -3, and so forth, are reserved for future use." + return UnsupportedError("negative number of contours") + } + pp1x = g.font.scale(g.scale * (boundsXMin - uhm.LeftSideBearing)) + if err := g.loadCompound(recursion, uhm, i, glyf, useMyMetrics); err != nil { + return err + } + } else { + np0, ne0 := len(g.Points), len(g.Ends) + program := g.loadSimple(glyf, ne) + g.addPhantomsAndScale(np0, np0, true, true) + pp1x = g.Points[len(g.Points)-4].X + if g.hinting != font.HintingNone { + if len(program) != 0 { + err := g.hinter.run( + program, + g.Points[np0:], + g.Unhinted[np0:], + g.InFontUnits[np0:], + g.Ends[ne0:], + ) + if err != nil { + return err + } + } + // Drop the four phantom points. + g.InFontUnits = g.InFontUnits[:len(g.InFontUnits)-4] + g.Unhinted = g.Unhinted[:len(g.Unhinted)-4] + } + if useMyMetrics { + copy(g.phantomPoints[:], g.Points[len(g.Points)-4:]) + } + g.Points = g.Points[:len(g.Points)-4] + if np0 != 0 { + // The hinting program expects the []Ends values to be indexed + // relative to the inner glyph, not the outer glyph, so we delay + // adding np0 until after the hinting program (if any) has run. + for i := ne0; i < len(g.Ends); i++ { + g.Ends[i] += np0 + } + } + } + if useMyMetrics && !g.metricsSet { + g.metricsSet = true + g.pp1x = pp1x + } + return nil +} + +// loadOffset is the initial offset for loadSimple and loadCompound. The first +// 10 bytes are the number of contours and the bounding box. +const loadOffset = 10 + +func (g *GlyphBuf) loadSimple(glyf []byte, ne int) (program []byte) { + offset := loadOffset + for i := 0; i < ne; i++ { + g.Ends = append(g.Ends, 1+int(u16(glyf, offset))) + offset += 2 + } + + // Note the TrueType hinting instructions. + instrLen := int(u16(glyf, offset)) + offset += 2 + program = glyf[offset : offset+instrLen] + offset += instrLen + + if ne == 0 { + return program + } + + np0 := len(g.Points) + np1 := np0 + int(g.Ends[len(g.Ends)-1]) + + // Decode the flags. + for i := np0; i < np1; { + c := uint32(glyf[offset]) + offset++ + g.Points = append(g.Points, Point{Flags: c}) + i++ + if c&flagRepeat != 0 { + count := glyf[offset] + offset++ + for ; count > 0; count-- { + g.Points = append(g.Points, Point{Flags: c}) + i++ + } + } + } + + // Decode the co-ordinates. + var x int16 + for i := np0; i < np1; i++ { + f := g.Points[i].Flags + if f&flagXShortVector != 0 { + dx := int16(glyf[offset]) + offset++ + if f&flagPositiveXShortVector == 0 { + x -= dx + } else { + x += dx + } + } else if f&flagThisXIsSame == 0 { + x += int16(u16(glyf, offset)) + offset += 2 + } + g.Points[i].X = fixed.Int26_6(x) + } + var y int16 + for i := np0; i < np1; i++ { + f := g.Points[i].Flags + if f&flagYShortVector != 0 { + dy := int16(glyf[offset]) + offset++ + if f&flagPositiveYShortVector == 0 { + y -= dy + } else { + y += dy + } + } else if f&flagThisYIsSame == 0 { + y += int16(u16(glyf, offset)) + offset += 2 + } + g.Points[i].Y = fixed.Int26_6(y) + } + + return program +} + +func (g *GlyphBuf) loadCompound(recursion uint32, uhm HMetric, i Index, + glyf []byte, useMyMetrics bool) error { + + // Flags for decoding a compound glyph. These flags are documented at + // http://developer.apple.com/fonts/TTRefMan/RM06/Chap6glyf.html. + const ( + flagArg1And2AreWords = 1 << iota + flagArgsAreXYValues + flagRoundXYToGrid + flagWeHaveAScale + flagUnused + flagMoreComponents + flagWeHaveAnXAndYScale + flagWeHaveATwoByTwo + flagWeHaveInstructions + flagUseMyMetrics + flagOverlapCompound + ) + np0, ne0 := len(g.Points), len(g.Ends) + offset := loadOffset + for { + flags := u16(glyf, offset) + component := Index(u16(glyf, offset+2)) + dx, dy, transform, hasTransform := fixed.Int26_6(0), fixed.Int26_6(0), [4]int16{}, false + if flags&flagArg1And2AreWords != 0 { + dx = fixed.Int26_6(int16(u16(glyf, offset+4))) + dy = fixed.Int26_6(int16(u16(glyf, offset+6))) + offset += 8 + } else { + dx = fixed.Int26_6(int16(int8(glyf[offset+4]))) + dy = fixed.Int26_6(int16(int8(glyf[offset+5]))) + offset += 6 + } + if flags&flagArgsAreXYValues == 0 { + return UnsupportedError("compound glyph transform vector") + } + if flags&(flagWeHaveAScale|flagWeHaveAnXAndYScale|flagWeHaveATwoByTwo) != 0 { + hasTransform = true + switch { + case flags&flagWeHaveAScale != 0: + transform[0] = int16(u16(glyf, offset+0)) + transform[3] = transform[0] + offset += 2 + case flags&flagWeHaveAnXAndYScale != 0: + transform[0] = int16(u16(glyf, offset+0)) + transform[3] = int16(u16(glyf, offset+2)) + offset += 4 + case flags&flagWeHaveATwoByTwo != 0: + transform[0] = int16(u16(glyf, offset+0)) + transform[1] = int16(u16(glyf, offset+2)) + transform[2] = int16(u16(glyf, offset+4)) + transform[3] = int16(u16(glyf, offset+6)) + offset += 8 + } + } + savedPP := g.phantomPoints + np0 := len(g.Points) + componentUMM := useMyMetrics && (flags&flagUseMyMetrics != 0) + if err := g.load(recursion+1, component, componentUMM); err != nil { + return err + } + if flags&flagUseMyMetrics == 0 { + g.phantomPoints = savedPP + } + if hasTransform { + for j := np0; j < len(g.Points); j++ { + p := &g.Points[j] + newX := 0 + + fixed.Int26_6((int64(p.X)*int64(transform[0])+1<<13)>>14) + + fixed.Int26_6((int64(p.Y)*int64(transform[2])+1<<13)>>14) + newY := 0 + + fixed.Int26_6((int64(p.X)*int64(transform[1])+1<<13)>>14) + + fixed.Int26_6((int64(p.Y)*int64(transform[3])+1<<13)>>14) + p.X, p.Y = newX, newY + } + } + dx = g.font.scale(g.scale * dx) + dy = g.font.scale(g.scale * dy) + if flags&flagRoundXYToGrid != 0 { + dx = (dx + 32) &^ 63 + dy = (dy + 32) &^ 63 + } + for j := np0; j < len(g.Points); j++ { + p := &g.Points[j] + p.X += dx + p.Y += dy + } + // TODO: also adjust g.InFontUnits and g.Unhinted? + if flags&flagMoreComponents == 0 { + break + } + } + + instrLen := 0 + if g.hinting != font.HintingNone && offset+2 <= len(glyf) { + instrLen = int(u16(glyf, offset)) + offset += 2 + } + + g.addPhantomsAndScale(np0, len(g.Points), false, instrLen > 0) + points, ends := g.Points[np0:], g.Ends[ne0:] + g.Points = g.Points[:len(g.Points)-4] + for j := range points { + points[j].Flags &^= flagTouchedX | flagTouchedY + } + + if instrLen == 0 { + if !g.metricsSet { + copy(g.phantomPoints[:], points[len(points)-4:]) + } + return nil + } + + // Hint the compound glyph. + program := glyf[offset : offset+instrLen] + // Temporarily adjust the ends to be relative to this compound glyph. + if np0 != 0 { + for i := range ends { + ends[i] -= np0 + } + } + // Hinting instructions of a composite glyph completely refer to the + // (already) hinted subglyphs. + g.tmp = append(g.tmp[:0], points...) + if err := g.hinter.run(program, points, g.tmp, g.tmp, ends); err != nil { + return err + } + if np0 != 0 { + for i := range ends { + ends[i] += np0 + } + } + if !g.metricsSet { + copy(g.phantomPoints[:], points[len(points)-4:]) + } + return nil +} + +func (g *GlyphBuf) addPhantomsAndScale(np0, np1 int, simple, adjust bool) { + // Add the four phantom points. + g.Points = append(g.Points, g.phantomPoints[:]...) + // Scale the points. + if simple && g.hinting != font.HintingNone { + g.InFontUnits = append(g.InFontUnits, g.Points[np1:]...) + } + for i := np1; i < len(g.Points); i++ { + p := &g.Points[i] + p.X = g.font.scale(g.scale * p.X) + p.Y = g.font.scale(g.scale * p.Y) + } + if g.hinting == font.HintingNone { + return + } + // Round the 1st phantom point to the grid, shifting all other points equally. + // Note that "all other points" starts from np0, not np1. + // TODO: delete this adjustment and the np0/np1 distinction, when + // we update the compatibility tests to C Freetype 2.5.3. + // See http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=05c786d990390a7ca18e62962641dac740bacb06 + if adjust { + pp1x := g.Points[len(g.Points)-4].X + if dx := ((pp1x + 32) &^ 63) - pp1x; dx != 0 { + for i := np0; i < len(g.Points); i++ { + g.Points[i].X += dx + } + } + } + if simple { + g.Unhinted = append(g.Unhinted, g.Points[np1:]...) + } + // Round the 2nd and 4th phantom point to the grid. + p := &g.Points[len(g.Points)-3] + p.X = (p.X + 32) &^ 63 + p = &g.Points[len(g.Points)-1] + p.Y = (p.Y + 32) &^ 63 +} diff --git a/vendor/github.com/golang/freetype/truetype/hint.go b/vendor/github.com/golang/freetype/truetype/hint.go new file mode 100644 index 0000000..13f785b --- /dev/null +++ b/vendor/github.com/golang/freetype/truetype/hint.go @@ -0,0 +1,1770 @@ +// Copyright 2012 The Freetype-Go Authors. All rights reserved. +// Use of this source code is governed by your choice of either the +// FreeType License or the GNU General Public License version 2 (or +// any later version), both of which can be found in the LICENSE file. + +package truetype + +// This file implements a Truetype bytecode interpreter. +// The opcodes are described at https://developer.apple.com/fonts/TTRefMan/RM05/Chap5.html + +import ( + "errors" + "math" + + "golang.org/x/image/math/fixed" +) + +const ( + twilightZone = 0 + glyphZone = 1 + numZone = 2 +) + +type pointType uint32 + +const ( + current pointType = 0 + unhinted pointType = 1 + inFontUnits pointType = 2 + numPointType = 3 +) + +// callStackEntry is a bytecode call stack entry. +type callStackEntry struct { + program []byte + pc int + loopCount int32 +} + +// hinter implements bytecode hinting. A hinter can be re-used to hint a series +// of glyphs from a Font. +type hinter struct { + stack, store []int32 + + // functions is a map from function number to bytecode. + functions map[int32][]byte + + // font and scale are the font and scale last used for this hinter. + // Changing the font will require running the new font's fpgm bytecode. + // Changing either will require running the font's prep bytecode. + font *Font + scale fixed.Int26_6 + + // gs and defaultGS are the current and default graphics state. The + // default graphics state is the global default graphics state after + // the font's fpgm and prep programs have been run. + gs, defaultGS graphicsState + + // points and ends are the twilight zone's points, glyph's points + // and glyph's contour boundaries. + points [numZone][numPointType][]Point + ends []int + + // scaledCVT is the lazily initialized scaled Control Value Table. + scaledCVTInitialized bool + scaledCVT []fixed.Int26_6 +} + +// graphicsState is described at https://developer.apple.com/fonts/TTRefMan/RM04/Chap4.html +type graphicsState struct { + // Projection vector, freedom vector and dual projection vector. + pv, fv, dv [2]f2dot14 + // Reference points and zone pointers. + rp, zp [3]int32 + // Control Value / Single Width Cut-In. + controlValueCutIn, singleWidthCutIn, singleWidth fixed.Int26_6 + // Delta base / shift. + deltaBase, deltaShift int32 + // Minimum distance. + minDist fixed.Int26_6 + // Loop count. + loop int32 + // Rounding policy. + roundPeriod, roundPhase, roundThreshold fixed.Int26_6 + roundSuper45 bool + // Auto-flip. + autoFlip bool +} + +var globalDefaultGS = graphicsState{ + pv: [2]f2dot14{0x4000, 0}, // Unit vector along the X axis. + fv: [2]f2dot14{0x4000, 0}, + dv: [2]f2dot14{0x4000, 0}, + zp: [3]int32{1, 1, 1}, + controlValueCutIn: (17 << 6) / 16, // 17/16 as a fixed.Int26_6. + deltaBase: 9, + deltaShift: 3, + minDist: 1 << 6, // 1 as a fixed.Int26_6. + loop: 1, + roundPeriod: 1 << 6, // 1 as a fixed.Int26_6. + roundThreshold: 1 << 5, // 1/2 as a fixed.Int26_6. + roundSuper45: false, + autoFlip: true, +} + +func resetTwilightPoints(f *Font, p []Point) []Point { + if n := int(f.maxTwilightPoints) + 4; n <= cap(p) { + p = p[:n] + for i := range p { + p[i] = Point{} + } + } else { + p = make([]Point, n) + } + return p +} + +func (h *hinter) init(f *Font, scale fixed.Int26_6) error { + h.points[twilightZone][0] = resetTwilightPoints(f, h.points[twilightZone][0]) + h.points[twilightZone][1] = resetTwilightPoints(f, h.points[twilightZone][1]) + h.points[twilightZone][2] = resetTwilightPoints(f, h.points[twilightZone][2]) + + rescale := h.scale != scale + if h.font != f { + h.font, rescale = f, true + if h.functions == nil { + h.functions = make(map[int32][]byte) + } else { + for k := range h.functions { + delete(h.functions, k) + } + } + + if x := int(f.maxStackElements); x > len(h.stack) { + x += 255 + x &^= 255 + h.stack = make([]int32, x) + } + if x := int(f.maxStorage); x > len(h.store) { + x += 15 + x &^= 15 + h.store = make([]int32, x) + } + if len(f.fpgm) != 0 { + if err := h.run(f.fpgm, nil, nil, nil, nil); err != nil { + return err + } + } + } + + if rescale { + h.scale = scale + h.scaledCVTInitialized = false + + h.defaultGS = globalDefaultGS + + if len(f.prep) != 0 { + if err := h.run(f.prep, nil, nil, nil, nil); err != nil { + return err + } + h.defaultGS = h.gs + // The MS rasterizer doesn't allow the following graphics state + // variables to be modified by the CVT program. + h.defaultGS.pv = globalDefaultGS.pv + h.defaultGS.fv = globalDefaultGS.fv + h.defaultGS.dv = globalDefaultGS.dv + h.defaultGS.rp = globalDefaultGS.rp + h.defaultGS.zp = globalDefaultGS.zp + h.defaultGS.loop = globalDefaultGS.loop + } + } + return nil +} + +func (h *hinter) run(program []byte, pCurrent, pUnhinted, pInFontUnits []Point, ends []int) error { + h.gs = h.defaultGS + h.points[glyphZone][current] = pCurrent + h.points[glyphZone][unhinted] = pUnhinted + h.points[glyphZone][inFontUnits] = pInFontUnits + h.ends = ends + + if len(program) > 50000 { + return errors.New("truetype: hinting: too many instructions") + } + var ( + steps, pc, top int + opcode uint8 + + callStack [32]callStackEntry + callStackTop int + ) + + for 0 <= pc && pc < len(program) { + steps++ + if steps == 100000 { + return errors.New("truetype: hinting: too many steps") + } + opcode = program[pc] + if top < int(popCount[opcode]) { + return errors.New("truetype: hinting: stack underflow") + } + switch opcode { + + case opSVTCA0: + h.gs.pv = [2]f2dot14{0, 0x4000} + h.gs.fv = [2]f2dot14{0, 0x4000} + h.gs.dv = [2]f2dot14{0, 0x4000} + + case opSVTCA1: + h.gs.pv = [2]f2dot14{0x4000, 0} + h.gs.fv = [2]f2dot14{0x4000, 0} + h.gs.dv = [2]f2dot14{0x4000, 0} + + case opSPVTCA0: + h.gs.pv = [2]f2dot14{0, 0x4000} + h.gs.dv = [2]f2dot14{0, 0x4000} + + case opSPVTCA1: + h.gs.pv = [2]f2dot14{0x4000, 0} + h.gs.dv = [2]f2dot14{0x4000, 0} + + case opSFVTCA0: + h.gs.fv = [2]f2dot14{0, 0x4000} + + case opSFVTCA1: + h.gs.fv = [2]f2dot14{0x4000, 0} + + case opSPVTL0, opSPVTL1, opSFVTL0, opSFVTL1: + top -= 2 + p1 := h.point(0, current, h.stack[top+0]) + p2 := h.point(0, current, h.stack[top+1]) + if p1 == nil || p2 == nil { + return errors.New("truetype: hinting: point out of range") + } + dx := f2dot14(p1.X - p2.X) + dy := f2dot14(p1.Y - p2.Y) + if dx == 0 && dy == 0 { + dx = 0x4000 + } else if opcode&1 != 0 { + // Counter-clockwise rotation. + dx, dy = -dy, dx + } + v := normalize(dx, dy) + if opcode < opSFVTL0 { + h.gs.pv = v + h.gs.dv = v + } else { + h.gs.fv = v + } + + case opSPVFS: + top -= 2 + h.gs.pv = normalize(f2dot14(h.stack[top]), f2dot14(h.stack[top+1])) + h.gs.dv = h.gs.pv + + case opSFVFS: + top -= 2 + h.gs.fv = normalize(f2dot14(h.stack[top]), f2dot14(h.stack[top+1])) + + case opGPV: + if top+1 >= len(h.stack) { + return errors.New("truetype: hinting: stack overflow") + } + h.stack[top+0] = int32(h.gs.pv[0]) + h.stack[top+1] = int32(h.gs.pv[1]) + top += 2 + + case opGFV: + if top+1 >= len(h.stack) { + return errors.New("truetype: hinting: stack overflow") + } + h.stack[top+0] = int32(h.gs.fv[0]) + h.stack[top+1] = int32(h.gs.fv[1]) + top += 2 + + case opSFVTPV: + h.gs.fv = h.gs.pv + + case opISECT: + top -= 5 + p := h.point(2, current, h.stack[top+0]) + a0 := h.point(1, current, h.stack[top+1]) + a1 := h.point(1, current, h.stack[top+2]) + b0 := h.point(0, current, h.stack[top+3]) + b1 := h.point(0, current, h.stack[top+4]) + if p == nil || a0 == nil || a1 == nil || b0 == nil || b1 == nil { + return errors.New("truetype: hinting: point out of range") + } + + dbx := b1.X - b0.X + dby := b1.Y - b0.Y + dax := a1.X - a0.X + day := a1.Y - a0.Y + dx := b0.X - a0.X + dy := b0.Y - a0.Y + discriminant := mulDiv(int64(dax), int64(-dby), 0x40) + + mulDiv(int64(day), int64(dbx), 0x40) + dotProduct := mulDiv(int64(dax), int64(dbx), 0x40) + + mulDiv(int64(day), int64(dby), 0x40) + // The discriminant above is actually a cross product of vectors + // da and db. Together with the dot product, they can be used as + // surrogates for sine and cosine of the angle between the vectors. + // Indeed, + // dotproduct = |da||db|cos(angle) + // discriminant = |da||db|sin(angle) + // We use these equations to reject grazing intersections by + // thresholding abs(tan(angle)) at 1/19, corresponding to 3 degrees. + absDisc, absDotP := discriminant, dotProduct + if absDisc < 0 { + absDisc = -absDisc + } + if absDotP < 0 { + absDotP = -absDotP + } + if 19*absDisc > absDotP { + val := mulDiv(int64(dx), int64(-dby), 0x40) + + mulDiv(int64(dy), int64(dbx), 0x40) + rx := mulDiv(val, int64(dax), discriminant) + ry := mulDiv(val, int64(day), discriminant) + p.X = a0.X + fixed.Int26_6(rx) + p.Y = a0.Y + fixed.Int26_6(ry) + } else { + p.X = (a0.X + a1.X + b0.X + b1.X) / 4 + p.Y = (a0.Y + a1.Y + b0.Y + b1.Y) / 4 + } + p.Flags |= flagTouchedX | flagTouchedY + + case opSRP0, opSRP1, opSRP2: + top-- + h.gs.rp[opcode-opSRP0] = h.stack[top] + + case opSZP0, opSZP1, opSZP2: + top-- + h.gs.zp[opcode-opSZP0] = h.stack[top] + + case opSZPS: + top-- + h.gs.zp[0] = h.stack[top] + h.gs.zp[1] = h.stack[top] + h.gs.zp[2] = h.stack[top] + + case opSLOOP: + top-- + // https://developer.apple.com/fonts/TrueType-Reference-Manual/RM05/Chap5.html#SLOOP + // says that "Setting the loop variable to zero is an error". In + // theory, the inequality on the next line should be "<=" instead + // of "<". In practice, some font files' bytecode, such as the '2' + // glyph in the DejaVuSansMono.ttf that comes with Ubuntu 14.04, + // issue SLOOP with a zero on top of the stack. Just like the C + // Freetype code, we allow the zero. + if h.stack[top] < 0 { + return errors.New("truetype: hinting: invalid data") + } + h.gs.loop = h.stack[top] + + case opRTG: + h.gs.roundPeriod = 1 << 6 + h.gs.roundPhase = 0 + h.gs.roundThreshold = 1 << 5 + h.gs.roundSuper45 = false + + case opRTHG: + h.gs.roundPeriod = 1 << 6 + h.gs.roundPhase = 1 << 5 + h.gs.roundThreshold = 1 << 5 + h.gs.roundSuper45 = false + + case opSMD: + top-- + h.gs.minDist = fixed.Int26_6(h.stack[top]) + + case opELSE: + opcode = 1 + goto ifelse + + case opJMPR: + top-- + pc += int(h.stack[top]) + continue + + case opSCVTCI: + top-- + h.gs.controlValueCutIn = fixed.Int26_6(h.stack[top]) + + case opSSWCI: + top-- + h.gs.singleWidthCutIn = fixed.Int26_6(h.stack[top]) + + case opSSW: + top-- + h.gs.singleWidth = h.font.scale(h.scale * fixed.Int26_6(h.stack[top])) + + case opDUP: + if top >= len(h.stack) { + return errors.New("truetype: hinting: stack overflow") + } + h.stack[top] = h.stack[top-1] + top++ + + case opPOP: + top-- + + case opCLEAR: + top = 0 + + case opSWAP: + h.stack[top-1], h.stack[top-2] = h.stack[top-2], h.stack[top-1] + + case opDEPTH: + if top >= len(h.stack) { + return errors.New("truetype: hinting: stack overflow") + } + h.stack[top] = int32(top) + top++ + + case opCINDEX, opMINDEX: + x := int(h.stack[top-1]) + if x <= 0 || x >= top { + return errors.New("truetype: hinting: invalid data") + } + h.stack[top-1] = h.stack[top-1-x] + if opcode == opMINDEX { + copy(h.stack[top-1-x:top-1], h.stack[top-x:top]) + top-- + } + + case opALIGNPTS: + top -= 2 + p := h.point(1, current, h.stack[top]) + q := h.point(0, current, h.stack[top+1]) + if p == nil || q == nil { + return errors.New("truetype: hinting: point out of range") + } + d := dotProduct(fixed.Int26_6(q.X-p.X), fixed.Int26_6(q.Y-p.Y), h.gs.pv) / 2 + h.move(p, +d, true) + h.move(q, -d, true) + + case opUTP: + top-- + p := h.point(0, current, h.stack[top]) + if p == nil { + return errors.New("truetype: hinting: point out of range") + } + p.Flags &^= flagTouchedX | flagTouchedY + + case opLOOPCALL, opCALL: + if callStackTop >= len(callStack) { + return errors.New("truetype: hinting: call stack overflow") + } + top-- + f, ok := h.functions[h.stack[top]] + if !ok { + return errors.New("truetype: hinting: undefined function") + } + callStack[callStackTop] = callStackEntry{program, pc, 1} + if opcode == opLOOPCALL { + top-- + if h.stack[top] == 0 { + break + } + callStack[callStackTop].loopCount = h.stack[top] + } + callStackTop++ + program, pc = f, 0 + continue + + case opFDEF: + // Save all bytecode up until the next ENDF. + startPC := pc + 1 + fdefloop: + for { + pc++ + if pc >= len(program) { + return errors.New("truetype: hinting: unbalanced FDEF") + } + switch program[pc] { + case opFDEF: + return errors.New("truetype: hinting: nested FDEF") + case opENDF: + top-- + h.functions[h.stack[top]] = program[startPC : pc+1] + break fdefloop + default: + var ok bool + pc, ok = skipInstructionPayload(program, pc) + if !ok { + return errors.New("truetype: hinting: unbalanced FDEF") + } + } + } + + case opENDF: + if callStackTop == 0 { + return errors.New("truetype: hinting: call stack underflow") + } + callStackTop-- + callStack[callStackTop].loopCount-- + if callStack[callStackTop].loopCount != 0 { + callStackTop++ + pc = 0 + continue + } + program, pc = callStack[callStackTop].program, callStack[callStackTop].pc + + case opMDAP0, opMDAP1: + top-- + i := h.stack[top] + p := h.point(0, current, i) + if p == nil { + return errors.New("truetype: hinting: point out of range") + } + distance := fixed.Int26_6(0) + if opcode == opMDAP1 { + distance = dotProduct(p.X, p.Y, h.gs.pv) + // TODO: metrics compensation. + distance = h.round(distance) - distance + } + h.move(p, distance, true) + h.gs.rp[0] = i + h.gs.rp[1] = i + + case opIUP0, opIUP1: + iupY, mask := opcode == opIUP0, uint32(flagTouchedX) + if iupY { + mask = flagTouchedY + } + prevEnd := 0 + for _, end := range h.ends { + for i := prevEnd; i < end; i++ { + for i < end && h.points[glyphZone][current][i].Flags&mask == 0 { + i++ + } + if i == end { + break + } + firstTouched, curTouched := i, i + i++ + for ; i < end; i++ { + if h.points[glyphZone][current][i].Flags&mask != 0 { + h.iupInterp(iupY, curTouched+1, i-1, curTouched, i) + curTouched = i + } + } + if curTouched == firstTouched { + h.iupShift(iupY, prevEnd, end, curTouched) + } else { + h.iupInterp(iupY, curTouched+1, end-1, curTouched, firstTouched) + if firstTouched > 0 { + h.iupInterp(iupY, prevEnd, firstTouched-1, curTouched, firstTouched) + } + } + } + prevEnd = end + } + + case opSHP0, opSHP1: + if top < int(h.gs.loop) { + return errors.New("truetype: hinting: stack underflow") + } + _, _, d, ok := h.displacement(opcode&1 == 0) + if !ok { + return errors.New("truetype: hinting: point out of range") + } + for ; h.gs.loop != 0; h.gs.loop-- { + top-- + p := h.point(2, current, h.stack[top]) + if p == nil { + return errors.New("truetype: hinting: point out of range") + } + h.move(p, d, true) + } + h.gs.loop = 1 + + case opSHC0, opSHC1: + top-- + zonePointer, i, d, ok := h.displacement(opcode&1 == 0) + if !ok { + return errors.New("truetype: hinting: point out of range") + } + if h.gs.zp[2] == 0 { + // TODO: implement this when we have a glyph that does this. + return errors.New("hinting: unimplemented SHC instruction") + } + contour := h.stack[top] + if contour < 0 || len(ends) <= int(contour) { + return errors.New("truetype: hinting: contour out of range") + } + j0, j1 := int32(0), int32(h.ends[contour]) + if contour > 0 { + j0 = int32(h.ends[contour-1]) + } + move := h.gs.zp[zonePointer] != h.gs.zp[2] + for j := j0; j < j1; j++ { + if move || j != i { + h.move(h.point(2, current, j), d, true) + } + } + + case opSHZ0, opSHZ1: + top-- + zonePointer, i, d, ok := h.displacement(opcode&1 == 0) + if !ok { + return errors.New("truetype: hinting: point out of range") + } + + // As per C Freetype, SHZ doesn't move the phantom points, or mark + // the points as touched. + limit := int32(len(h.points[h.gs.zp[2]][current])) + if h.gs.zp[2] == glyphZone { + limit -= 4 + } + for j := int32(0); j < limit; j++ { + if i != j || h.gs.zp[zonePointer] != h.gs.zp[2] { + h.move(h.point(2, current, j), d, false) + } + } + + case opSHPIX: + top-- + d := fixed.Int26_6(h.stack[top]) + if top < int(h.gs.loop) { + return errors.New("truetype: hinting: stack underflow") + } + for ; h.gs.loop != 0; h.gs.loop-- { + top-- + p := h.point(2, current, h.stack[top]) + if p == nil { + return errors.New("truetype: hinting: point out of range") + } + h.move(p, d, true) + } + h.gs.loop = 1 + + case opIP: + if top < int(h.gs.loop) { + return errors.New("truetype: hinting: stack underflow") + } + pointType := inFontUnits + twilight := h.gs.zp[0] == 0 || h.gs.zp[1] == 0 || h.gs.zp[2] == 0 + if twilight { + pointType = unhinted + } + p := h.point(1, pointType, h.gs.rp[2]) + oldP := h.point(0, pointType, h.gs.rp[1]) + oldRange := dotProduct(p.X-oldP.X, p.Y-oldP.Y, h.gs.dv) + + p = h.point(1, current, h.gs.rp[2]) + curP := h.point(0, current, h.gs.rp[1]) + curRange := dotProduct(p.X-curP.X, p.Y-curP.Y, h.gs.pv) + for ; h.gs.loop != 0; h.gs.loop-- { + top-- + i := h.stack[top] + p = h.point(2, pointType, i) + oldDist := dotProduct(p.X-oldP.X, p.Y-oldP.Y, h.gs.dv) + p = h.point(2, current, i) + curDist := dotProduct(p.X-curP.X, p.Y-curP.Y, h.gs.pv) + newDist := fixed.Int26_6(0) + if oldDist != 0 { + if oldRange != 0 { + newDist = fixed.Int26_6(mulDiv(int64(oldDist), int64(curRange), int64(oldRange))) + } else { + newDist = -oldDist + } + } + h.move(p, newDist-curDist, true) + } + h.gs.loop = 1 + + case opMSIRP0, opMSIRP1: + top -= 2 + i := h.stack[top] + distance := fixed.Int26_6(h.stack[top+1]) + + // TODO: special case h.gs.zp[1] == 0 in C Freetype. + ref := h.point(0, current, h.gs.rp[0]) + p := h.point(1, current, i) + if ref == nil || p == nil { + return errors.New("truetype: hinting: point out of range") + } + curDist := dotProduct(p.X-ref.X, p.Y-ref.Y, h.gs.pv) + + // Set-RP0 bit. + if opcode == opMSIRP1 { + h.gs.rp[0] = i + } + h.gs.rp[1] = h.gs.rp[0] + h.gs.rp[2] = i + + // Move the point. + h.move(p, distance-curDist, true) + + case opALIGNRP: + if top < int(h.gs.loop) { + return errors.New("truetype: hinting: stack underflow") + } + ref := h.point(0, current, h.gs.rp[0]) + if ref == nil { + return errors.New("truetype: hinting: point out of range") + } + for ; h.gs.loop != 0; h.gs.loop-- { + top-- + p := h.point(1, current, h.stack[top]) + if p == nil { + return errors.New("truetype: hinting: point out of range") + } + h.move(p, -dotProduct(p.X-ref.X, p.Y-ref.Y, h.gs.pv), true) + } + h.gs.loop = 1 + + case opRTDG: + h.gs.roundPeriod = 1 << 5 + h.gs.roundPhase = 0 + h.gs.roundThreshold = 1 << 4 + h.gs.roundSuper45 = false + + case opMIAP0, opMIAP1: + top -= 2 + i := h.stack[top] + distance := h.getScaledCVT(h.stack[top+1]) + if h.gs.zp[0] == 0 { + p := h.point(0, unhinted, i) + q := h.point(0, current, i) + p.X = fixed.Int26_6((int64(distance) * int64(h.gs.fv[0])) >> 14) + p.Y = fixed.Int26_6((int64(distance) * int64(h.gs.fv[1])) >> 14) + *q = *p + } + p := h.point(0, current, i) + oldDist := dotProduct(p.X, p.Y, h.gs.pv) + if opcode == opMIAP1 { + if fabs(distance-oldDist) > h.gs.controlValueCutIn { + distance = oldDist + } + // TODO: metrics compensation. + distance = h.round(distance) + } + h.move(p, distance-oldDist, true) + h.gs.rp[0] = i + h.gs.rp[1] = i + + case opNPUSHB: + opcode = 0 + goto push + + case opNPUSHW: + opcode = 0x80 + goto push + + case opWS: + top -= 2 + i := int(h.stack[top]) + if i < 0 || len(h.store) <= i { + return errors.New("truetype: hinting: invalid data") + } + h.store[i] = h.stack[top+1] + + case opRS: + i := int(h.stack[top-1]) + if i < 0 || len(h.store) <= i { + return errors.New("truetype: hinting: invalid data") + } + h.stack[top-1] = h.store[i] + + case opWCVTP: + top -= 2 + h.setScaledCVT(h.stack[top], fixed.Int26_6(h.stack[top+1])) + + case opRCVT: + h.stack[top-1] = int32(h.getScaledCVT(h.stack[top-1])) + + case opGC0, opGC1: + i := h.stack[top-1] + if opcode == opGC0 { + p := h.point(2, current, i) + h.stack[top-1] = int32(dotProduct(p.X, p.Y, h.gs.pv)) + } else { + p := h.point(2, unhinted, i) + // Using dv as per C Freetype. + h.stack[top-1] = int32(dotProduct(p.X, p.Y, h.gs.dv)) + } + + case opSCFS: + top -= 2 + i := h.stack[top] + p := h.point(2, current, i) + if p == nil { + return errors.New("truetype: hinting: point out of range") + } + c := dotProduct(p.X, p.Y, h.gs.pv) + h.move(p, fixed.Int26_6(h.stack[top+1])-c, true) + if h.gs.zp[2] != 0 { + break + } + q := h.point(2, unhinted, i) + if q == nil { + return errors.New("truetype: hinting: point out of range") + } + q.X = p.X + q.Y = p.Y + + case opMD0, opMD1: + top-- + pt, v, scale := pointType(0), [2]f2dot14{}, false + if opcode == opMD0 { + pt = current + v = h.gs.pv + } else if h.gs.zp[0] == 0 || h.gs.zp[1] == 0 { + pt = unhinted + v = h.gs.dv + } else { + pt = inFontUnits + v = h.gs.dv + scale = true + } + p := h.point(0, pt, h.stack[top-1]) + q := h.point(1, pt, h.stack[top]) + if p == nil || q == nil { + return errors.New("truetype: hinting: point out of range") + } + d := int32(dotProduct(p.X-q.X, p.Y-q.Y, v)) + if scale { + d = int32(int64(d*int32(h.scale)) / int64(h.font.fUnitsPerEm)) + } + h.stack[top-1] = d + + case opMPPEM, opMPS: + if top >= len(h.stack) { + return errors.New("truetype: hinting: stack overflow") + } + // For MPS, point size should be irrelevant; we return the PPEM. + h.stack[top] = int32(h.scale) >> 6 + top++ + + case opFLIPON, opFLIPOFF: + h.gs.autoFlip = opcode == opFLIPON + + case opDEBUG: + // No-op. + + case opLT: + top-- + h.stack[top-1] = bool2int32(h.stack[top-1] < h.stack[top]) + + case opLTEQ: + top-- + h.stack[top-1] = bool2int32(h.stack[top-1] <= h.stack[top]) + + case opGT: + top-- + h.stack[top-1] = bool2int32(h.stack[top-1] > h.stack[top]) + + case opGTEQ: + top-- + h.stack[top-1] = bool2int32(h.stack[top-1] >= h.stack[top]) + + case opEQ: + top-- + h.stack[top-1] = bool2int32(h.stack[top-1] == h.stack[top]) + + case opNEQ: + top-- + h.stack[top-1] = bool2int32(h.stack[top-1] != h.stack[top]) + + case opODD, opEVEN: + i := h.round(fixed.Int26_6(h.stack[top-1])) >> 6 + h.stack[top-1] = int32(i&1) ^ int32(opcode-opODD) + + case opIF: + top-- + if h.stack[top] == 0 { + opcode = 0 + goto ifelse + } + + case opEIF: + // No-op. + + case opAND: + top-- + h.stack[top-1] = bool2int32(h.stack[top-1] != 0 && h.stack[top] != 0) + + case opOR: + top-- + h.stack[top-1] = bool2int32(h.stack[top-1]|h.stack[top] != 0) + + case opNOT: + h.stack[top-1] = bool2int32(h.stack[top-1] == 0) + + case opDELTAP1: + goto delta + + case opSDB: + top-- + h.gs.deltaBase = h.stack[top] + + case opSDS: + top-- + h.gs.deltaShift = h.stack[top] + + case opADD: + top-- + h.stack[top-1] += h.stack[top] + + case opSUB: + top-- + h.stack[top-1] -= h.stack[top] + + case opDIV: + top-- + if h.stack[top] == 0 { + return errors.New("truetype: hinting: division by zero") + } + h.stack[top-1] = int32(fdiv(fixed.Int26_6(h.stack[top-1]), fixed.Int26_6(h.stack[top]))) + + case opMUL: + top-- + h.stack[top-1] = int32(fmul(fixed.Int26_6(h.stack[top-1]), fixed.Int26_6(h.stack[top]))) + + case opABS: + if h.stack[top-1] < 0 { + h.stack[top-1] = -h.stack[top-1] + } + + case opNEG: + h.stack[top-1] = -h.stack[top-1] + + case opFLOOR: + h.stack[top-1] &^= 63 + + case opCEILING: + h.stack[top-1] += 63 + h.stack[top-1] &^= 63 + + case opROUND00, opROUND01, opROUND10, opROUND11: + // The four flavors of opROUND are equivalent. See the comment below on + // opNROUND for the rationale. + h.stack[top-1] = int32(h.round(fixed.Int26_6(h.stack[top-1]))) + + case opNROUND00, opNROUND01, opNROUND10, opNROUND11: + // No-op. The spec says to add one of four "compensations for the engine + // characteristics", to cater for things like "different dot-size printers". + // https://developer.apple.com/fonts/TTRefMan/RM02/Chap2.html#engine_compensation + // This code does not implement engine compensation, as we don't expect to + // be used to output on dot-matrix printers. + + case opWCVTF: + top -= 2 + h.setScaledCVT(h.stack[top], h.font.scale(h.scale*fixed.Int26_6(h.stack[top+1]))) + + case opDELTAP2, opDELTAP3, opDELTAC1, opDELTAC2, opDELTAC3: + goto delta + + case opSROUND, opS45ROUND: + top-- + switch (h.stack[top] >> 6) & 0x03 { + case 0: + h.gs.roundPeriod = 1 << 5 + case 1, 3: + h.gs.roundPeriod = 1 << 6 + case 2: + h.gs.roundPeriod = 1 << 7 + } + h.gs.roundSuper45 = opcode == opS45ROUND + if h.gs.roundSuper45 { + // The spec says to multiply by √2, but the C Freetype code says 1/√2. + // We go with 1/√2. + h.gs.roundPeriod *= 46341 + h.gs.roundPeriod /= 65536 + } + h.gs.roundPhase = h.gs.roundPeriod * fixed.Int26_6((h.stack[top]>>4)&0x03) / 4 + if x := h.stack[top] & 0x0f; x != 0 { + h.gs.roundThreshold = h.gs.roundPeriod * fixed.Int26_6(x-4) / 8 + } else { + h.gs.roundThreshold = h.gs.roundPeriod - 1 + } + + case opJROT: + top -= 2 + if h.stack[top+1] != 0 { + pc += int(h.stack[top]) + continue + } + + case opJROF: + top -= 2 + if h.stack[top+1] == 0 { + pc += int(h.stack[top]) + continue + } + + case opROFF: + h.gs.roundPeriod = 0 + h.gs.roundPhase = 0 + h.gs.roundThreshold = 0 + h.gs.roundSuper45 = false + + case opRUTG: + h.gs.roundPeriod = 1 << 6 + h.gs.roundPhase = 0 + h.gs.roundThreshold = 1<<6 - 1 + h.gs.roundSuper45 = false + + case opRDTG: + h.gs.roundPeriod = 1 << 6 + h.gs.roundPhase = 0 + h.gs.roundThreshold = 0 + h.gs.roundSuper45 = false + + case opSANGW, opAA: + // These ops are "anachronistic" and no longer used. + top-- + + case opFLIPPT: + if top < int(h.gs.loop) { + return errors.New("truetype: hinting: stack underflow") + } + points := h.points[glyphZone][current] + for ; h.gs.loop != 0; h.gs.loop-- { + top-- + i := h.stack[top] + if i < 0 || len(points) <= int(i) { + return errors.New("truetype: hinting: point out of range") + } + points[i].Flags ^= flagOnCurve + } + h.gs.loop = 1 + + case opFLIPRGON, opFLIPRGOFF: + top -= 2 + i, j, points := h.stack[top], h.stack[top+1], h.points[glyphZone][current] + if i < 0 || len(points) <= int(i) || j < 0 || len(points) <= int(j) { + return errors.New("truetype: hinting: point out of range") + } + for ; i <= j; i++ { + if opcode == opFLIPRGON { + points[i].Flags |= flagOnCurve + } else { + points[i].Flags &^= flagOnCurve + } + } + + case opSCANCTRL: + // We do not support dropout control, as we always rasterize grayscale glyphs. + top-- + + case opSDPVTL0, opSDPVTL1: + top -= 2 + for i := 0; i < 2; i++ { + pt := unhinted + if i != 0 { + pt = current + } + p := h.point(1, pt, h.stack[top]) + q := h.point(2, pt, h.stack[top+1]) + if p == nil || q == nil { + return errors.New("truetype: hinting: point out of range") + } + dx := f2dot14(p.X - q.X) + dy := f2dot14(p.Y - q.Y) + if dx == 0 && dy == 0 { + dx = 0x4000 + } else if opcode&1 != 0 { + // Counter-clockwise rotation. + dx, dy = -dy, dx + } + if i == 0 { + h.gs.dv = normalize(dx, dy) + } else { + h.gs.pv = normalize(dx, dy) + } + } + + case opGETINFO: + res := int32(0) + if h.stack[top-1]&(1<<0) != 0 { + // Set the engine version. We hard-code this to 35, the same as + // the C freetype code, which says that "Version~35 corresponds + // to MS rasterizer v.1.7 as used e.g. in Windows~98". + res |= 35 + } + if h.stack[top-1]&(1<<5) != 0 { + // Set that we support grayscale. + res |= 1 << 12 + } + // We set no other bits, as we do not support rotated or stretched glyphs. + h.stack[top-1] = res + + case opIDEF: + // IDEF is for ancient versions of the bytecode interpreter, and is no longer used. + return errors.New("truetype: hinting: unsupported IDEF instruction") + + case opROLL: + h.stack[top-1], h.stack[top-3], h.stack[top-2] = + h.stack[top-3], h.stack[top-2], h.stack[top-1] + + case opMAX: + top-- + if h.stack[top-1] < h.stack[top] { + h.stack[top-1] = h.stack[top] + } + + case opMIN: + top-- + if h.stack[top-1] > h.stack[top] { + h.stack[top-1] = h.stack[top] + } + + case opSCANTYPE: + // We do not support dropout control, as we always rasterize grayscale glyphs. + top-- + + case opINSTCTRL: + // TODO: support instruction execution control? It seems rare, and even when + // nominally used (e.g. Source Sans Pro), it seems conditional on extreme or + // unusual rasterization conditions. For example, the code snippet at + // https://developer.apple.com/fonts/TTRefMan/RM05/Chap5.html#INSTCTRL + // uses INSTCTRL when grid-fitting a rotated or stretched glyph, but + // freetype-go does not support rotated or stretched glyphs. + top -= 2 + + default: + if opcode < opPUSHB000 { + return errors.New("truetype: hinting: unrecognized instruction") + } + + if opcode < opMDRP00000 { + // PUSHxxxx opcode. + + if opcode < opPUSHW000 { + opcode -= opPUSHB000 - 1 + } else { + opcode -= opPUSHW000 - 1 - 0x80 + } + goto push + } + + if opcode < opMIRP00000 { + // MDRPxxxxx opcode. + + top-- + i := h.stack[top] + ref := h.point(0, current, h.gs.rp[0]) + p := h.point(1, current, i) + if ref == nil || p == nil { + return errors.New("truetype: hinting: point out of range") + } + + oldDist := fixed.Int26_6(0) + if h.gs.zp[0] == 0 || h.gs.zp[1] == 0 { + p0 := h.point(1, unhinted, i) + p1 := h.point(0, unhinted, h.gs.rp[0]) + oldDist = dotProduct(p0.X-p1.X, p0.Y-p1.Y, h.gs.dv) + } else { + p0 := h.point(1, inFontUnits, i) + p1 := h.point(0, inFontUnits, h.gs.rp[0]) + oldDist = dotProduct(p0.X-p1.X, p0.Y-p1.Y, h.gs.dv) + oldDist = h.font.scale(h.scale * oldDist) + } + + // Single-width cut-in test. + if x := fabs(oldDist - h.gs.singleWidth); x < h.gs.singleWidthCutIn { + if oldDist >= 0 { + oldDist = +h.gs.singleWidth + } else { + oldDist = -h.gs.singleWidth + } + } + + // Rounding bit. + // TODO: metrics compensation. + distance := oldDist + if opcode&0x04 != 0 { + distance = h.round(oldDist) + } + + // Minimum distance bit. + if opcode&0x08 != 0 { + if oldDist >= 0 { + if distance < h.gs.minDist { + distance = h.gs.minDist + } + } else { + if distance > -h.gs.minDist { + distance = -h.gs.minDist + } + } + } + + // Set-RP0 bit. + h.gs.rp[1] = h.gs.rp[0] + h.gs.rp[2] = i + if opcode&0x10 != 0 { + h.gs.rp[0] = i + } + + // Move the point. + oldDist = dotProduct(p.X-ref.X, p.Y-ref.Y, h.gs.pv) + h.move(p, distance-oldDist, true) + + } else { + // MIRPxxxxx opcode. + + top -= 2 + i := h.stack[top] + cvtDist := h.getScaledCVT(h.stack[top+1]) + if fabs(cvtDist-h.gs.singleWidth) < h.gs.singleWidthCutIn { + if cvtDist >= 0 { + cvtDist = +h.gs.singleWidth + } else { + cvtDist = -h.gs.singleWidth + } + } + + if h.gs.zp[1] == 0 { + // TODO: implement once we have a .ttf file that triggers + // this, so that we can step through C's freetype. + return errors.New("truetype: hinting: unimplemented twilight point adjustment") + } + + ref := h.point(0, unhinted, h.gs.rp[0]) + p := h.point(1, unhinted, i) + if ref == nil || p == nil { + return errors.New("truetype: hinting: point out of range") + } + oldDist := dotProduct(p.X-ref.X, p.Y-ref.Y, h.gs.dv) + + ref = h.point(0, current, h.gs.rp[0]) + p = h.point(1, current, i) + if ref == nil || p == nil { + return errors.New("truetype: hinting: point out of range") + } + curDist := dotProduct(p.X-ref.X, p.Y-ref.Y, h.gs.pv) + + if h.gs.autoFlip && oldDist^cvtDist < 0 { + cvtDist = -cvtDist + } + + // Rounding bit. + // TODO: metrics compensation. + distance := cvtDist + if opcode&0x04 != 0 { + // The CVT value is only used if close enough to oldDist. + if (h.gs.zp[0] == h.gs.zp[1]) && + (fabs(cvtDist-oldDist) > h.gs.controlValueCutIn) { + + distance = oldDist + } + distance = h.round(distance) + } + + // Minimum distance bit. + if opcode&0x08 != 0 { + if oldDist >= 0 { + if distance < h.gs.minDist { + distance = h.gs.minDist + } + } else { + if distance > -h.gs.minDist { + distance = -h.gs.minDist + } + } + } + + // Set-RP0 bit. + h.gs.rp[1] = h.gs.rp[0] + h.gs.rp[2] = i + if opcode&0x10 != 0 { + h.gs.rp[0] = i + } + + // Move the point. + h.move(p, distance-curDist, true) + } + } + pc++ + continue + + ifelse: + // Skip past bytecode until the next ELSE (if opcode == 0) or the + // next EIF (for all opcodes). Opcode == 0 means that we have come + // from an IF. Opcode == 1 means that we have come from an ELSE. + { + ifelseloop: + for depth := 0; ; { + pc++ + if pc >= len(program) { + return errors.New("truetype: hinting: unbalanced IF or ELSE") + } + switch program[pc] { + case opIF: + depth++ + case opELSE: + if depth == 0 && opcode == 0 { + break ifelseloop + } + case opEIF: + depth-- + if depth < 0 { + break ifelseloop + } + default: + var ok bool + pc, ok = skipInstructionPayload(program, pc) + if !ok { + return errors.New("truetype: hinting: unbalanced IF or ELSE") + } + } + } + pc++ + continue + } + + push: + // Push n elements from the program to the stack, where n is the low 7 bits of + // opcode. If the low 7 bits are zero, then n is the next byte from the program. + // The high bit being 0 means that the elements are zero-extended bytes. + // The high bit being 1 means that the elements are sign-extended words. + { + width := 1 + if opcode&0x80 != 0 { + opcode &^= 0x80 + width = 2 + } + if opcode == 0 { + pc++ + if pc >= len(program) { + return errors.New("truetype: hinting: insufficient data") + } + opcode = program[pc] + } + pc++ + if top+int(opcode) > len(h.stack) { + return errors.New("truetype: hinting: stack overflow") + } + if pc+width*int(opcode) > len(program) { + return errors.New("truetype: hinting: insufficient data") + } + for ; opcode > 0; opcode-- { + if width == 1 { + h.stack[top] = int32(program[pc]) + } else { + h.stack[top] = int32(int8(program[pc]))<<8 | int32(program[pc+1]) + } + top++ + pc += width + } + continue + } + + delta: + { + if opcode >= opDELTAC1 && !h.scaledCVTInitialized { + h.initializeScaledCVT() + } + top-- + n := h.stack[top] + if int32(top) < 2*n { + return errors.New("truetype: hinting: stack underflow") + } + for ; n > 0; n-- { + top -= 2 + b := h.stack[top] + c := (b & 0xf0) >> 4 + switch opcode { + case opDELTAP2, opDELTAC2: + c += 16 + case opDELTAP3, opDELTAC3: + c += 32 + } + c += h.gs.deltaBase + if ppem := (int32(h.scale) + 1<<5) >> 6; ppem != c { + continue + } + b = (b & 0x0f) - 8 + if b >= 0 { + b++ + } + b = b * 64 / (1 << uint32(h.gs.deltaShift)) + if opcode >= opDELTAC1 { + a := h.stack[top+1] + if a < 0 || len(h.scaledCVT) <= int(a) { + return errors.New("truetype: hinting: index out of range") + } + h.scaledCVT[a] += fixed.Int26_6(b) + } else { + p := h.point(0, current, h.stack[top+1]) + if p == nil { + return errors.New("truetype: hinting: point out of range") + } + h.move(p, fixed.Int26_6(b), true) + } + } + pc++ + continue + } + } + return nil +} + +func (h *hinter) initializeScaledCVT() { + h.scaledCVTInitialized = true + if n := len(h.font.cvt) / 2; n <= cap(h.scaledCVT) { + h.scaledCVT = h.scaledCVT[:n] + } else { + if n < 32 { + n = 32 + } + h.scaledCVT = make([]fixed.Int26_6, len(h.font.cvt)/2, n) + } + for i := range h.scaledCVT { + unscaled := uint16(h.font.cvt[2*i])<<8 | uint16(h.font.cvt[2*i+1]) + h.scaledCVT[i] = h.font.scale(h.scale * fixed.Int26_6(int16(unscaled))) + } +} + +// getScaledCVT returns the scaled value from the font's Control Value Table. +func (h *hinter) getScaledCVT(i int32) fixed.Int26_6 { + if !h.scaledCVTInitialized { + h.initializeScaledCVT() + } + if i < 0 || len(h.scaledCVT) <= int(i) { + return 0 + } + return h.scaledCVT[i] +} + +// setScaledCVT overrides the scaled value from the font's Control Value Table. +func (h *hinter) setScaledCVT(i int32, v fixed.Int26_6) { + if !h.scaledCVTInitialized { + h.initializeScaledCVT() + } + if i < 0 || len(h.scaledCVT) <= int(i) { + return + } + h.scaledCVT[i] = v +} + +func (h *hinter) point(zonePointer uint32, pt pointType, i int32) *Point { + points := h.points[h.gs.zp[zonePointer]][pt] + if i < 0 || len(points) <= int(i) { + return nil + } + return &points[i] +} + +func (h *hinter) move(p *Point, distance fixed.Int26_6, touch bool) { + fvx := int64(h.gs.fv[0]) + pvx := int64(h.gs.pv[0]) + if fvx == 0x4000 && pvx == 0x4000 { + p.X += fixed.Int26_6(distance) + if touch { + p.Flags |= flagTouchedX + } + return + } + + fvy := int64(h.gs.fv[1]) + pvy := int64(h.gs.pv[1]) + if fvy == 0x4000 && pvy == 0x4000 { + p.Y += fixed.Int26_6(distance) + if touch { + p.Flags |= flagTouchedY + } + return + } + + fvDotPv := (fvx*pvx + fvy*pvy) >> 14 + + if fvx != 0 { + p.X += fixed.Int26_6(mulDiv(fvx, int64(distance), fvDotPv)) + if touch { + p.Flags |= flagTouchedX + } + } + + if fvy != 0 { + p.Y += fixed.Int26_6(mulDiv(fvy, int64(distance), fvDotPv)) + if touch { + p.Flags |= flagTouchedY + } + } +} + +func (h *hinter) iupInterp(interpY bool, p1, p2, ref1, ref2 int) { + if p1 > p2 { + return + } + if ref1 >= len(h.points[glyphZone][current]) || + ref2 >= len(h.points[glyphZone][current]) { + return + } + + var ifu1, ifu2 fixed.Int26_6 + if interpY { + ifu1 = h.points[glyphZone][inFontUnits][ref1].Y + ifu2 = h.points[glyphZone][inFontUnits][ref2].Y + } else { + ifu1 = h.points[glyphZone][inFontUnits][ref1].X + ifu2 = h.points[glyphZone][inFontUnits][ref2].X + } + if ifu1 > ifu2 { + ifu1, ifu2 = ifu2, ifu1 + ref1, ref2 = ref2, ref1 + } + + var unh1, unh2, delta1, delta2 fixed.Int26_6 + if interpY { + unh1 = h.points[glyphZone][unhinted][ref1].Y + unh2 = h.points[glyphZone][unhinted][ref2].Y + delta1 = h.points[glyphZone][current][ref1].Y - unh1 + delta2 = h.points[glyphZone][current][ref2].Y - unh2 + } else { + unh1 = h.points[glyphZone][unhinted][ref1].X + unh2 = h.points[glyphZone][unhinted][ref2].X + delta1 = h.points[glyphZone][current][ref1].X - unh1 + delta2 = h.points[glyphZone][current][ref2].X - unh2 + } + + var xy, ifuXY fixed.Int26_6 + if ifu1 == ifu2 { + for i := p1; i <= p2; i++ { + if interpY { + xy = h.points[glyphZone][unhinted][i].Y + } else { + xy = h.points[glyphZone][unhinted][i].X + } + + if xy <= unh1 { + xy += delta1 + } else { + xy += delta2 + } + + if interpY { + h.points[glyphZone][current][i].Y = xy + } else { + h.points[glyphZone][current][i].X = xy + } + } + return + } + + scale, scaleOK := int64(0), false + for i := p1; i <= p2; i++ { + if interpY { + xy = h.points[glyphZone][unhinted][i].Y + ifuXY = h.points[glyphZone][inFontUnits][i].Y + } else { + xy = h.points[glyphZone][unhinted][i].X + ifuXY = h.points[glyphZone][inFontUnits][i].X + } + + if xy <= unh1 { + xy += delta1 + } else if xy >= unh2 { + xy += delta2 + } else { + if !scaleOK { + scaleOK = true + scale = mulDiv(int64(unh2+delta2-unh1-delta1), 0x10000, int64(ifu2-ifu1)) + } + numer := int64(ifuXY-ifu1) * scale + if numer >= 0 { + numer += 0x8000 + } else { + numer -= 0x8000 + } + xy = unh1 + delta1 + fixed.Int26_6(numer/0x10000) + } + + if interpY { + h.points[glyphZone][current][i].Y = xy + } else { + h.points[glyphZone][current][i].X = xy + } + } +} + +func (h *hinter) iupShift(interpY bool, p1, p2, p int) { + var delta fixed.Int26_6 + if interpY { + delta = h.points[glyphZone][current][p].Y - h.points[glyphZone][unhinted][p].Y + } else { + delta = h.points[glyphZone][current][p].X - h.points[glyphZone][unhinted][p].X + } + if delta == 0 { + return + } + for i := p1; i < p2; i++ { + if i == p { + continue + } + if interpY { + h.points[glyphZone][current][i].Y += delta + } else { + h.points[glyphZone][current][i].X += delta + } + } +} + +func (h *hinter) displacement(useZP1 bool) (zonePointer uint32, i int32, d fixed.Int26_6, ok bool) { + zonePointer, i = uint32(0), h.gs.rp[1] + if useZP1 { + zonePointer, i = 1, h.gs.rp[2] + } + p := h.point(zonePointer, current, i) + q := h.point(zonePointer, unhinted, i) + if p == nil || q == nil { + return 0, 0, 0, false + } + d = dotProduct(p.X-q.X, p.Y-q.Y, h.gs.pv) + return zonePointer, i, d, true +} + +// skipInstructionPayload increments pc by the extra data that follows a +// variable length PUSHB or PUSHW instruction. +func skipInstructionPayload(program []byte, pc int) (newPC int, ok bool) { + switch program[pc] { + case opNPUSHB: + pc++ + if pc >= len(program) { + return 0, false + } + pc += int(program[pc]) + case opNPUSHW: + pc++ + if pc >= len(program) { + return 0, false + } + pc += 2 * int(program[pc]) + case opPUSHB000, opPUSHB001, opPUSHB010, opPUSHB011, + opPUSHB100, opPUSHB101, opPUSHB110, opPUSHB111: + pc += int(program[pc] - (opPUSHB000 - 1)) + case opPUSHW000, opPUSHW001, opPUSHW010, opPUSHW011, + opPUSHW100, opPUSHW101, opPUSHW110, opPUSHW111: + pc += 2 * int(program[pc]-(opPUSHW000-1)) + } + return pc, true +} + +// f2dot14 is a 2.14 fixed point number. +type f2dot14 int16 + +func normalize(x, y f2dot14) [2]f2dot14 { + fx, fy := float64(x), float64(y) + l := 0x4000 / math.Hypot(fx, fy) + fx *= l + if fx >= 0 { + fx += 0.5 + } else { + fx -= 0.5 + } + fy *= l + if fy >= 0 { + fy += 0.5 + } else { + fy -= 0.5 + } + return [2]f2dot14{f2dot14(fx), f2dot14(fy)} +} + +// fabs returns abs(x) in 26.6 fixed point arithmetic. +func fabs(x fixed.Int26_6) fixed.Int26_6 { + if x < 0 { + return -x + } + return x +} + +// fdiv returns x/y in 26.6 fixed point arithmetic. +func fdiv(x, y fixed.Int26_6) fixed.Int26_6 { + return fixed.Int26_6((int64(x) << 6) / int64(y)) +} + +// fmul returns x*y in 26.6 fixed point arithmetic. +func fmul(x, y fixed.Int26_6) fixed.Int26_6 { + return fixed.Int26_6((int64(x)*int64(y) + 1<<5) >> 6) +} + +// dotProduct returns the dot product of [x, y] and q. It is almost the same as +// px := int64(x) +// py := int64(y) +// qx := int64(q[0]) +// qy := int64(q[1]) +// return fixed.Int26_6((px*qx + py*qy + 1<<13) >> 14) +// except that the computation is done with 32-bit integers to produce exactly +// the same rounding behavior as C Freetype. +func dotProduct(x, y fixed.Int26_6, q [2]f2dot14) fixed.Int26_6 { + // Compute x*q[0] as 64-bit value. + l := uint32((int32(x) & 0xFFFF) * int32(q[0])) + m := (int32(x) >> 16) * int32(q[0]) + + lo1 := l + (uint32(m) << 16) + hi1 := (m >> 16) + (int32(l) >> 31) + bool2int32(lo1 < l) + + // Compute y*q[1] as 64-bit value. + l = uint32((int32(y) & 0xFFFF) * int32(q[1])) + m = (int32(y) >> 16) * int32(q[1]) + + lo2 := l + (uint32(m) << 16) + hi2 := (m >> 16) + (int32(l) >> 31) + bool2int32(lo2 < l) + + // Add them. + lo := lo1 + lo2 + hi := hi1 + hi2 + bool2int32(lo < lo1) + + // Divide the result by 2^14 with rounding. + s := hi >> 31 + l = lo + uint32(s) + hi += s + bool2int32(l < lo) + lo = l + + l = lo + 0x2000 + hi += bool2int32(l < lo) + + return fixed.Int26_6((uint32(hi) << 18) | (l >> 14)) +} + +// mulDiv returns x*y/z, rounded to the nearest integer. +func mulDiv(x, y, z int64) int64 { + xy := x * y + if z < 0 { + xy, z = -xy, -z + } + if xy >= 0 { + xy += z / 2 + } else { + xy -= z / 2 + } + return xy / z +} + +// round rounds the given number. The rounding algorithm is described at +// https://developer.apple.com/fonts/TTRefMan/RM02/Chap2.html#rounding +func (h *hinter) round(x fixed.Int26_6) fixed.Int26_6 { + if h.gs.roundPeriod == 0 { + // Rounding is off. + return x + } + if x >= 0 { + ret := x - h.gs.roundPhase + h.gs.roundThreshold + if h.gs.roundSuper45 { + ret /= h.gs.roundPeriod + ret *= h.gs.roundPeriod + } else { + ret &= -h.gs.roundPeriod + } + if x != 0 && ret < 0 { + ret = 0 + } + return ret + h.gs.roundPhase + } + ret := -x - h.gs.roundPhase + h.gs.roundThreshold + if h.gs.roundSuper45 { + ret /= h.gs.roundPeriod + ret *= h.gs.roundPeriod + } else { + ret &= -h.gs.roundPeriod + } + if ret < 0 { + ret = 0 + } + return -ret - h.gs.roundPhase +} + +func bool2int32(b bool) int32 { + if b { + return 1 + } + return 0 +} diff --git a/vendor/github.com/golang/freetype/truetype/opcodes.go b/vendor/github.com/golang/freetype/truetype/opcodes.go new file mode 100644 index 0000000..1880e1e --- /dev/null +++ b/vendor/github.com/golang/freetype/truetype/opcodes.go @@ -0,0 +1,289 @@ +// Copyright 2012 The Freetype-Go Authors. All rights reserved. +// Use of this source code is governed by your choice of either the +// FreeType License or the GNU General Public License version 2 (or +// any later version), both of which can be found in the LICENSE file. + +package truetype + +// The Truetype opcodes are summarized at +// https://developer.apple.com/fonts/TTRefMan/RM07/appendixA.html + +const ( + opSVTCA0 = 0x00 // Set freedom and projection Vectors To Coordinate Axis + opSVTCA1 = 0x01 // . + opSPVTCA0 = 0x02 // Set Projection Vector To Coordinate Axis + opSPVTCA1 = 0x03 // . + opSFVTCA0 = 0x04 // Set Freedom Vector to Coordinate Axis + opSFVTCA1 = 0x05 // . + opSPVTL0 = 0x06 // Set Projection Vector To Line + opSPVTL1 = 0x07 // . + opSFVTL0 = 0x08 // Set Freedom Vector To Line + opSFVTL1 = 0x09 // . + opSPVFS = 0x0a // Set Projection Vector From Stack + opSFVFS = 0x0b // Set Freedom Vector From Stack + opGPV = 0x0c // Get Projection Vector + opGFV = 0x0d // Get Freedom Vector + opSFVTPV = 0x0e // Set Freedom Vector To Projection Vector + opISECT = 0x0f // moves point p to the InterSECTion of two lines + opSRP0 = 0x10 // Set Reference Point 0 + opSRP1 = 0x11 // Set Reference Point 1 + opSRP2 = 0x12 // Set Reference Point 2 + opSZP0 = 0x13 // Set Zone Pointer 0 + opSZP1 = 0x14 // Set Zone Pointer 1 + opSZP2 = 0x15 // Set Zone Pointer 2 + opSZPS = 0x16 // Set Zone PointerS + opSLOOP = 0x17 // Set LOOP variable + opRTG = 0x18 // Round To Grid + opRTHG = 0x19 // Round To Half Grid + opSMD = 0x1a // Set Minimum Distance + opELSE = 0x1b // ELSE clause + opJMPR = 0x1c // JuMP Relative + opSCVTCI = 0x1d // Set Control Value Table Cut-In + opSSWCI = 0x1e // Set Single Width Cut-In + opSSW = 0x1f // Set Single Width + opDUP = 0x20 // DUPlicate top stack element + opPOP = 0x21 // POP top stack element + opCLEAR = 0x22 // CLEAR the stack + opSWAP = 0x23 // SWAP the top two elements on the stack + opDEPTH = 0x24 // DEPTH of the stack + opCINDEX = 0x25 // Copy the INDEXed element to the top of the stack + opMINDEX = 0x26 // Move the INDEXed element to the top of the stack + opALIGNPTS = 0x27 // ALIGN PoinTS + op_0x28 = 0x28 // deprecated + opUTP = 0x29 // UnTouch Point + opLOOPCALL = 0x2a // LOOP and CALL function + opCALL = 0x2b // CALL function + opFDEF = 0x2c // Function DEFinition + opENDF = 0x2d // END Function definition + opMDAP0 = 0x2e // Move Direct Absolute Point + opMDAP1 = 0x2f // . + opIUP0 = 0x30 // Interpolate Untouched Points through the outline + opIUP1 = 0x31 // . + opSHP0 = 0x32 // SHift Point using reference point + opSHP1 = 0x33 // . + opSHC0 = 0x34 // SHift Contour using reference point + opSHC1 = 0x35 // . + opSHZ0 = 0x36 // SHift Zone using reference point + opSHZ1 = 0x37 // . + opSHPIX = 0x38 // SHift point by a PIXel amount + opIP = 0x39 // Interpolate Point + opMSIRP0 = 0x3a // Move Stack Indirect Relative Point + opMSIRP1 = 0x3b // . + opALIGNRP = 0x3c // ALIGN to Reference Point + opRTDG = 0x3d // Round To Double Grid + opMIAP0 = 0x3e // Move Indirect Absolute Point + opMIAP1 = 0x3f // . + opNPUSHB = 0x40 // PUSH N Bytes + opNPUSHW = 0x41 // PUSH N Words + opWS = 0x42 // Write Store + opRS = 0x43 // Read Store + opWCVTP = 0x44 // Write Control Value Table in Pixel units + opRCVT = 0x45 // Read Control Value Table entry + opGC0 = 0x46 // Get Coordinate projected onto the projection vector + opGC1 = 0x47 // . + opSCFS = 0x48 // Sets Coordinate From the Stack using projection vector and freedom vector + opMD0 = 0x49 // Measure Distance + opMD1 = 0x4a // . + opMPPEM = 0x4b // Measure Pixels Per EM + opMPS = 0x4c // Measure Point Size + opFLIPON = 0x4d // set the auto FLIP Boolean to ON + opFLIPOFF = 0x4e // set the auto FLIP Boolean to OFF + opDEBUG = 0x4f // DEBUG call + opLT = 0x50 // Less Than + opLTEQ = 0x51 // Less Than or EQual + opGT = 0x52 // Greater Than + opGTEQ = 0x53 // Greater Than or EQual + opEQ = 0x54 // EQual + opNEQ = 0x55 // Not EQual + opODD = 0x56 // ODD + opEVEN = 0x57 // EVEN + opIF = 0x58 // IF test + opEIF = 0x59 // End IF + opAND = 0x5a // logical AND + opOR = 0x5b // logical OR + opNOT = 0x5c // logical NOT + opDELTAP1 = 0x5d // DELTA exception P1 + opSDB = 0x5e // Set Delta Base in the graphics state + opSDS = 0x5f // Set Delta Shift in the graphics state + opADD = 0x60 // ADD + opSUB = 0x61 // SUBtract + opDIV = 0x62 // DIVide + opMUL = 0x63 // MULtiply + opABS = 0x64 // ABSolute value + opNEG = 0x65 // NEGate + opFLOOR = 0x66 // FLOOR + opCEILING = 0x67 // CEILING + opROUND00 = 0x68 // ROUND value + opROUND01 = 0x69 // . + opROUND10 = 0x6a // . + opROUND11 = 0x6b // . + opNROUND00 = 0x6c // No ROUNDing of value + opNROUND01 = 0x6d // . + opNROUND10 = 0x6e // . + opNROUND11 = 0x6f // . + opWCVTF = 0x70 // Write Control Value Table in Funits + opDELTAP2 = 0x71 // DELTA exception P2 + opDELTAP3 = 0x72 // DELTA exception P3 + opDELTAC1 = 0x73 // DELTA exception C1 + opDELTAC2 = 0x74 // DELTA exception C2 + opDELTAC3 = 0x75 // DELTA exception C3 + opSROUND = 0x76 // Super ROUND + opS45ROUND = 0x77 // Super ROUND 45 degrees + opJROT = 0x78 // Jump Relative On True + opJROF = 0x79 // Jump Relative On False + opROFF = 0x7a // Round OFF + op_0x7b = 0x7b // deprecated + opRUTG = 0x7c // Round Up To Grid + opRDTG = 0x7d // Round Down To Grid + opSANGW = 0x7e // Set ANGle Weight + opAA = 0x7f // Adjust Angle + opFLIPPT = 0x80 // FLIP PoinT + opFLIPRGON = 0x81 // FLIP RanGe ON + opFLIPRGOFF = 0x82 // FLIP RanGe OFF + op_0x83 = 0x83 // deprecated + op_0x84 = 0x84 // deprecated + opSCANCTRL = 0x85 // SCAN conversion ConTRoL + opSDPVTL0 = 0x86 // Set Dual Projection Vector To Line + opSDPVTL1 = 0x87 // . + opGETINFO = 0x88 // GET INFOrmation + opIDEF = 0x89 // Instruction DEFinition + opROLL = 0x8a // ROLL the top three stack elements + opMAX = 0x8b // MAXimum of top two stack elements + opMIN = 0x8c // MINimum of top two stack elements + opSCANTYPE = 0x8d // SCANTYPE + opINSTCTRL = 0x8e // INSTRuction execution ConTRoL + op_0x8f = 0x8f + op_0x90 = 0x90 + op_0x91 = 0x91 + op_0x92 = 0x92 + op_0x93 = 0x93 + op_0x94 = 0x94 + op_0x95 = 0x95 + op_0x96 = 0x96 + op_0x97 = 0x97 + op_0x98 = 0x98 + op_0x99 = 0x99 + op_0x9a = 0x9a + op_0x9b = 0x9b + op_0x9c = 0x9c + op_0x9d = 0x9d + op_0x9e = 0x9e + op_0x9f = 0x9f + op_0xa0 = 0xa0 + op_0xa1 = 0xa1 + op_0xa2 = 0xa2 + op_0xa3 = 0xa3 + op_0xa4 = 0xa4 + op_0xa5 = 0xa5 + op_0xa6 = 0xa6 + op_0xa7 = 0xa7 + op_0xa8 = 0xa8 + op_0xa9 = 0xa9 + op_0xaa = 0xaa + op_0xab = 0xab + op_0xac = 0xac + op_0xad = 0xad + op_0xae = 0xae + op_0xaf = 0xaf + opPUSHB000 = 0xb0 // PUSH Bytes + opPUSHB001 = 0xb1 // . + opPUSHB010 = 0xb2 // . + opPUSHB011 = 0xb3 // . + opPUSHB100 = 0xb4 // . + opPUSHB101 = 0xb5 // . + opPUSHB110 = 0xb6 // . + opPUSHB111 = 0xb7 // . + opPUSHW000 = 0xb8 // PUSH Words + opPUSHW001 = 0xb9 // . + opPUSHW010 = 0xba // . + opPUSHW011 = 0xbb // . + opPUSHW100 = 0xbc // . + opPUSHW101 = 0xbd // . + opPUSHW110 = 0xbe // . + opPUSHW111 = 0xbf // . + opMDRP00000 = 0xc0 // Move Direct Relative Point + opMDRP00001 = 0xc1 // . + opMDRP00010 = 0xc2 // . + opMDRP00011 = 0xc3 // . + opMDRP00100 = 0xc4 // . + opMDRP00101 = 0xc5 // . + opMDRP00110 = 0xc6 // . + opMDRP00111 = 0xc7 // . + opMDRP01000 = 0xc8 // . + opMDRP01001 = 0xc9 // . + opMDRP01010 = 0xca // . + opMDRP01011 = 0xcb // . + opMDRP01100 = 0xcc // . + opMDRP01101 = 0xcd // . + opMDRP01110 = 0xce // . + opMDRP01111 = 0xcf // . + opMDRP10000 = 0xd0 // . + opMDRP10001 = 0xd1 // . + opMDRP10010 = 0xd2 // . + opMDRP10011 = 0xd3 // . + opMDRP10100 = 0xd4 // . + opMDRP10101 = 0xd5 // . + opMDRP10110 = 0xd6 // . + opMDRP10111 = 0xd7 // . + opMDRP11000 = 0xd8 // . + opMDRP11001 = 0xd9 // . + opMDRP11010 = 0xda // . + opMDRP11011 = 0xdb // . + opMDRP11100 = 0xdc // . + opMDRP11101 = 0xdd // . + opMDRP11110 = 0xde // . + opMDRP11111 = 0xdf // . + opMIRP00000 = 0xe0 // Move Indirect Relative Point + opMIRP00001 = 0xe1 // . + opMIRP00010 = 0xe2 // . + opMIRP00011 = 0xe3 // . + opMIRP00100 = 0xe4 // . + opMIRP00101 = 0xe5 // . + opMIRP00110 = 0xe6 // . + opMIRP00111 = 0xe7 // . + opMIRP01000 = 0xe8 // . + opMIRP01001 = 0xe9 // . + opMIRP01010 = 0xea // . + opMIRP01011 = 0xeb // . + opMIRP01100 = 0xec // . + opMIRP01101 = 0xed // . + opMIRP01110 = 0xee // . + opMIRP01111 = 0xef // . + opMIRP10000 = 0xf0 // . + opMIRP10001 = 0xf1 // . + opMIRP10010 = 0xf2 // . + opMIRP10011 = 0xf3 // . + opMIRP10100 = 0xf4 // . + opMIRP10101 = 0xf5 // . + opMIRP10110 = 0xf6 // . + opMIRP10111 = 0xf7 // . + opMIRP11000 = 0xf8 // . + opMIRP11001 = 0xf9 // . + opMIRP11010 = 0xfa // . + opMIRP11011 = 0xfb // . + opMIRP11100 = 0xfc // . + opMIRP11101 = 0xfd // . + opMIRP11110 = 0xfe // . + opMIRP11111 = 0xff // . +) + +// popCount is the number of stack elements that each opcode pops. +var popCount = [256]uint8{ + // 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f + 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 0, 0, 0, 5, // 0x00 - 0x0f + 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, // 0x10 - 0x1f + 1, 1, 0, 2, 0, 1, 1, 2, 0, 1, 2, 1, 1, 0, 1, 1, // 0x20 - 0x2f + 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 2, 2, 0, 0, 2, 2, // 0x30 - 0x3f + 0, 0, 2, 1, 2, 1, 1, 1, 2, 2, 2, 0, 0, 0, 0, 0, // 0x40 - 0x4f + 2, 2, 2, 2, 2, 2, 1, 1, 1, 0, 2, 2, 1, 1, 1, 1, // 0x50 - 0x5f + 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x60 - 0x6f + 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 0, 0, 0, 0, 1, 1, // 0x70 - 0x7f + 0, 2, 2, 0, 0, 1, 2, 2, 1, 1, 3, 2, 2, 1, 2, 0, // 0x80 - 0x8f + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x90 - 0x9f + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0xa0 - 0xaf + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0xb0 - 0xbf + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xc0 - 0xcf + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xd0 - 0xdf + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xe0 - 0xef + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xf0 - 0xff +} diff --git a/vendor/github.com/golang/freetype/truetype/truetype.go b/vendor/github.com/golang/freetype/truetype/truetype.go new file mode 100644 index 0000000..7270bbf --- /dev/null +++ b/vendor/github.com/golang/freetype/truetype/truetype.go @@ -0,0 +1,653 @@ +// Copyright 2010 The Freetype-Go Authors. All rights reserved. +// Use of this source code is governed by your choice of either the +// FreeType License or the GNU General Public License version 2 (or +// any later version), both of which can be found in the LICENSE file. + +// Package truetype provides a parser for the TTF and TTC file formats. +// Those formats are documented at http://developer.apple.com/fonts/TTRefMan/ +// and http://www.microsoft.com/typography/otspec/ +// +// Some of a font's methods provide lengths or co-ordinates, e.g. bounds, font +// metrics and control points. All these methods take a scale parameter, which +// is the number of pixels in 1 em, expressed as a 26.6 fixed point value. For +// example, if 1 em is 10 pixels then scale is fixed.I(10), which is equal to +// fixed.Int26_6(10 << 6). +// +// To measure a TrueType font in ideal FUnit space, use scale equal to +// font.FUnitsPerEm(). +package truetype // import "github.com/golang/freetype/truetype" + +import ( + "fmt" + + "golang.org/x/image/math/fixed" +) + +// An Index is a Font's index of a rune. +type Index uint16 + +// A NameID identifies a name table entry. +// +// See https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html +type NameID uint16 + +const ( + NameIDCopyright NameID = 0 + NameIDFontFamily = 1 + NameIDFontSubfamily = 2 + NameIDUniqueSubfamilyID = 3 + NameIDFontFullName = 4 + NameIDNameTableVersion = 5 + NameIDPostscriptName = 6 + NameIDTrademarkNotice = 7 + NameIDManufacturerName = 8 + NameIDDesignerName = 9 + NameIDFontDescription = 10 + NameIDFontVendorURL = 11 + NameIDFontDesignerURL = 12 + NameIDFontLicense = 13 + NameIDFontLicenseURL = 14 + NameIDPreferredFamily = 16 + NameIDPreferredSubfamily = 17 + NameIDCompatibleName = 18 + NameIDSampleText = 19 +) + +const ( + // A 32-bit encoding consists of a most-significant 16-bit Platform ID and a + // least-significant 16-bit Platform Specific ID. The magic numbers are + // specified at https://www.microsoft.com/typography/otspec/name.htm + unicodeEncodingBMPOnly = 0x00000003 // PID = 0 (Unicode), PSID = 3 (Unicode 2.0 BMP Only) + unicodeEncodingFull = 0x00000004 // PID = 0 (Unicode), PSID = 4 (Unicode 2.0 Full Repertoire) + microsoftSymbolEncoding = 0x00030000 // PID = 3 (Microsoft), PSID = 0 (Symbol) + microsoftUCS2Encoding = 0x00030001 // PID = 3 (Microsoft), PSID = 1 (UCS-2) + microsoftUCS4Encoding = 0x0003000a // PID = 3 (Microsoft), PSID = 10 (UCS-4) +) + +// An HMetric holds the horizontal metrics of a single glyph. +type HMetric struct { + AdvanceWidth, LeftSideBearing fixed.Int26_6 +} + +// A VMetric holds the vertical metrics of a single glyph. +type VMetric struct { + AdvanceHeight, TopSideBearing fixed.Int26_6 +} + +// A FormatError reports that the input is not a valid TrueType font. +type FormatError string + +func (e FormatError) Error() string { + return "freetype: invalid TrueType format: " + string(e) +} + +// An UnsupportedError reports that the input uses a valid but unimplemented +// TrueType feature. +type UnsupportedError string + +func (e UnsupportedError) Error() string { + return "freetype: unsupported TrueType feature: " + string(e) +} + +// u32 returns the big-endian uint32 at b[i:]. +func u32(b []byte, i int) uint32 { + return uint32(b[i])<<24 | uint32(b[i+1])<<16 | uint32(b[i+2])<<8 | uint32(b[i+3]) +} + +// u16 returns the big-endian uint16 at b[i:]. +func u16(b []byte, i int) uint16 { + return uint16(b[i])<<8 | uint16(b[i+1]) +} + +// readTable returns a slice of the TTF data given by a table's directory entry. +func readTable(ttf []byte, offsetLength []byte) ([]byte, error) { + offset := int(u32(offsetLength, 0)) + if offset < 0 { + return nil, FormatError(fmt.Sprintf("offset too large: %d", uint32(offset))) + } + length := int(u32(offsetLength, 4)) + if length < 0 { + return nil, FormatError(fmt.Sprintf("length too large: %d", uint32(length))) + } + end := offset + length + if end < 0 || end > len(ttf) { + return nil, FormatError(fmt.Sprintf("offset + length too large: %d", uint32(offset)+uint32(length))) + } + return ttf[offset:end], nil +} + +// parseSubtables returns the offset and platformID of the best subtable in +// table, where best favors a Unicode cmap encoding, and failing that, a +// Microsoft cmap encoding. offset is the offset of the first subtable in +// table, and size is the size of each subtable. +// +// If pred is non-nil, then only subtables that satisfy that predicate will be +// considered. +func parseSubtables(table []byte, name string, offset, size int, pred func([]byte) bool) ( + bestOffset int, bestPID uint32, retErr error) { + + if len(table) < 4 { + return 0, 0, FormatError(name + " too short") + } + nSubtables := int(u16(table, 2)) + if len(table) < size*nSubtables+offset { + return 0, 0, FormatError(name + " too short") + } + ok := false + for i := 0; i < nSubtables; i, offset = i+1, offset+size { + if pred != nil && !pred(table[offset:]) { + continue + } + // We read the 16-bit Platform ID and 16-bit Platform Specific ID as a single uint32. + // All values are big-endian. + pidPsid := u32(table, offset) + // We prefer the Unicode cmap encoding. Failing to find that, we fall + // back onto the Microsoft cmap encoding. + if pidPsid == unicodeEncodingBMPOnly || pidPsid == unicodeEncodingFull { + bestOffset, bestPID, ok = offset, pidPsid>>16, true + break + + } else if pidPsid == microsoftSymbolEncoding || + pidPsid == microsoftUCS2Encoding || + pidPsid == microsoftUCS4Encoding { + + bestOffset, bestPID, ok = offset, pidPsid>>16, true + // We don't break out of the for loop, so that Unicode can override Microsoft. + } + } + if !ok { + return 0, 0, UnsupportedError(name + " encoding") + } + return bestOffset, bestPID, nil +} + +const ( + locaOffsetFormatUnknown int = iota + locaOffsetFormatShort + locaOffsetFormatLong +) + +// A cm holds a parsed cmap entry. +type cm struct { + start, end, delta, offset uint32 +} + +// A Font represents a Truetype font. +type Font struct { + // Tables sliced from the TTF data. The different tables are documented + // at http://developer.apple.com/fonts/TTRefMan/RM06/Chap6.html + cmap, cvt, fpgm, glyf, hdmx, head, hhea, hmtx, kern, loca, maxp, name, os2, prep, vmtx []byte + + cmapIndexes []byte + + // Cached values derived from the raw ttf data. + cm []cm + locaOffsetFormat int + nGlyph, nHMetric, nKern int + fUnitsPerEm int32 + ascent int32 // In FUnits. + descent int32 // In FUnits; typically negative. + bounds fixed.Rectangle26_6 // In FUnits. + // Values from the maxp section. + maxTwilightPoints, maxStorage, maxFunctionDefs, maxStackElements uint16 +} + +func (f *Font) parseCmap() error { + const ( + cmapFormat4 = 4 + cmapFormat12 = 12 + languageIndependent = 0 + ) + + offset, _, err := parseSubtables(f.cmap, "cmap", 4, 8, nil) + if err != nil { + return err + } + offset = int(u32(f.cmap, offset+4)) + if offset <= 0 || offset > len(f.cmap) { + return FormatError("bad cmap offset") + } + + cmapFormat := u16(f.cmap, offset) + switch cmapFormat { + case cmapFormat4: + language := u16(f.cmap, offset+4) + if language != languageIndependent { + return UnsupportedError(fmt.Sprintf("language: %d", language)) + } + segCountX2 := int(u16(f.cmap, offset+6)) + if segCountX2%2 == 1 { + return FormatError(fmt.Sprintf("bad segCountX2: %d", segCountX2)) + } + segCount := segCountX2 / 2 + offset += 14 + f.cm = make([]cm, segCount) + for i := 0; i < segCount; i++ { + f.cm[i].end = uint32(u16(f.cmap, offset)) + offset += 2 + } + offset += 2 + for i := 0; i < segCount; i++ { + f.cm[i].start = uint32(u16(f.cmap, offset)) + offset += 2 + } + for i := 0; i < segCount; i++ { + f.cm[i].delta = uint32(u16(f.cmap, offset)) + offset += 2 + } + for i := 0; i < segCount; i++ { + f.cm[i].offset = uint32(u16(f.cmap, offset)) + offset += 2 + } + f.cmapIndexes = f.cmap[offset:] + return nil + + case cmapFormat12: + if u16(f.cmap, offset+2) != 0 { + return FormatError(fmt.Sprintf("cmap format: % x", f.cmap[offset:offset+4])) + } + length := u32(f.cmap, offset+4) + language := u32(f.cmap, offset+8) + if language != languageIndependent { + return UnsupportedError(fmt.Sprintf("language: %d", language)) + } + nGroups := u32(f.cmap, offset+12) + if length != 12*nGroups+16 { + return FormatError("inconsistent cmap length") + } + offset += 16 + f.cm = make([]cm, nGroups) + for i := uint32(0); i < nGroups; i++ { + f.cm[i].start = u32(f.cmap, offset+0) + f.cm[i].end = u32(f.cmap, offset+4) + f.cm[i].delta = u32(f.cmap, offset+8) - f.cm[i].start + offset += 12 + } + return nil + } + return UnsupportedError(fmt.Sprintf("cmap format: %d", cmapFormat)) +} + +func (f *Font) parseHead() error { + if len(f.head) != 54 { + return FormatError(fmt.Sprintf("bad head length: %d", len(f.head))) + } + f.fUnitsPerEm = int32(u16(f.head, 18)) + f.bounds.Min.X = fixed.Int26_6(int16(u16(f.head, 36))) + f.bounds.Min.Y = fixed.Int26_6(int16(u16(f.head, 38))) + f.bounds.Max.X = fixed.Int26_6(int16(u16(f.head, 40))) + f.bounds.Max.Y = fixed.Int26_6(int16(u16(f.head, 42))) + switch i := u16(f.head, 50); i { + case 0: + f.locaOffsetFormat = locaOffsetFormatShort + case 1: + f.locaOffsetFormat = locaOffsetFormatLong + default: + return FormatError(fmt.Sprintf("bad indexToLocFormat: %d", i)) + } + return nil +} + +func (f *Font) parseHhea() error { + if len(f.hhea) != 36 { + return FormatError(fmt.Sprintf("bad hhea length: %d", len(f.hhea))) + } + f.ascent = int32(int16(u16(f.hhea, 4))) + f.descent = int32(int16(u16(f.hhea, 6))) + f.nHMetric = int(u16(f.hhea, 34)) + if 4*f.nHMetric+2*(f.nGlyph-f.nHMetric) != len(f.hmtx) { + return FormatError(fmt.Sprintf("bad hmtx length: %d", len(f.hmtx))) + } + return nil +} + +func (f *Font) parseKern() error { + // Apple's TrueType documentation (http://developer.apple.com/fonts/TTRefMan/RM06/Chap6kern.html) says: + // "Previous versions of the 'kern' table defined both the version and nTables fields in the header + // as UInt16 values and not UInt32 values. Use of the older format on the Mac OS is discouraged + // (although AAT can sense an old kerning table and still make correct use of it). Microsoft + // Windows still uses the older format for the 'kern' table and will not recognize the newer one. + // Fonts targeted for the Mac OS only should use the new format; fonts targeted for both the Mac OS + // and Windows should use the old format." + // Since we expect that almost all fonts aim to be Windows-compatible, we only parse the "older" format, + // just like the C Freetype implementation. + if len(f.kern) == 0 { + if f.nKern != 0 { + return FormatError("bad kern table length") + } + return nil + } + if len(f.kern) < 18 { + return FormatError("kern data too short") + } + version, offset := u16(f.kern, 0), 2 + if version != 0 { + return UnsupportedError(fmt.Sprintf("kern version: %d", version)) + } + + n, offset := u16(f.kern, offset), offset+2 + if n == 0 { + return UnsupportedError("kern nTables: 0") + } + // TODO: support multiple subtables. In practice, almost all .ttf files + // have only one subtable, if they have a kern table at all. But it's not + // impossible. Xolonium Regular (https://fontlibrary.org/en/font/xolonium) + // has 3 subtables. Those subtables appear to be disjoint, rather than + // being the same kerning pairs encoded in three different ways. + // + // For now, we'll use only the first subtable. + + offset += 2 // Skip the version. + length, offset := int(u16(f.kern, offset)), offset+2 + coverage, offset := u16(f.kern, offset), offset+2 + if coverage != 0x0001 { + // We only support horizontal kerning. + return UnsupportedError(fmt.Sprintf("kern coverage: 0x%04x", coverage)) + } + f.nKern, offset = int(u16(f.kern, offset)), offset+2 + if 6*f.nKern != length-14 { + return FormatError("bad kern table length") + } + return nil +} + +func (f *Font) parseMaxp() error { + if len(f.maxp) != 32 { + return FormatError(fmt.Sprintf("bad maxp length: %d", len(f.maxp))) + } + f.nGlyph = int(u16(f.maxp, 4)) + f.maxTwilightPoints = u16(f.maxp, 16) + f.maxStorage = u16(f.maxp, 18) + f.maxFunctionDefs = u16(f.maxp, 20) + f.maxStackElements = u16(f.maxp, 24) + return nil +} + +// scale returns x divided by f.fUnitsPerEm, rounded to the nearest integer. +func (f *Font) scale(x fixed.Int26_6) fixed.Int26_6 { + if x >= 0 { + x += fixed.Int26_6(f.fUnitsPerEm) / 2 + } else { + x -= fixed.Int26_6(f.fUnitsPerEm) / 2 + } + return x / fixed.Int26_6(f.fUnitsPerEm) +} + +// Bounds returns the union of a Font's glyphs' bounds. +func (f *Font) Bounds(scale fixed.Int26_6) fixed.Rectangle26_6 { + b := f.bounds + b.Min.X = f.scale(scale * b.Min.X) + b.Min.Y = f.scale(scale * b.Min.Y) + b.Max.X = f.scale(scale * b.Max.X) + b.Max.Y = f.scale(scale * b.Max.Y) + return b +} + +// FUnitsPerEm returns the number of FUnits in a Font's em-square's side. +func (f *Font) FUnitsPerEm() int32 { + return f.fUnitsPerEm +} + +// Index returns a Font's index for the given rune. +func (f *Font) Index(x rune) Index { + c := uint32(x) + for i, j := 0, len(f.cm); i < j; { + h := i + (j-i)/2 + cm := &f.cm[h] + if c < cm.start { + j = h + } else if cm.end < c { + i = h + 1 + } else if cm.offset == 0 { + return Index(c + cm.delta) + } else { + offset := int(cm.offset) + 2*(h-len(f.cm)+int(c-cm.start)) + return Index(u16(f.cmapIndexes, offset)) + } + } + return 0 +} + +// Name returns the Font's name value for the given NameID. It returns "" if +// there was an error, or if that name was not found. +func (f *Font) Name(id NameID) string { + x, platformID, err := parseSubtables(f.name, "name", 6, 12, func(b []byte) bool { + return NameID(u16(b, 6)) == id + }) + if err != nil { + return "" + } + offset, length := u16(f.name, 4)+u16(f.name, x+10), u16(f.name, x+8) + // Return the ASCII value of the encoded string. + // The string is encoded as UTF-16 on non-Apple platformIDs; Apple is platformID 1. + src := f.name[offset : offset+length] + var dst []byte + if platformID != 1 { // UTF-16. + if len(src)&1 != 0 { + return "" + } + dst = make([]byte, len(src)/2) + for i := range dst { + dst[i] = printable(u16(src, 2*i)) + } + } else { // ASCII. + dst = make([]byte, len(src)) + for i, c := range src { + dst[i] = printable(uint16(c)) + } + } + return string(dst) +} + +func printable(r uint16) byte { + if 0x20 <= r && r < 0x7f { + return byte(r) + } + return '?' +} + +// unscaledHMetric returns the unscaled horizontal metrics for the glyph with +// the given index. +func (f *Font) unscaledHMetric(i Index) (h HMetric) { + j := int(i) + if j < 0 || f.nGlyph <= j { + return HMetric{} + } + if j >= f.nHMetric { + p := 4 * (f.nHMetric - 1) + return HMetric{ + AdvanceWidth: fixed.Int26_6(u16(f.hmtx, p)), + LeftSideBearing: fixed.Int26_6(int16(u16(f.hmtx, p+2*(j-f.nHMetric)+4))), + } + } + return HMetric{ + AdvanceWidth: fixed.Int26_6(u16(f.hmtx, 4*j)), + LeftSideBearing: fixed.Int26_6(int16(u16(f.hmtx, 4*j+2))), + } +} + +// HMetric returns the horizontal metrics for the glyph with the given index. +func (f *Font) HMetric(scale fixed.Int26_6, i Index) HMetric { + h := f.unscaledHMetric(i) + h.AdvanceWidth = f.scale(scale * h.AdvanceWidth) + h.LeftSideBearing = f.scale(scale * h.LeftSideBearing) + return h +} + +// unscaledVMetric returns the unscaled vertical metrics for the glyph with +// the given index. yMax is the top of the glyph's bounding box. +func (f *Font) unscaledVMetric(i Index, yMax fixed.Int26_6) (v VMetric) { + j := int(i) + if j < 0 || f.nGlyph <= j { + return VMetric{} + } + if 4*j+4 <= len(f.vmtx) { + return VMetric{ + AdvanceHeight: fixed.Int26_6(u16(f.vmtx, 4*j)), + TopSideBearing: fixed.Int26_6(int16(u16(f.vmtx, 4*j+2))), + } + } + // The OS/2 table has grown over time. + // https://developer.apple.com/fonts/TTRefMan/RM06/Chap6OS2.html + // says that it was originally 68 bytes. Optional fields, including + // the ascender and descender, are described at + // http://www.microsoft.com/typography/otspec/os2.htm + if len(f.os2) >= 72 { + sTypoAscender := fixed.Int26_6(int16(u16(f.os2, 68))) + sTypoDescender := fixed.Int26_6(int16(u16(f.os2, 70))) + return VMetric{ + AdvanceHeight: sTypoAscender - sTypoDescender, + TopSideBearing: sTypoAscender - yMax, + } + } + return VMetric{ + AdvanceHeight: fixed.Int26_6(f.fUnitsPerEm), + TopSideBearing: 0, + } +} + +// VMetric returns the vertical metrics for the glyph with the given index. +func (f *Font) VMetric(scale fixed.Int26_6, i Index) VMetric { + // TODO: should 0 be bounds.YMax? + v := f.unscaledVMetric(i, 0) + v.AdvanceHeight = f.scale(scale * v.AdvanceHeight) + v.TopSideBearing = f.scale(scale * v.TopSideBearing) + return v +} + +// Kern returns the horizontal adjustment for the given glyph pair. A positive +// kern means to move the glyphs further apart. +func (f *Font) Kern(scale fixed.Int26_6, i0, i1 Index) fixed.Int26_6 { + if f.nKern == 0 { + return 0 + } + g := uint32(i0)<<16 | uint32(i1) + lo, hi := 0, f.nKern + for lo < hi { + i := (lo + hi) / 2 + ig := u32(f.kern, 18+6*i) + if ig < g { + lo = i + 1 + } else if ig > g { + hi = i + } else { + return f.scale(scale * fixed.Int26_6(int16(u16(f.kern, 22+6*i)))) + } + } + return 0 +} + +// Parse returns a new Font for the given TTF or TTC data. +// +// For TrueType Collections, the first font in the collection is parsed. +func Parse(ttf []byte) (font *Font, err error) { + return parse(ttf, 0) +} + +func parse(ttf []byte, offset int) (font *Font, err error) { + if len(ttf)-offset < 12 { + err = FormatError("TTF data is too short") + return + } + originalOffset := offset + magic, offset := u32(ttf, offset), offset+4 + switch magic { + case 0x00010000: + // No-op. + case 0x74746366: // "ttcf" as a big-endian uint32. + if originalOffset != 0 { + err = FormatError("recursive TTC") + return + } + ttcVersion, offset := u32(ttf, offset), offset+4 + if ttcVersion != 0x00010000 && ttcVersion != 0x00020000 { + err = FormatError("bad TTC version") + return + } + numFonts, offset := int(u32(ttf, offset)), offset+4 + if numFonts <= 0 { + err = FormatError("bad number of TTC fonts") + return + } + if len(ttf[offset:])/4 < numFonts { + err = FormatError("TTC offset table is too short") + return + } + // TODO: provide an API to select which font in a TrueType collection to return, + // not just the first one. This may require an API to parse a TTC's name tables, + // so users of this package can select the font in a TTC by name. + offset = int(u32(ttf, offset)) + if offset <= 0 || offset > len(ttf) { + err = FormatError("bad TTC offset") + return + } + return parse(ttf, offset) + default: + err = FormatError("bad TTF version") + return + } + n, offset := int(u16(ttf, offset)), offset+2 + offset += 6 // Skip the searchRange, entrySelector and rangeShift. + if len(ttf) < 16*n+offset { + err = FormatError("TTF data is too short") + return + } + f := new(Font) + // Assign the table slices. + for i := 0; i < n; i++ { + x := 16*i + offset + switch string(ttf[x : x+4]) { + case "cmap": + f.cmap, err = readTable(ttf, ttf[x+8:x+16]) + case "cvt ": + f.cvt, err = readTable(ttf, ttf[x+8:x+16]) + case "fpgm": + f.fpgm, err = readTable(ttf, ttf[x+8:x+16]) + case "glyf": + f.glyf, err = readTable(ttf, ttf[x+8:x+16]) + case "hdmx": + f.hdmx, err = readTable(ttf, ttf[x+8:x+16]) + case "head": + f.head, err = readTable(ttf, ttf[x+8:x+16]) + case "hhea": + f.hhea, err = readTable(ttf, ttf[x+8:x+16]) + case "hmtx": + f.hmtx, err = readTable(ttf, ttf[x+8:x+16]) + case "kern": + f.kern, err = readTable(ttf, ttf[x+8:x+16]) + case "loca": + f.loca, err = readTable(ttf, ttf[x+8:x+16]) + case "maxp": + f.maxp, err = readTable(ttf, ttf[x+8:x+16]) + case "name": + f.name, err = readTable(ttf, ttf[x+8:x+16]) + case "OS/2": + f.os2, err = readTable(ttf, ttf[x+8:x+16]) + case "prep": + f.prep, err = readTable(ttf, ttf[x+8:x+16]) + case "vmtx": + f.vmtx, err = readTable(ttf, ttf[x+8:x+16]) + } + if err != nil { + return + } + } + // Parse and sanity-check the TTF data. + if err = f.parseHead(); err != nil { + return + } + if err = f.parseMaxp(); err != nil { + return + } + if err = f.parseCmap(); err != nil { + return + } + if err = f.parseKern(); err != nil { + return + } + if err = f.parseHhea(); err != nil { + return + } + font = f + return +} diff --git a/vendor/go.uber.org/atomic/.codecov.yml b/vendor/go.uber.org/atomic/.codecov.yml new file mode 100644 index 0000000..6d4d1be --- /dev/null +++ b/vendor/go.uber.org/atomic/.codecov.yml @@ -0,0 +1,15 @@ +coverage: + range: 80..100 + round: down + precision: 2 + + status: + project: # measuring the overall project coverage + default: # context, you can create multiple ones with custom titles + enabled: yes # must be yes|true to enable this status + target: 100 # specify the target coverage for each commit status + # option: "auto" (must increase from parent commit or pull request base) + # option: "X%" a static target percentage to hit + if_not_found: success # if parent is not found report status as success, error, or failure + if_ci_failed: error # if ci fails report status as success, error, or failure + diff --git a/vendor/go.uber.org/atomic/.gitignore b/vendor/go.uber.org/atomic/.gitignore new file mode 100644 index 0000000..0a4504f --- /dev/null +++ b/vendor/go.uber.org/atomic/.gitignore @@ -0,0 +1,11 @@ +.DS_Store +/vendor +/cover +cover.out +lint.log + +# Binaries +*.test + +# Profiling output +*.prof diff --git a/vendor/go.uber.org/atomic/.travis.yml b/vendor/go.uber.org/atomic/.travis.yml new file mode 100644 index 0000000..5895722 --- /dev/null +++ b/vendor/go.uber.org/atomic/.travis.yml @@ -0,0 +1,23 @@ +sudo: false +language: go +go_import_path: go.uber.org/atomic + +go: + - 1.7 + - 1.8 + - 1.9 + +cache: + directories: + - vendor + +install: + - make install_ci + +script: + - make test_ci + - scripts/test-ubergo.sh + - make lint + +after_success: + - bash <(curl -s https://codecov.io/bash) diff --git a/vendor/go.uber.org/atomic/LICENSE.txt b/vendor/go.uber.org/atomic/LICENSE.txt new file mode 100644 index 0000000..8765c9f --- /dev/null +++ b/vendor/go.uber.org/atomic/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright (c) 2016 Uber Technologies, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/go.uber.org/atomic/Makefile b/vendor/go.uber.org/atomic/Makefile new file mode 100644 index 0000000..dfc63d9 --- /dev/null +++ b/vendor/go.uber.org/atomic/Makefile @@ -0,0 +1,64 @@ +PACKAGES := $(shell glide nv) +# Many Go tools take file globs or directories as arguments instead of packages. +PACKAGE_FILES ?= *.go + + +# The linting tools evolve with each Go version, so run them only on the latest +# stable release. +GO_VERSION := $(shell go version | cut -d " " -f 3) +GO_MINOR_VERSION := $(word 2,$(subst ., ,$(GO_VERSION))) +LINTABLE_MINOR_VERSIONS := 7 8 +ifneq ($(filter $(LINTABLE_MINOR_VERSIONS),$(GO_MINOR_VERSION)),) +SHOULD_LINT := true +endif + + +export GO15VENDOREXPERIMENT=1 + + +.PHONY: build +build: + go build -i $(PACKAGES) + + +.PHONY: install +install: + glide --version || go get github.com/Masterminds/glide + glide install + + +.PHONY: test +test: + go test -cover -race $(PACKAGES) + + +.PHONY: install_ci +install_ci: install + go get github.com/wadey/gocovmerge + go get github.com/mattn/goveralls + go get golang.org/x/tools/cmd/cover +ifdef SHOULD_LINT + go get github.com/golang/lint/golint +endif + +.PHONY: lint +lint: +ifdef SHOULD_LINT + @rm -rf lint.log + @echo "Checking formatting..." + @gofmt -d -s $(PACKAGE_FILES) 2>&1 | tee lint.log + @echo "Checking vet..." + @$(foreach dir,$(PACKAGE_FILES),go tool vet $(dir) 2>&1 | tee -a lint.log;) + @echo "Checking lint..." + @$(foreach dir,$(PKGS),golint $(dir) 2>&1 | tee -a lint.log;) + @echo "Checking for unresolved FIXMEs..." + @git grep -i fixme | grep -v -e vendor -e Makefile | tee -a lint.log + @[ ! -s lint.log ] +else + @echo "Skipping linters on" $(GO_VERSION) +endif + + +.PHONY: test_ci +test_ci: install_ci build + ./scripts/cover.sh $(shell go list $(PACKAGES)) diff --git a/vendor/go.uber.org/atomic/README.md b/vendor/go.uber.org/atomic/README.md new file mode 100644 index 0000000..6505abf --- /dev/null +++ b/vendor/go.uber.org/atomic/README.md @@ -0,0 +1,36 @@ +# atomic [![GoDoc][doc-img]][doc] [![Build Status][ci-img]][ci] [![Coverage Status][cov-img]][cov] [![Go Report Card][reportcard-img]][reportcard] + +Simple wrappers for primitive types to enforce atomic access. + +## Installation +`go get -u go.uber.org/atomic` + +## Usage +The standard library's `sync/atomic` is powerful, but it's easy to forget which +variables must be accessed atomically. `go.uber.org/atomic` preserves all the +functionality of the standard library, but wraps the primitive types to +provide a safer, more convenient API. + +```go +var atom atomic.Uint32 +atom.Store(42) +atom.Sub(2) +atom.CAS(40, 11) +``` + +See the [documentation][doc] for a complete API specification. + +## Development Status +Stable. + +
+Released under the [MIT License](LICENSE.txt). + +[doc-img]: https://godoc.org/github.com/uber-go/atomic?status.svg +[doc]: https://godoc.org/go.uber.org/atomic +[ci-img]: https://travis-ci.org/uber-go/atomic.svg?branch=master +[ci]: https://travis-ci.org/uber-go/atomic +[cov-img]: https://codecov.io/gh/uber-go/atomic/branch/master/graph/badge.svg +[cov]: https://codecov.io/gh/uber-go/atomic +[reportcard-img]: https://goreportcard.com/badge/go.uber.org/atomic +[reportcard]: https://goreportcard.com/report/go.uber.org/atomic diff --git a/vendor/go.uber.org/atomic/atomic.go b/vendor/go.uber.org/atomic/atomic.go new file mode 100644 index 0000000..1db6849 --- /dev/null +++ b/vendor/go.uber.org/atomic/atomic.go @@ -0,0 +1,351 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +// Package atomic provides simple wrappers around numerics to enforce atomic +// access. +package atomic + +import ( + "math" + "sync/atomic" + "time" +) + +// Int32 is an atomic wrapper around an int32. +type Int32 struct{ v int32 } + +// NewInt32 creates an Int32. +func NewInt32(i int32) *Int32 { + return &Int32{i} +} + +// Load atomically loads the wrapped value. +func (i *Int32) Load() int32 { + return atomic.LoadInt32(&i.v) +} + +// Add atomically adds to the wrapped int32 and returns the new value. +func (i *Int32) Add(n int32) int32 { + return atomic.AddInt32(&i.v, n) +} + +// Sub atomically subtracts from the wrapped int32 and returns the new value. +func (i *Int32) Sub(n int32) int32 { + return atomic.AddInt32(&i.v, -n) +} + +// Inc atomically increments the wrapped int32 and returns the new value. +func (i *Int32) Inc() int32 { + return i.Add(1) +} + +// Dec atomically decrements the wrapped int32 and returns the new value. +func (i *Int32) Dec() int32 { + return i.Sub(1) +} + +// CAS is an atomic compare-and-swap. +func (i *Int32) CAS(old, new int32) bool { + return atomic.CompareAndSwapInt32(&i.v, old, new) +} + +// Store atomically stores the passed value. +func (i *Int32) Store(n int32) { + atomic.StoreInt32(&i.v, n) +} + +// Swap atomically swaps the wrapped int32 and returns the old value. +func (i *Int32) Swap(n int32) int32 { + return atomic.SwapInt32(&i.v, n) +} + +// Int64 is an atomic wrapper around an int64. +type Int64 struct{ v int64 } + +// NewInt64 creates an Int64. +func NewInt64(i int64) *Int64 { + return &Int64{i} +} + +// Load atomically loads the wrapped value. +func (i *Int64) Load() int64 { + return atomic.LoadInt64(&i.v) +} + +// Add atomically adds to the wrapped int64 and returns the new value. +func (i *Int64) Add(n int64) int64 { + return atomic.AddInt64(&i.v, n) +} + +// Sub atomically subtracts from the wrapped int64 and returns the new value. +func (i *Int64) Sub(n int64) int64 { + return atomic.AddInt64(&i.v, -n) +} + +// Inc atomically increments the wrapped int64 and returns the new value. +func (i *Int64) Inc() int64 { + return i.Add(1) +} + +// Dec atomically decrements the wrapped int64 and returns the new value. +func (i *Int64) Dec() int64 { + return i.Sub(1) +} + +// CAS is an atomic compare-and-swap. +func (i *Int64) CAS(old, new int64) bool { + return atomic.CompareAndSwapInt64(&i.v, old, new) +} + +// Store atomically stores the passed value. +func (i *Int64) Store(n int64) { + atomic.StoreInt64(&i.v, n) +} + +// Swap atomically swaps the wrapped int64 and returns the old value. +func (i *Int64) Swap(n int64) int64 { + return atomic.SwapInt64(&i.v, n) +} + +// Uint32 is an atomic wrapper around an uint32. +type Uint32 struct{ v uint32 } + +// NewUint32 creates a Uint32. +func NewUint32(i uint32) *Uint32 { + return &Uint32{i} +} + +// Load atomically loads the wrapped value. +func (i *Uint32) Load() uint32 { + return atomic.LoadUint32(&i.v) +} + +// Add atomically adds to the wrapped uint32 and returns the new value. +func (i *Uint32) Add(n uint32) uint32 { + return atomic.AddUint32(&i.v, n) +} + +// Sub atomically subtracts from the wrapped uint32 and returns the new value. +func (i *Uint32) Sub(n uint32) uint32 { + return atomic.AddUint32(&i.v, ^(n - 1)) +} + +// Inc atomically increments the wrapped uint32 and returns the new value. +func (i *Uint32) Inc() uint32 { + return i.Add(1) +} + +// Dec atomically decrements the wrapped int32 and returns the new value. +func (i *Uint32) Dec() uint32 { + return i.Sub(1) +} + +// CAS is an atomic compare-and-swap. +func (i *Uint32) CAS(old, new uint32) bool { + return atomic.CompareAndSwapUint32(&i.v, old, new) +} + +// Store atomically stores the passed value. +func (i *Uint32) Store(n uint32) { + atomic.StoreUint32(&i.v, n) +} + +// Swap atomically swaps the wrapped uint32 and returns the old value. +func (i *Uint32) Swap(n uint32) uint32 { + return atomic.SwapUint32(&i.v, n) +} + +// Uint64 is an atomic wrapper around a uint64. +type Uint64 struct{ v uint64 } + +// NewUint64 creates a Uint64. +func NewUint64(i uint64) *Uint64 { + return &Uint64{i} +} + +// Load atomically loads the wrapped value. +func (i *Uint64) Load() uint64 { + return atomic.LoadUint64(&i.v) +} + +// Add atomically adds to the wrapped uint64 and returns the new value. +func (i *Uint64) Add(n uint64) uint64 { + return atomic.AddUint64(&i.v, n) +} + +// Sub atomically subtracts from the wrapped uint64 and returns the new value. +func (i *Uint64) Sub(n uint64) uint64 { + return atomic.AddUint64(&i.v, ^(n - 1)) +} + +// Inc atomically increments the wrapped uint64 and returns the new value. +func (i *Uint64) Inc() uint64 { + return i.Add(1) +} + +// Dec atomically decrements the wrapped uint64 and returns the new value. +func (i *Uint64) Dec() uint64 { + return i.Sub(1) +} + +// CAS is an atomic compare-and-swap. +func (i *Uint64) CAS(old, new uint64) bool { + return atomic.CompareAndSwapUint64(&i.v, old, new) +} + +// Store atomically stores the passed value. +func (i *Uint64) Store(n uint64) { + atomic.StoreUint64(&i.v, n) +} + +// Swap atomically swaps the wrapped uint64 and returns the old value. +func (i *Uint64) Swap(n uint64) uint64 { + return atomic.SwapUint64(&i.v, n) +} + +// Bool is an atomic Boolean. +type Bool struct{ v uint32 } + +// NewBool creates a Bool. +func NewBool(initial bool) *Bool { + return &Bool{boolToInt(initial)} +} + +// Load atomically loads the Boolean. +func (b *Bool) Load() bool { + return truthy(atomic.LoadUint32(&b.v)) +} + +// CAS is an atomic compare-and-swap. +func (b *Bool) CAS(old, new bool) bool { + return atomic.CompareAndSwapUint32(&b.v, boolToInt(old), boolToInt(new)) +} + +// Store atomically stores the passed value. +func (b *Bool) Store(new bool) { + atomic.StoreUint32(&b.v, boolToInt(new)) +} + +// Swap sets the given value and returns the previous value. +func (b *Bool) Swap(new bool) bool { + return truthy(atomic.SwapUint32(&b.v, boolToInt(new))) +} + +// Toggle atomically negates the Boolean and returns the previous value. +func (b *Bool) Toggle() bool { + return truthy(atomic.AddUint32(&b.v, 1) - 1) +} + +func truthy(n uint32) bool { + return n&1 == 1 +} + +func boolToInt(b bool) uint32 { + if b { + return 1 + } + return 0 +} + +// Float64 is an atomic wrapper around float64. +type Float64 struct { + v uint64 +} + +// NewFloat64 creates a Float64. +func NewFloat64(f float64) *Float64 { + return &Float64{math.Float64bits(f)} +} + +// Load atomically loads the wrapped value. +func (f *Float64) Load() float64 { + return math.Float64frombits(atomic.LoadUint64(&f.v)) +} + +// Store atomically stores the passed value. +func (f *Float64) Store(s float64) { + atomic.StoreUint64(&f.v, math.Float64bits(s)) +} + +// Add atomically adds to the wrapped float64 and returns the new value. +func (f *Float64) Add(s float64) float64 { + for { + old := f.Load() + new := old + s + if f.CAS(old, new) { + return new + } + } +} + +// Sub atomically subtracts from the wrapped float64 and returns the new value. +func (f *Float64) Sub(s float64) float64 { + return f.Add(-s) +} + +// CAS is an atomic compare-and-swap. +func (f *Float64) CAS(old, new float64) bool { + return atomic.CompareAndSwapUint64(&f.v, math.Float64bits(old), math.Float64bits(new)) +} + +// Duration is an atomic wrapper around time.Duration +// https://godoc.org/time#Duration +type Duration struct { + v Int64 +} + +// NewDuration creates a Duration. +func NewDuration(d time.Duration) *Duration { + return &Duration{v: *NewInt64(int64(d))} +} + +// Load atomically loads the wrapped value. +func (d *Duration) Load() time.Duration { + return time.Duration(d.v.Load()) +} + +// Store atomically stores the passed value. +func (d *Duration) Store(n time.Duration) { + d.v.Store(int64(n)) +} + +// Add atomically adds to the wrapped time.Duration and returns the new value. +func (d *Duration) Add(n time.Duration) time.Duration { + return time.Duration(d.v.Add(int64(n))) +} + +// Sub atomically subtracts from the wrapped time.Duration and returns the new value. +func (d *Duration) Sub(n time.Duration) time.Duration { + return time.Duration(d.v.Sub(int64(n))) +} + +// Swap atomically swaps the wrapped time.Duration and returns the old value. +func (d *Duration) Swap(n time.Duration) time.Duration { + return time.Duration(d.v.Swap(int64(n))) +} + +// CAS is an atomic compare-and-swap. +func (d *Duration) CAS(old, new time.Duration) bool { + return d.v.CAS(int64(old), int64(new)) +} + +// Value shadows the type of the same name from sync/atomic +// https://godoc.org/sync/atomic#Value +type Value struct{ atomic.Value } diff --git a/vendor/go.uber.org/atomic/glide.lock b/vendor/go.uber.org/atomic/glide.lock new file mode 100644 index 0000000..3c72c59 --- /dev/null +++ b/vendor/go.uber.org/atomic/glide.lock @@ -0,0 +1,17 @@ +hash: f14d51408e3e0e4f73b34e4039484c78059cd7fc5f4996fdd73db20dc8d24f53 +updated: 2016-10-27T00:10:51.16960137-07:00 +imports: [] +testImports: +- name: github.com/davecgh/go-spew + version: 5215b55f46b2b919f50a1df0eaa5886afe4e3b3d + subpackages: + - spew +- name: github.com/pmezard/go-difflib + version: d8ed2627bdf02c080bf22230dbb337003b7aba2d + subpackages: + - difflib +- name: github.com/stretchr/testify + version: d77da356e56a7428ad25149ca77381849a6a5232 + subpackages: + - assert + - require diff --git a/vendor/go.uber.org/atomic/glide.yaml b/vendor/go.uber.org/atomic/glide.yaml new file mode 100644 index 0000000..4cf608e --- /dev/null +++ b/vendor/go.uber.org/atomic/glide.yaml @@ -0,0 +1,6 @@ +package: go.uber.org/atomic +testImport: +- package: github.com/stretchr/testify + subpackages: + - assert + - require diff --git a/vendor/go.uber.org/atomic/string.go b/vendor/go.uber.org/atomic/string.go new file mode 100644 index 0000000..ede8136 --- /dev/null +++ b/vendor/go.uber.org/atomic/string.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package atomic + +// String is an atomic type-safe wrapper around Value for strings. +type String struct{ v Value } + +// NewString creates a String. +func NewString(str string) *String { + s := &String{} + if str != "" { + s.Store(str) + } + return s +} + +// Load atomically loads the wrapped string. +func (s *String) Load() string { + v := s.v.Load() + if v == nil { + return "" + } + return v.(string) +} + +// Store atomically stores the passed string. +// Note: Converting the string to an interface{} to store in the Value +// requires an allocation. +func (s *String) Store(str string) { + s.v.Store(str) +} diff --git a/vendor/go.uber.org/multierr/.codecov.yml b/vendor/go.uber.org/multierr/.codecov.yml new file mode 100644 index 0000000..6d4d1be --- /dev/null +++ b/vendor/go.uber.org/multierr/.codecov.yml @@ -0,0 +1,15 @@ +coverage: + range: 80..100 + round: down + precision: 2 + + status: + project: # measuring the overall project coverage + default: # context, you can create multiple ones with custom titles + enabled: yes # must be yes|true to enable this status + target: 100 # specify the target coverage for each commit status + # option: "auto" (must increase from parent commit or pull request base) + # option: "X%" a static target percentage to hit + if_not_found: success # if parent is not found report status as success, error, or failure + if_ci_failed: error # if ci fails report status as success, error, or failure + diff --git a/vendor/go.uber.org/multierr/.gitignore b/vendor/go.uber.org/multierr/.gitignore new file mode 100644 index 0000000..61ead86 --- /dev/null +++ b/vendor/go.uber.org/multierr/.gitignore @@ -0,0 +1 @@ +/vendor diff --git a/vendor/go.uber.org/multierr/.travis.yml b/vendor/go.uber.org/multierr/.travis.yml new file mode 100644 index 0000000..5ffa8fe --- /dev/null +++ b/vendor/go.uber.org/multierr/.travis.yml @@ -0,0 +1,33 @@ +sudo: false +language: go +go_import_path: go.uber.org/multierr + +env: + global: + - GO15VENDOREXPERIMENT=1 + +go: + - 1.7 + - 1.8 + - tip + +cache: + directories: + - vendor + +before_install: +- go version + +install: +- | + set -e + make install_ci + +script: +- | + set -e + make lint + make test_ci + +after_success: +- bash <(curl -s https://codecov.io/bash) diff --git a/vendor/go.uber.org/multierr/CHANGELOG.md b/vendor/go.uber.org/multierr/CHANGELOG.md new file mode 100644 index 0000000..898445d --- /dev/null +++ b/vendor/go.uber.org/multierr/CHANGELOG.md @@ -0,0 +1,28 @@ +Releases +======== + +v1.1.0 (2017-06-30) +=================== + +- Added an `Errors(error) []error` function to extract the underlying list of + errors for a multierr error. + + +v1.0.0 (2017-05-31) +=================== + +No changes since v0.2.0. This release is committing to making no breaking +changes to the current API in the 1.X series. + + +v0.2.0 (2017-04-11) +=================== + +- Repeatedly appending to the same error is now faster due to fewer + allocations. + + +v0.1.0 (2017-31-03) +=================== + +- Initial release diff --git a/vendor/go.uber.org/multierr/LICENSE.txt b/vendor/go.uber.org/multierr/LICENSE.txt new file mode 100644 index 0000000..858e024 --- /dev/null +++ b/vendor/go.uber.org/multierr/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright (c) 2017 Uber Technologies, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/go.uber.org/multierr/Makefile b/vendor/go.uber.org/multierr/Makefile new file mode 100644 index 0000000..a7437d0 --- /dev/null +++ b/vendor/go.uber.org/multierr/Makefile @@ -0,0 +1,74 @@ +export GO15VENDOREXPERIMENT=1 + +PACKAGES := $(shell glide nv) + +GO_FILES := $(shell \ + find . '(' -path '*/.*' -o -path './vendor' ')' -prune \ + -o -name '*.go' -print | cut -b3-) + +.PHONY: install +install: + glide --version || go get github.com/Masterminds/glide + glide install + +.PHONY: build +build: + go build -i $(PACKAGES) + +.PHONY: test +test: + go test -cover -race $(PACKAGES) + +.PHONY: gofmt +gofmt: + $(eval FMT_LOG := $(shell mktemp -t gofmt.XXXXX)) + @gofmt -e -s -l $(GO_FILES) > $(FMT_LOG) || true + @[ ! -s "$(FMT_LOG)" ] || (echo "gofmt failed:" | cat - $(FMT_LOG) && false) + +.PHONY: govet +govet: + $(eval VET_LOG := $(shell mktemp -t govet.XXXXX)) + @go vet $(PACKAGES) 2>&1 \ + | grep -v '^exit status' > $(VET_LOG) || true + @[ ! -s "$(VET_LOG)" ] || (echo "govet failed:" | cat - $(VET_LOG) && false) + +.PHONY: golint +golint: + @go get github.com/golang/lint/golint + $(eval LINT_LOG := $(shell mktemp -t golint.XXXXX)) + @cat /dev/null > $(LINT_LOG) + @$(foreach pkg, $(PACKAGES), golint $(pkg) >> $(LINT_LOG) || true;) + @[ ! -s "$(LINT_LOG)" ] || (echo "golint failed:" | cat - $(LINT_LOG) && false) + +.PHONY: staticcheck +staticcheck: + @go get honnef.co/go/tools/cmd/staticcheck + $(eval STATICCHECK_LOG := $(shell mktemp -t staticcheck.XXXXX)) + @staticcheck $(PACKAGES) 2>&1 > $(STATICCHECK_LOG) || true + @[ ! -s "$(STATICCHECK_LOG)" ] || (echo "staticcheck failed:" | cat - $(STATICCHECK_LOG) && false) + +.PHONY: lint +lint: gofmt govet golint staticcheck + +.PHONY: cover +cover: + ./scripts/cover.sh $(shell go list $(PACKAGES)) + go tool cover -html=cover.out -o cover.html + +update-license: + @go get go.uber.org/tools/update-license + @update-license \ + $(shell go list -json $(PACKAGES) | \ + jq -r '.Dir + "/" + (.GoFiles | .[])') + +############################################################################## + +.PHONY: install_ci +install_ci: install + go get github.com/wadey/gocovmerge + go get github.com/mattn/goveralls + go get golang.org/x/tools/cmd/cover + +.PHONY: test_ci +test_ci: install_ci + ./scripts/cover.sh $(shell go list $(PACKAGES)) diff --git a/vendor/go.uber.org/multierr/README.md b/vendor/go.uber.org/multierr/README.md new file mode 100644 index 0000000..065088f --- /dev/null +++ b/vendor/go.uber.org/multierr/README.md @@ -0,0 +1,23 @@ +# multierr [![GoDoc][doc-img]][doc] [![Build Status][ci-img]][ci] [![Coverage Status][cov-img]][cov] + +`multierr` allows combining one or more Go `error`s together. + +## Installation + + go get -u go.uber.org/multierr + +## Status + +Stable: No breaking changes will be made before 2.0. + +------------------------------------------------------------------------------- + +Released under the [MIT License]. + +[MIT License]: LICENSE.txt +[doc-img]: https://godoc.org/go.uber.org/multierr?status.svg +[doc]: https://godoc.org/go.uber.org/multierr +[ci-img]: https://travis-ci.org/uber-go/multierr.svg?branch=master +[cov-img]: https://codecov.io/gh/uber-go/multierr/branch/master/graph/badge.svg +[ci]: https://travis-ci.org/uber-go/multierr +[cov]: https://codecov.io/gh/uber-go/multierr diff --git a/vendor/go.uber.org/multierr/error.go b/vendor/go.uber.org/multierr/error.go new file mode 100644 index 0000000..de6ce47 --- /dev/null +++ b/vendor/go.uber.org/multierr/error.go @@ -0,0 +1,401 @@ +// Copyright (c) 2017 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +// Package multierr allows combining one or more errors together. +// +// Overview +// +// Errors can be combined with the use of the Combine function. +// +// multierr.Combine( +// reader.Close(), +// writer.Close(), +// conn.Close(), +// ) +// +// If only two errors are being combined, the Append function may be used +// instead. +// +// err = multierr.Combine(reader.Close(), writer.Close()) +// +// This makes it possible to record resource cleanup failures from deferred +// blocks with the help of named return values. +// +// func sendRequest(req Request) (err error) { +// conn, err := openConnection() +// if err != nil { +// return err +// } +// defer func() { +// err = multierr.Append(err, conn.Close()) +// }() +// // ... +// } +// +// The underlying list of errors for a returned error object may be retrieved +// with the Errors function. +// +// errors := multierr.Errors(err) +// if len(errors) > 0 { +// fmt.Println("The following errors occurred:") +// } +// +// Advanced Usage +// +// Errors returned by Combine and Append MAY implement the following +// interface. +// +// type errorGroup interface { +// // Returns a slice containing the underlying list of errors. +// // +// // This slice MUST NOT be modified by the caller. +// Errors() []error +// } +// +// Note that if you need access to list of errors behind a multierr error, you +// should prefer using the Errors function. That said, if you need cheap +// read-only access to the underlying errors slice, you can attempt to cast +// the error to this interface. You MUST handle the failure case gracefully +// because errors returned by Combine and Append are not guaranteed to +// implement this interface. +// +// var errors []error +// group, ok := err.(errorGroup) +// if ok { +// errors = group.Errors() +// } else { +// errors = []error{err} +// } +package multierr // import "go.uber.org/multierr" + +import ( + "bytes" + "fmt" + "io" + "strings" + "sync" + + "go.uber.org/atomic" +) + +var ( + // Separator for single-line error messages. + _singlelineSeparator = []byte("; ") + + _newline = []byte("\n") + + // Prefix for multi-line messages + _multilinePrefix = []byte("the following errors occurred:") + + // Prefix for the first and following lines of an item in a list of + // multi-line error messages. + // + // For example, if a single item is: + // + // foo + // bar + // + // It will become, + // + // - foo + // bar + _multilineSeparator = []byte("\n - ") + _multilineIndent = []byte(" ") +) + +// _bufferPool is a pool of bytes.Buffers. +var _bufferPool = sync.Pool{ + New: func() interface{} { + return &bytes.Buffer{} + }, +} + +type errorGroup interface { + Errors() []error +} + +// Errors returns a slice containing zero or more errors that the supplied +// error is composed of. If the error is nil, the returned slice is empty. +// +// err := multierr.Append(r.Close(), w.Close()) +// errors := multierr.Errors(err) +// +// If the error is not composed of other errors, the returned slice contains +// just the error that was passed in. +// +// Callers of this function are free to modify the returned slice. +func Errors(err error) []error { + if err == nil { + return nil + } + + // Note that we're casting to multiError, not errorGroup. Our contract is + // that returned errors MAY implement errorGroup. Errors, however, only + // has special behavior for multierr-specific error objects. + // + // This behavior can be expanded in the future but I think it's prudent to + // start with as little as possible in terms of contract and possibility + // of misuse. + eg, ok := err.(*multiError) + if !ok { + return []error{err} + } + + errors := eg.Errors() + result := make([]error, len(errors)) + copy(result, errors) + return result +} + +// multiError is an error that holds one or more errors. +// +// An instance of this is guaranteed to be non-empty and flattened. That is, +// none of the errors inside multiError are other multiErrors. +// +// multiError formats to a semi-colon delimited list of error messages with +// %v and with a more readable multi-line format with %+v. +type multiError struct { + copyNeeded atomic.Bool + errors []error +} + +var _ errorGroup = (*multiError)(nil) + +// Errors returns the list of underlying errors. +// +// This slice MUST NOT be modified. +func (merr *multiError) Errors() []error { + if merr == nil { + return nil + } + return merr.errors +} + +func (merr *multiError) Error() string { + if merr == nil { + return "" + } + + buff := _bufferPool.Get().(*bytes.Buffer) + buff.Reset() + + merr.writeSingleline(buff) + + result := buff.String() + _bufferPool.Put(buff) + return result +} + +func (merr *multiError) Format(f fmt.State, c rune) { + if c == 'v' && f.Flag('+') { + merr.writeMultiline(f) + } else { + merr.writeSingleline(f) + } +} + +func (merr *multiError) writeSingleline(w io.Writer) { + first := true + for _, item := range merr.errors { + if first { + first = false + } else { + w.Write(_singlelineSeparator) + } + io.WriteString(w, item.Error()) + } +} + +func (merr *multiError) writeMultiline(w io.Writer) { + w.Write(_multilinePrefix) + for _, item := range merr.errors { + w.Write(_multilineSeparator) + writePrefixLine(w, _multilineIndent, fmt.Sprintf("%+v", item)) + } +} + +// Writes s to the writer with the given prefix added before each line after +// the first. +func writePrefixLine(w io.Writer, prefix []byte, s string) { + first := true + for len(s) > 0 { + if first { + first = false + } else { + w.Write(prefix) + } + + idx := strings.IndexByte(s, '\n') + if idx < 0 { + idx = len(s) - 1 + } + + io.WriteString(w, s[:idx+1]) + s = s[idx+1:] + } +} + +type inspectResult struct { + // Number of top-level non-nil errors + Count int + + // Total number of errors including multiErrors + Capacity int + + // Index of the first non-nil error in the list. Value is meaningless if + // Count is zero. + FirstErrorIdx int + + // Whether the list contains at least one multiError + ContainsMultiError bool +} + +// Inspects the given slice of errors so that we can efficiently allocate +// space for it. +func inspect(errors []error) (res inspectResult) { + first := true + for i, err := range errors { + if err == nil { + continue + } + + res.Count++ + if first { + first = false + res.FirstErrorIdx = i + } + + if merr, ok := err.(*multiError); ok { + res.Capacity += len(merr.errors) + res.ContainsMultiError = true + } else { + res.Capacity++ + } + } + return +} + +// fromSlice converts the given list of errors into a single error. +func fromSlice(errors []error) error { + res := inspect(errors) + switch res.Count { + case 0: + return nil + case 1: + // only one non-nil entry + return errors[res.FirstErrorIdx] + case len(errors): + if !res.ContainsMultiError { + // already flat + return &multiError{errors: errors} + } + } + + nonNilErrs := make([]error, 0, res.Capacity) + for _, err := range errors[res.FirstErrorIdx:] { + if err == nil { + continue + } + + if nested, ok := err.(*multiError); ok { + nonNilErrs = append(nonNilErrs, nested.errors...) + } else { + nonNilErrs = append(nonNilErrs, err) + } + } + + return &multiError{errors: nonNilErrs} +} + +// Combine combines the passed errors into a single error. +// +// If zero arguments were passed or if all items are nil, a nil error is +// returned. +// +// Combine(nil, nil) // == nil +// +// If only a single error was passed, it is returned as-is. +// +// Combine(err) // == err +// +// Combine skips over nil arguments so this function may be used to combine +// together errors from operations that fail independently of each other. +// +// multierr.Combine( +// reader.Close(), +// writer.Close(), +// pipe.Close(), +// ) +// +// If any of the passed errors is a multierr error, it will be flattened along +// with the other errors. +// +// multierr.Combine(multierr.Combine(err1, err2), err3) +// // is the same as +// multierr.Combine(err1, err2, err3) +// +// The returned error formats into a readable multi-line error message if +// formatted with %+v. +// +// fmt.Sprintf("%+v", multierr.Combine(err1, err2)) +func Combine(errors ...error) error { + return fromSlice(errors) +} + +// Append appends the given errors together. Either value may be nil. +// +// This function is a specialization of Combine for the common case where +// there are only two errors. +// +// err = multierr.Append(reader.Close(), writer.Close()) +// +// The following pattern may also be used to record failure of deferred +// operations without losing information about the original error. +// +// func doSomething(..) (err error) { +// f := acquireResource() +// defer func() { +// err = multierr.Append(err, f.Close()) +// }() +func Append(left error, right error) error { + switch { + case left == nil: + return right + case right == nil: + return left + } + + if _, ok := right.(*multiError); !ok { + if l, ok := left.(*multiError); ok && !l.copyNeeded.Swap(true) { + // Common case where the error on the left is constantly being + // appended to. + errs := append(l.errors, right) + return &multiError{errors: errs} + } else if !ok { + // Both errors are single errors. + return &multiError{errors: []error{left, right}} + } + } + + // Either right or both, left and right, are multiErrors. Rely on usual + // expensive logic. + errors := [2]error{left, right} + return fromSlice(errors[0:]) +} diff --git a/vendor/go.uber.org/multierr/glide.lock b/vendor/go.uber.org/multierr/glide.lock new file mode 100644 index 0000000..f9ea94c --- /dev/null +++ b/vendor/go.uber.org/multierr/glide.lock @@ -0,0 +1,19 @@ +hash: b53b5e9a84b9cb3cc4b2d0499e23da2feca1eec318ce9bb717ecf35bf24bf221 +updated: 2017-04-10T13:34:45.671678062-07:00 +imports: +- name: go.uber.org/atomic + version: 3b8db5e93c4c02efbc313e17b2e796b0914a01fb +testImports: +- name: github.com/davecgh/go-spew + version: 6d212800a42e8ab5c146b8ace3490ee17e5225f9 + subpackages: + - spew +- name: github.com/pmezard/go-difflib + version: d8ed2627bdf02c080bf22230dbb337003b7aba2d + subpackages: + - difflib +- name: github.com/stretchr/testify + version: 69483b4bd14f5845b5a1e55bca19e954e827f1d0 + subpackages: + - assert + - require diff --git a/vendor/go.uber.org/multierr/glide.yaml b/vendor/go.uber.org/multierr/glide.yaml new file mode 100644 index 0000000..6ef084e --- /dev/null +++ b/vendor/go.uber.org/multierr/glide.yaml @@ -0,0 +1,8 @@ +package: go.uber.org/multierr +import: +- package: go.uber.org/atomic + version: ^1 +testImport: +- package: github.com/stretchr/testify + subpackages: + - assert diff --git a/vendor/go.uber.org/zap/.codecov.yml b/vendor/go.uber.org/zap/.codecov.yml new file mode 100644 index 0000000..8e5ca7d --- /dev/null +++ b/vendor/go.uber.org/zap/.codecov.yml @@ -0,0 +1,17 @@ +coverage: + range: 80..100 + round: down + precision: 2 + + status: + project: # measuring the overall project coverage + default: # context, you can create multiple ones with custom titles + enabled: yes # must be yes|true to enable this status + target: 95% # specify the target coverage for each commit status + # option: "auto" (must increase from parent commit or pull request base) + # option: "X%" a static target percentage to hit + if_not_found: success # if parent is not found report status as success, error, or failure + if_ci_failed: error # if ci fails report status as success, error, or failure +ignore: + - internal/readme/readme.go + diff --git a/vendor/go.uber.org/zap/.gitignore b/vendor/go.uber.org/zap/.gitignore new file mode 100644 index 0000000..08fbde6 --- /dev/null +++ b/vendor/go.uber.org/zap/.gitignore @@ -0,0 +1,28 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test +vendor + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof +*.pprof +*.out +*.log diff --git a/vendor/go.uber.org/zap/.readme.tmpl b/vendor/go.uber.org/zap/.readme.tmpl new file mode 100644 index 0000000..550dcda --- /dev/null +++ b/vendor/go.uber.org/zap/.readme.tmpl @@ -0,0 +1,108 @@ +# :zap: zap [![GoDoc][doc-img]][doc] [![Build Status][ci-img]][ci] [![Coverage Status][cov-img]][cov] + +Blazing fast, structured, leveled logging in Go. + +## Installation + +`go get -u go.uber.org/zap` + +Note that zap only supports the two most recent minor versions of Go. + +## Quick Start + +In contexts where performance is nice, but not critical, use the +`SugaredLogger`. It's 4-10x faster than than other structured logging +packages and includes both structured and `printf`-style APIs. + +```go +logger, _ := zap.NewProduction() +defer logger.Sync() // flushes buffer, if any +sugar := logger.Sugar() +sugar.Infow("failed to fetch URL", + // Structured context as loosely typed key-value pairs. + "url", url, + "attempt", 3, + "backoff", time.Second, +) +sugar.Infof("Failed to fetch URL: %s", url) +``` + +When performance and type safety are critical, use the `Logger`. It's even +faster than the `SugaredLogger` and allocates far less, but it only supports +structured logging. + +```go +logger, _ := zap.NewProduction() +defer logger.Sync() +logger.Info("failed to fetch URL", + // Structured context as strongly typed Field values. + zap.String("url", url), + zap.Int("attempt", 3), + zap.Duration("backoff", time.Second), +) +``` + +See the [documentation][doc] and [FAQ](FAQ.md) for more details. + +## Performance + +For applications that log in the hot path, reflection-based serialization and +string formatting are prohibitively expensive — they're CPU-intensive +and make many small allocations. Put differently, using `encoding/json` and +`fmt.Fprintf` to log tons of `interface{}`s makes your application slow. + +Zap takes a different approach. It includes a reflection-free, zero-allocation +JSON encoder, and the base `Logger` strives to avoid serialization overhead +and allocations wherever possible. By building the high-level `SugaredLogger` +on that foundation, zap lets users *choose* when they need to count every +allocation and when they'd prefer a more familiar, loosely typed API. + +As measured by its own [benchmarking suite][], not only is zap more performant +than comparable structured logging packages — it's also faster than the +standard library. Like all benchmarks, take these with a grain of salt.[1](#footnote-versions) + +Log a message and 10 fields: + +{{.BenchmarkAddingFields}} + +Log a message with a logger that already has 10 fields of context: + +{{.BenchmarkAccumulatedContext}} + +Log a static string, without any context or `printf`-style templating: + +{{.BenchmarkWithoutFields}} + +## Development Status: Stable + +All APIs are finalized, and no breaking changes will be made in the 1.x series +of releases. Users of semver-aware dependency management systems should pin +zap to `^1`. + +## Contributing + +We encourage and support an active, healthy community of contributors — +including you! Details are in the [contribution guide](CONTRIBUTING.md) and +the [code of conduct](CODE_OF_CONDUCT.md). The zap maintainers keep an eye on +issues and pull requests, but you can also report any negative conduct to +oss-conduct@uber.com. That email list is a private, safe space; even the zap +maintainers don't have access, so don't hesitate to hold us to a high +standard. + +
+ +Released under the [MIT License](LICENSE.txt). + +1 In particular, keep in mind that we may be +benchmarking against slightly older versions of other packages. Versions are +pinned in zap's [glide.lock][] file. [↩](#anchor-versions) + +[doc-img]: https://godoc.org/go.uber.org/zap?status.svg +[doc]: https://godoc.org/go.uber.org/zap +[ci-img]: https://travis-ci.org/uber-go/zap.svg?branch=master +[ci]: https://travis-ci.org/uber-go/zap +[cov-img]: https://codecov.io/gh/uber-go/zap/branch/master/graph/badge.svg +[cov]: https://codecov.io/gh/uber-go/zap +[benchmarking suite]: https://github.com/uber-go/zap/tree/master/benchmarks +[glide.lock]: https://github.com/uber-go/zap/blob/master/glide.lock diff --git a/vendor/go.uber.org/zap/.travis.yml b/vendor/go.uber.org/zap/.travis.yml new file mode 100644 index 0000000..da1100b --- /dev/null +++ b/vendor/go.uber.org/zap/.travis.yml @@ -0,0 +1,21 @@ +language: go +sudo: false +go: + - "1.9" + - "1.10" +go_import_path: go.uber.org/zap +env: + global: + - TEST_TIMEOUT_SCALE=10 +cache: + directories: + - vendor +install: + - make dependencies +script: + - make lint + - make test + - make bench +after_success: + - make cover + - bash <(curl -s https://codecov.io/bash) diff --git a/vendor/go.uber.org/zap/CHANGELOG.md b/vendor/go.uber.org/zap/CHANGELOG.md new file mode 100644 index 0000000..be28291 --- /dev/null +++ b/vendor/go.uber.org/zap/CHANGELOG.md @@ -0,0 +1,286 @@ +# Changelog + +## v1.8.0 (13 Apr 2018) + +Enhancements: +* [#508][]: Make log level configurable when redirecting the standard + library's logger. +* [#518][]: Add a logger that writes to a `*testing.TB`. +* [#577][]: Add a top-level alias for `zapcore.Field` to clean up GoDoc. + +Bugfixes: +* [#574][]: Add a missing import comment to `go.uber.org/zap/buffer`. + +Thanks to @DiSiqueira and @djui for their contributions to this release. + +## v1.7.1 (25 Sep 2017) + +Bugfixes: +* [#504][]: Store strings when using AddByteString with the map encoder. + +## v1.7.0 (21 Sep 2017) + +Enhancements: + +* [#487][]: Add `NewStdLogAt`, which extends `NewStdLog` by allowing the user + to specify the level of the logged messages. + +## v1.6.0 (30 Aug 2017) + +Enhancements: + +* [#491][]: Omit zap stack frames from stacktraces. +* [#490][]: Add a `ContextMap` method to observer logs for simpler + field validation in tests. + +## v1.5.0 (22 Jul 2017) + +Enhancements: + +* [#460][] and [#470][]: Support errors produced by `go.uber.org/multierr`. +* [#465][]: Support user-supplied encoders for logger names. + +Bugfixes: + +* [#477][]: Fix a bug that incorrectly truncated deep stacktraces. + +Thanks to @richard-tunein and @pavius for their contributions to this release. + +## v1.4.1 (08 Jun 2017) + +This release fixes two bugs. + +Bugfixes: + +* [#435][]: Support a variety of case conventions when unmarshaling levels. +* [#444][]: Fix a panic in the observer. + +## v1.4.0 (12 May 2017) + +This release adds a few small features and is fully backward-compatible. + +Enhancements: + +* [#424][]: Add a `LineEnding` field to `EncoderConfig`, allowing users to + override the Unix-style default. +* [#425][]: Preserve time zones when logging times. +* [#431][]: Make `zap.AtomicLevel` implement `fmt.Stringer`, which makes a + variety of operations a bit simpler. + +## v1.3.0 (25 Apr 2017) + +This release adds an enhancement to zap's testing helpers as well as the +ability to marshal an AtomicLevel. It is fully backward-compatible. + +Enhancements: + +* [#415][]: Add a substring-filtering helper to zap's observer. This is + particularly useful when testing the `SugaredLogger`. +* [#416][]: Make `AtomicLevel` implement `encoding.TextMarshaler`. + +## v1.2.0 (13 Apr 2017) + +This release adds a gRPC compatibility wrapper. It is fully backward-compatible. + +Enhancements: + +* [#402][]: Add a `zapgrpc` package that wraps zap's Logger and implements + `grpclog.Logger`. + +## v1.1.0 (31 Mar 2017) + +This release fixes two bugs and adds some enhancements to zap's testing helpers. +It is fully backward-compatible. + +Bugfixes: + +* [#385][]: Fix caller path trimming on Windows. +* [#396][]: Fix a panic when attempting to use non-existent directories with + zap's configuration struct. + +Enhancements: + +* [#386][]: Add filtering helpers to zaptest's observing logger. + +Thanks to @moitias for contributing to this release. + +## v1.0.0 (14 Mar 2017) + +This is zap's first stable release. All exported APIs are now final, and no +further breaking changes will be made in the 1.x release series. Anyone using a +semver-aware dependency manager should now pin to `^1`. + +Breaking changes: + +* [#366][]: Add byte-oriented APIs to encoders to log UTF-8 encoded text without + casting from `[]byte` to `string`. +* [#364][]: To support buffering outputs, add `Sync` methods to `zapcore.Core`, + `zap.Logger`, and `zap.SugaredLogger`. +* [#371][]: Rename the `testutils` package to `zaptest`, which is less likely to + clash with other testing helpers. + +Bugfixes: + +* [#362][]: Make the ISO8601 time formatters fixed-width, which is friendlier + for tab-separated console output. +* [#369][]: Remove the automatic locks in `zapcore.NewCore`, which allows zap to + work with concurrency-safe `WriteSyncer` implementations. +* [#347][]: Stop reporting errors when trying to `fsync` standard out on Linux + systems. +* [#373][]: Report the correct caller from zap's standard library + interoperability wrappers. + +Enhancements: + +* [#348][]: Add a registry allowing third-party encodings to work with zap's + built-in `Config`. +* [#327][]: Make the representation of logger callers configurable (like times, + levels, and durations). +* [#376][]: Allow third-party encoders to use their own buffer pools, which + removes the last performance advantage that zap's encoders have over plugins. +* [#346][]: Add `CombineWriteSyncers`, a convenience function to tee multiple + `WriteSyncer`s and lock the result. +* [#365][]: Make zap's stacktraces compatible with mid-stack inlining (coming in + Go 1.9). +* [#372][]: Export zap's observing logger as `zaptest/observer`. This makes it + easier for particularly punctilious users to unit test their application's + logging. + +Thanks to @suyash, @htrendev, @flisky, @Ulexus, and @skipor for their +contributions to this release. + +## v1.0.0-rc.3 (7 Mar 2017) + +This is the third release candidate for zap's stable release. There are no +breaking changes. + +Bugfixes: + +* [#339][]: Byte slices passed to `zap.Any` are now correctly treated as binary blobs + rather than `[]uint8`. + +Enhancements: + +* [#307][]: Users can opt into colored output for log levels. +* [#353][]: In addition to hijacking the output of the standard library's + package-global logging functions, users can now construct a zap-backed + `log.Logger` instance. +* [#311][]: Frames from common runtime functions and some of zap's internal + machinery are now omitted from stacktraces. + +Thanks to @ansel1 and @suyash for their contributions to this release. + +## v1.0.0-rc.2 (21 Feb 2017) + +This is the second release candidate for zap's stable release. It includes two +breaking changes. + +Breaking changes: + +* [#316][]: Zap's global loggers are now fully concurrency-safe + (previously, users had to ensure that `ReplaceGlobals` was called before the + loggers were in use). However, they must now be accessed via the `L()` and + `S()` functions. Users can update their projects with + + ``` + gofmt -r "zap.L -> zap.L()" -w . + gofmt -r "zap.S -> zap.S()" -w . + ``` +* [#309][] and [#317][]: RC1 was mistakenly shipped with invalid + JSON and YAML struct tags on all config structs. This release fixes the tags + and adds static analysis to prevent similar bugs in the future. + +Bugfixes: + +* [#321][]: Redirecting the standard library's `log` output now + correctly reports the logger's caller. + +Enhancements: + +* [#325][] and [#333][]: Zap now transparently supports non-standard, rich + errors like those produced by `github.com/pkg/errors`. +* [#326][]: Though `New(nil)` continues to return a no-op logger, `NewNop()` is + now preferred. Users can update their projects with `gofmt -r 'zap.New(nil) -> + zap.NewNop()' -w .`. +* [#300][]: Incorrectly importing zap as `github.com/uber-go/zap` now returns a + more informative error. + +Thanks to @skipor and @chapsuk for their contributions to this release. + +## v1.0.0-rc.1 (14 Feb 2017) + +This is the first release candidate for zap's stable release. There are multiple +breaking changes and improvements from the pre-release version. Most notably: + +* **Zap's import path is now "go.uber.org/zap"** — all users will + need to update their code. +* User-facing types and functions remain in the `zap` package. Code relevant + largely to extension authors is now in the `zapcore` package. +* The `zapcore.Core` type makes it easy for third-party packages to use zap's + internals but provide a different user-facing API. +* `Logger` is now a concrete type instead of an interface. +* A less verbose (though slower) logging API is included by default. +* Package-global loggers `L` and `S` are included. +* A human-friendly console encoder is included. +* A declarative config struct allows common logger configurations to be managed + as configuration instead of code. +* Sampling is more accurate, and doesn't depend on the standard library's shared + timer heap. + +## v0.1.0-beta.1 (6 Feb 2017) + +This is a minor version, tagged to allow users to pin to the pre-1.0 APIs and +upgrade at their leisure. Since this is the first tagged release, there are no +backward compatibility concerns and all functionality is new. + +Early zap adopters should pin to the 0.1.x minor version until they're ready to +upgrade to the upcoming stable release. + +[#316]: https://github.com/uber-go/zap/pull/316 +[#309]: https://github.com/uber-go/zap/pull/309 +[#317]: https://github.com/uber-go/zap/pull/317 +[#321]: https://github.com/uber-go/zap/pull/321 +[#325]: https://github.com/uber-go/zap/pull/325 +[#333]: https://github.com/uber-go/zap/pull/333 +[#326]: https://github.com/uber-go/zap/pull/326 +[#300]: https://github.com/uber-go/zap/pull/300 +[#339]: https://github.com/uber-go/zap/pull/339 +[#307]: https://github.com/uber-go/zap/pull/307 +[#353]: https://github.com/uber-go/zap/pull/353 +[#311]: https://github.com/uber-go/zap/pull/311 +[#366]: https://github.com/uber-go/zap/pull/366 +[#364]: https://github.com/uber-go/zap/pull/364 +[#371]: https://github.com/uber-go/zap/pull/371 +[#362]: https://github.com/uber-go/zap/pull/362 +[#369]: https://github.com/uber-go/zap/pull/369 +[#347]: https://github.com/uber-go/zap/pull/347 +[#373]: https://github.com/uber-go/zap/pull/373 +[#348]: https://github.com/uber-go/zap/pull/348 +[#327]: https://github.com/uber-go/zap/pull/327 +[#376]: https://github.com/uber-go/zap/pull/376 +[#346]: https://github.com/uber-go/zap/pull/346 +[#365]: https://github.com/uber-go/zap/pull/365 +[#372]: https://github.com/uber-go/zap/pull/372 +[#385]: https://github.com/uber-go/zap/pull/385 +[#396]: https://github.com/uber-go/zap/pull/396 +[#386]: https://github.com/uber-go/zap/pull/386 +[#402]: https://github.com/uber-go/zap/pull/402 +[#415]: https://github.com/uber-go/zap/pull/415 +[#416]: https://github.com/uber-go/zap/pull/416 +[#424]: https://github.com/uber-go/zap/pull/424 +[#425]: https://github.com/uber-go/zap/pull/425 +[#431]: https://github.com/uber-go/zap/pull/431 +[#435]: https://github.com/uber-go/zap/pull/435 +[#444]: https://github.com/uber-go/zap/pull/444 +[#477]: https://github.com/uber-go/zap/pull/477 +[#465]: https://github.com/uber-go/zap/pull/465 +[#460]: https://github.com/uber-go/zap/pull/460 +[#470]: https://github.com/uber-go/zap/pull/470 +[#487]: https://github.com/uber-go/zap/pull/487 +[#490]: https://github.com/uber-go/zap/pull/490 +[#491]: https://github.com/uber-go/zap/pull/491 +[#504]: https://github.com/uber-go/zap/pull/504 +[#508]: https://github.com/uber-go/zap/pull/508 +[#518]: https://github.com/uber-go/zap/pull/518 +[#577]: https://github.com/uber-go/zap/pull/577 +[#574]: https://github.com/uber-go/zap/pull/574 diff --git a/vendor/go.uber.org/zap/CODE_OF_CONDUCT.md b/vendor/go.uber.org/zap/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..e327d9a --- /dev/null +++ b/vendor/go.uber.org/zap/CODE_OF_CONDUCT.md @@ -0,0 +1,75 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, +body size, disability, ethnicity, gender identity and expression, level of +experience, nationality, personal appearance, race, religion, or sexual +identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an +appointed representative at an online or offline event. Representation of a +project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at oss-conduct@uber.com. The project +team will review and investigate all complaints, and will respond in a way +that it deems appropriate to the circumstances. The project team is obligated +to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 1.4, available at +[http://contributor-covenant.org/version/1/4][version]. + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/vendor/go.uber.org/zap/CONTRIBUTING.md b/vendor/go.uber.org/zap/CONTRIBUTING.md new file mode 100644 index 0000000..9454bba --- /dev/null +++ b/vendor/go.uber.org/zap/CONTRIBUTING.md @@ -0,0 +1,81 @@ +# Contributing + +We'd love your help making zap the very best structured logging library in Go! + +If you'd like to add new exported APIs, please [open an issue][open-issue] +describing your proposal — discussing API changes ahead of time makes +pull request review much smoother. In your issue, pull request, and any other +communications, please remember to treat your fellow contributors with +respect! We take our [code of conduct](CODE_OF_CONDUCT.md) seriously. + +Note that you'll need to sign [Uber's Contributor License Agreement][cla] +before we can accept any of your contributions. If necessary, a bot will remind +you to accept the CLA when you open your pull request. + +## Setup + +[Fork][fork], then clone the repository: + +``` +mkdir -p $GOPATH/src/go.uber.org +cd $GOPATH/src/go.uber.org +git clone git@github.com:your_github_username/zap.git +cd zap +git remote add upstream https://github.com/uber-go/zap.git +git fetch upstream +``` + +Install zap's dependencies: + +``` +make dependencies +``` + +Make sure that the tests and the linters pass: + +``` +make test +make lint +``` + +If you're not using the minor version of Go specified in the Makefile's +`LINTABLE_MINOR_VERSIONS` variable, `make lint` doesn't do anything. This is +fine, but it means that you'll only discover lint failures after you open your +pull request. + +## Making Changes + +Start by creating a new branch for your changes: + +``` +cd $GOPATH/src/go.uber.org/zap +git checkout master +git fetch upstream +git rebase upstream/master +git checkout -b cool_new_feature +``` + +Make your changes, then ensure that `make lint` and `make test` still pass. If +you're satisfied with your changes, push them to your fork. + +``` +git push origin cool_new_feature +``` + +Then use the GitHub UI to open a pull request. + +At this point, you're waiting on us to review your changes. We *try* to respond +to issues and pull requests within a few business days, and we may suggest some +improvements or alternatives. Once your changes are approved, one of the +project maintainers will merge them. + +We're much more likely to approve your changes if you: + +* Add tests for new functionality. +* Write a [good commit message][commit-message]. +* Maintain backward compatibility. + +[fork]: https://github.com/uber-go/zap/fork +[open-issue]: https://github.com/uber-go/zap/issues/new +[cla]: https://cla-assistant.io/uber-go/zap +[commit-message]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html diff --git a/vendor/go.uber.org/zap/FAQ.md b/vendor/go.uber.org/zap/FAQ.md new file mode 100644 index 0000000..90ddfe1 --- /dev/null +++ b/vendor/go.uber.org/zap/FAQ.md @@ -0,0 +1,154 @@ +# Frequently Asked Questions + +## Design + +### Why spend so much effort on logger performance? + +Of course, most applications won't notice the impact of a slow logger: they +already take tens or hundreds of milliseconds for each operation, so an extra +millisecond doesn't matter. + +On the other hand, why *not* make structured logging fast? The `SugaredLogger` +isn't any harder to use than other logging packages, and the `Logger` makes +structured logging possible in performance-sensitive contexts. Across a fleet +of Go microservices, making each application even slightly more efficient adds +up quickly. + +### Why aren't `Logger` and `SugaredLogger` interfaces? + +Unlike the familiar `io.Writer` and `http.Handler`, `Logger` and +`SugaredLogger` interfaces would include *many* methods. As [Rob Pike points +out][go-proverbs], "The bigger the interface, the weaker the abstraction." +Interfaces are also rigid — *any* change requires releasing a new major +version, since it breaks all third-party implementations. + +Making the `Logger` and `SugaredLogger` concrete types doesn't sacrifice much +abstraction, and it lets us add methods without introducing breaking changes. +Your applications should define and depend upon an interface that includes +just the methods you use. + +### Why sample application logs? + +Applications often experience runs of errors, either because of a bug or +because of a misbehaving user. Logging errors is usually a good idea, but it +can easily make this bad situation worse: not only is your application coping +with a flood of errors, it's also spending extra CPU cycles and I/O logging +those errors. Since writes are typically serialized, logging limits throughput +when you need it most. + +Sampling fixes this problem by dropping repetitive log entries. Under normal +conditions, your application writes out every entry. When similar entries are +logged hundreds or thousands of times each second, though, zap begins dropping +duplicates to preserve throughput. + +### Why do the structured logging APIs take a message in addition to fields? + +Subjectively, we find it helpful to accompany structured context with a brief +description. This isn't critical during development, but it makes debugging +and operating unfamiliar systems much easier. + +More concretely, zap's sampling algorithm uses the message to identify +duplicate entries. In our experience, this is a practical middle ground +between random sampling (which often drops the exact entry that you need while +debugging) and hashing the complete entry (which is prohibitively expensive). + +### Why include package-global loggers? + +Since so many other logging packages include a global logger, many +applications aren't designed to accept loggers as explicit parameters. +Changing function signatures is often a breaking change, so zap includes +global loggers to simplify migration. + +Avoid them where possible. + +### Why include dedicated Panic and Fatal log levels? + +In general, application code should handle errors gracefully instead of using +`panic` or `os.Exit`. However, every rule has exceptions, and it's common to +crash when an error is truly unrecoverable. To avoid losing any information +— especially the reason for the crash — the logger must flush any +buffered entries before the process exits. + +Zap makes this easy by offering `Panic` and `Fatal` logging methods that +automatically flush before exiting. Of course, this doesn't guarantee that +logs will never be lost, but it eliminates a common error. + +See the discussion in uber-go/zap#207 for more details. + +### What's `DPanic`? + +`DPanic` stands for "panic in development." In development, it logs at +`PanicLevel`; otherwise, it logs at `ErrorLevel`. `DPanic` makes it easier to +catch errors that are theoretically possible, but shouldn't actually happen, +*without* crashing in production. + +If you've ever written code like this, you need `DPanic`: + +```go +if err != nil { + panic(fmt.Sprintf("shouldn't ever get here: %v", err)) +} +``` + +## Installation + +### What does the error `expects import "go.uber.org/zap"` mean? + +Either zap was installed incorrectly or you're referencing the wrong package +name in your code. + +Zap's source code happens to be hosted on GitHub, but the [import +path][import-path] is `go.uber.org/zap`. This gives us, the project +maintainers, the freedom to move the source code if necessary. However, it +means that you need to take a little care when installing and using the +package. + +If you follow two simple rules, everything should work: install zap with `go +get -u go.uber.org/zap`, and always import it in your code with `import +"go.uber.org/zap"`. Your code shouldn't contain *any* references to +`github.com/uber-go/zap`. + +## Usage + +### Does zap support log rotation? + +Zap doesn't natively support rotating log files, since we prefer to leave this +to an external program like `logrotate`. + +However, it's easy to integrate a log rotation package like +[`gopkg.in/natefinch/lumberjack.v2`][lumberjack] as a `zapcore.WriteSyncer`. + +```go +// lumberjack.Logger is already safe for concurrent use, so we don't need to +// lock it. +w := zapcore.AddSync(&lumberjack.Logger{ + Filename: "/var/log/myapp/foo.log", + MaxSize: 500, // megabytes + MaxBackups: 3, + MaxAge: 28, // days +}) +core := zapcore.NewCore( + zapcore.NewJSONEncoder(zap.NewProductionEncoderConfig()), + w, + zap.InfoLevel, +) +logger := zap.New(core) +``` + +## Extensions + +We'd love to support every logging need within zap itself, but we're only +familiar with a handful of log ingestion systems, flag-parsing packages, and +the like. Rather than merging code that we can't effectively debug and +support, we'd rather grow an ecosystem of zap extensions. + +We're aware of the following extensions, but haven't used them ourselves: + +| Package | Integration | +| --- | --- | +| `github.com/tchap/zapext` | Sentry, syslog | +| `github.com/fgrosse/zaptest` | Ginkgo | + +[go-proverbs]: https://go-proverbs.github.io/ +[import-path]: https://golang.org/cmd/go/#hdr-Remote_import_paths +[lumberjack]: https://godoc.org/gopkg.in/natefinch/lumberjack.v2 diff --git a/vendor/go.uber.org/zap/LICENSE.txt b/vendor/go.uber.org/zap/LICENSE.txt new file mode 100644 index 0000000..6652bed --- /dev/null +++ b/vendor/go.uber.org/zap/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright (c) 2016-2017 Uber Technologies, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/go.uber.org/zap/Makefile b/vendor/go.uber.org/zap/Makefile new file mode 100644 index 0000000..ef7893b --- /dev/null +++ b/vendor/go.uber.org/zap/Makefile @@ -0,0 +1,76 @@ +export GO15VENDOREXPERIMENT=1 + +BENCH_FLAGS ?= -cpuprofile=cpu.pprof -memprofile=mem.pprof -benchmem +PKGS ?= $(shell glide novendor) +# Many Go tools take file globs or directories as arguments instead of packages. +PKG_FILES ?= *.go zapcore benchmarks buffer zapgrpc zaptest zaptest/observer internal/bufferpool internal/exit internal/color internal/ztest + +# The linting tools evolve with each Go version, so run them only on the latest +# stable release. +GO_VERSION := $(shell go version | cut -d " " -f 3) +GO_MINOR_VERSION := $(word 2,$(subst ., ,$(GO_VERSION))) +LINTABLE_MINOR_VERSIONS := 10 +ifneq ($(filter $(LINTABLE_MINOR_VERSIONS),$(GO_MINOR_VERSION)),) +SHOULD_LINT := true +endif + + +.PHONY: all +all: lint test + +.PHONY: dependencies +dependencies: + @echo "Installing Glide and locked dependencies..." + glide --version || go get -u -f github.com/Masterminds/glide + glide install + @echo "Installing test dependencies..." + go install ./vendor/github.com/axw/gocov/gocov + go install ./vendor/github.com/mattn/goveralls +ifdef SHOULD_LINT + @echo "Installing golint..." + go install ./vendor/github.com/golang/lint/golint +else + @echo "Not installing golint, since we don't expect to lint on" $(GO_VERSION) +endif + +# Disable printf-like invocation checking due to testify.assert.Error() +VET_RULES := -printf=false + +.PHONY: lint +lint: +ifdef SHOULD_LINT + @rm -rf lint.log + @echo "Checking formatting..." + @gofmt -d -s $(PKG_FILES) 2>&1 | tee lint.log + @echo "Installing test dependencies for vet..." + @go test -i $(PKGS) + @echo "Checking vet..." + @$(foreach dir,$(PKG_FILES),go tool vet $(VET_RULES) $(dir) 2>&1 | tee -a lint.log;) + @echo "Checking lint..." + @$(foreach dir,$(PKGS),golint $(dir) 2>&1 | tee -a lint.log;) + @echo "Checking for unresolved FIXMEs..." + @git grep -i fixme | grep -v -e vendor -e Makefile | tee -a lint.log + @echo "Checking for license headers..." + @./check_license.sh | tee -a lint.log + @[ ! -s lint.log ] +else + @echo "Skipping linters on" $(GO_VERSION) +endif + +.PHONY: test +test: + go test -race $(PKGS) + +.PHONY: cover +cover: + ./scripts/cover.sh $(PKGS) + +.PHONY: bench +BENCH ?= . +bench: + @$(foreach pkg,$(PKGS),go test -bench=$(BENCH) -run="^$$" $(BENCH_FLAGS) $(pkg);) + +.PHONY: updatereadme +updatereadme: + rm -f README.md + cat .readme.tmpl | go run internal/readme/readme.go > README.md diff --git a/vendor/go.uber.org/zap/README.md b/vendor/go.uber.org/zap/README.md new file mode 100644 index 0000000..4b2bb9d --- /dev/null +++ b/vendor/go.uber.org/zap/README.md @@ -0,0 +1,136 @@ +# :zap: zap [![GoDoc][doc-img]][doc] [![Build Status][ci-img]][ci] [![Coverage Status][cov-img]][cov] + +Blazing fast, structured, leveled logging in Go. + +## Installation + +`go get -u go.uber.org/zap` + +Note that zap only supports the two most recent minor versions of Go. + +## Quick Start + +In contexts where performance is nice, but not critical, use the +`SugaredLogger`. It's 4-10x faster than than other structured logging +packages and includes both structured and `printf`-style APIs. + +```go +logger, _ := zap.NewProduction() +defer logger.Sync() // flushes buffer, if any +sugar := logger.Sugar() +sugar.Infow("failed to fetch URL", + // Structured context as loosely typed key-value pairs. + "url", url, + "attempt", 3, + "backoff", time.Second, +) +sugar.Infof("Failed to fetch URL: %s", url) +``` + +When performance and type safety are critical, use the `Logger`. It's even +faster than the `SugaredLogger` and allocates far less, but it only supports +structured logging. + +```go +logger, _ := zap.NewProduction() +defer logger.Sync() +logger.Info("failed to fetch URL", + // Structured context as strongly typed Field values. + zap.String("url", url), + zap.Int("attempt", 3), + zap.Duration("backoff", time.Second), +) +``` + +See the [documentation][doc] and [FAQ](FAQ.md) for more details. + +## Performance + +For applications that log in the hot path, reflection-based serialization and +string formatting are prohibitively expensive — they're CPU-intensive +and make many small allocations. Put differently, using `encoding/json` and +`fmt.Fprintf` to log tons of `interface{}`s makes your application slow. + +Zap takes a different approach. It includes a reflection-free, zero-allocation +JSON encoder, and the base `Logger` strives to avoid serialization overhead +and allocations wherever possible. By building the high-level `SugaredLogger` +on that foundation, zap lets users *choose* when they need to count every +allocation and when they'd prefer a more familiar, loosely typed API. + +As measured by its own [benchmarking suite][], not only is zap more performant +than comparable structured logging packages — it's also faster than the +standard library. Like all benchmarks, take these with a grain of salt.[1](#footnote-versions) + +Log a message and 10 fields: + +| Package | Time | Objects Allocated | +| :--- | :---: | :---: | +| :zap: zap | 3131 ns/op | 5 allocs/op | +| :zap: zap (sugared) | 4173 ns/op | 21 allocs/op | +| zerolog | 16154 ns/op | 90 allocs/op | +| lion | 16341 ns/op | 111 allocs/op | +| go-kit | 17049 ns/op | 126 allocs/op | +| logrus | 23662 ns/op | 142 allocs/op | +| log15 | 36351 ns/op | 149 allocs/op | +| apex/log | 42530 ns/op | 126 allocs/op | + +Log a message with a logger that already has 10 fields of context: + +| Package | Time | Objects Allocated | +| :--- | :---: | :---: | +| :zap: zap | 380 ns/op | 0 allocs/op | +| :zap: zap (sugared) | 564 ns/op | 2 allocs/op | +| zerolog | 321 ns/op | 0 allocs/op | +| lion | 7092 ns/op | 39 allocs/op | +| go-kit | 20226 ns/op | 115 allocs/op | +| logrus | 22312 ns/op | 130 allocs/op | +| log15 | 28788 ns/op | 79 allocs/op | +| apex/log | 42063 ns/op | 115 allocs/op | + +Log a static string, without any context or `printf`-style templating: + +| Package | Time | Objects Allocated | +| :--- | :---: | :---: | +| :zap: zap | 361 ns/op | 0 allocs/op | +| :zap: zap (sugared) | 534 ns/op | 2 allocs/op | +| zerolog | 323 ns/op | 0 allocs/op | +| standard library | 575 ns/op | 2 allocs/op | +| go-kit | 922 ns/op | 13 allocs/op | +| lion | 1413 ns/op | 10 allocs/op | +| logrus | 2291 ns/op | 27 allocs/op | +| apex/log | 3690 ns/op | 11 allocs/op | +| log15 | 5954 ns/op | 26 allocs/op | + +## Development Status: Stable + +All APIs are finalized, and no breaking changes will be made in the 1.x series +of releases. Users of semver-aware dependency management systems should pin +zap to `^1`. + +## Contributing + +We encourage and support an active, healthy community of contributors — +including you! Details are in the [contribution guide](CONTRIBUTING.md) and +the [code of conduct](CODE_OF_CONDUCT.md). The zap maintainers keep an eye on +issues and pull requests, but you can also report any negative conduct to +oss-conduct@uber.com. That email list is a private, safe space; even the zap +maintainers don't have access, so don't hesitate to hold us to a high +standard. + +
+ +Released under the [MIT License](LICENSE.txt). + +1 In particular, keep in mind that we may be +benchmarking against slightly older versions of other packages. Versions are +pinned in zap's [glide.lock][] file. [↩](#anchor-versions) + +[doc-img]: https://godoc.org/go.uber.org/zap?status.svg +[doc]: https://godoc.org/go.uber.org/zap +[ci-img]: https://travis-ci.org/uber-go/zap.svg?branch=master +[ci]: https://travis-ci.org/uber-go/zap +[cov-img]: https://codecov.io/gh/uber-go/zap/branch/master/graph/badge.svg +[cov]: https://codecov.io/gh/uber-go/zap +[benchmarking suite]: https://github.com/uber-go/zap/tree/master/benchmarks +[glide.lock]: https://github.com/uber-go/zap/blob/master/glide.lock diff --git a/vendor/go.uber.org/zap/array.go b/vendor/go.uber.org/zap/array.go new file mode 100644 index 0000000..5be3704 --- /dev/null +++ b/vendor/go.uber.org/zap/array.go @@ -0,0 +1,320 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zap + +import ( + "time" + + "go.uber.org/zap/zapcore" +) + +// Array constructs a field with the given key and ArrayMarshaler. It provides +// a flexible, but still type-safe and efficient, way to add array-like types +// to the logging context. The struct's MarshalLogArray method is called lazily. +func Array(key string, val zapcore.ArrayMarshaler) Field { + return Field{Key: key, Type: zapcore.ArrayMarshalerType, Interface: val} +} + +// Bools constructs a field that carries a slice of bools. +func Bools(key string, bs []bool) Field { + return Array(key, bools(bs)) +} + +// ByteStrings constructs a field that carries a slice of []byte, each of which +// must be UTF-8 encoded text. +func ByteStrings(key string, bss [][]byte) Field { + return Array(key, byteStringsArray(bss)) +} + +// Complex128s constructs a field that carries a slice of complex numbers. +func Complex128s(key string, nums []complex128) Field { + return Array(key, complex128s(nums)) +} + +// Complex64s constructs a field that carries a slice of complex numbers. +func Complex64s(key string, nums []complex64) Field { + return Array(key, complex64s(nums)) +} + +// Durations constructs a field that carries a slice of time.Durations. +func Durations(key string, ds []time.Duration) Field { + return Array(key, durations(ds)) +} + +// Float64s constructs a field that carries a slice of floats. +func Float64s(key string, nums []float64) Field { + return Array(key, float64s(nums)) +} + +// Float32s constructs a field that carries a slice of floats. +func Float32s(key string, nums []float32) Field { + return Array(key, float32s(nums)) +} + +// Ints constructs a field that carries a slice of integers. +func Ints(key string, nums []int) Field { + return Array(key, ints(nums)) +} + +// Int64s constructs a field that carries a slice of integers. +func Int64s(key string, nums []int64) Field { + return Array(key, int64s(nums)) +} + +// Int32s constructs a field that carries a slice of integers. +func Int32s(key string, nums []int32) Field { + return Array(key, int32s(nums)) +} + +// Int16s constructs a field that carries a slice of integers. +func Int16s(key string, nums []int16) Field { + return Array(key, int16s(nums)) +} + +// Int8s constructs a field that carries a slice of integers. +func Int8s(key string, nums []int8) Field { + return Array(key, int8s(nums)) +} + +// Strings constructs a field that carries a slice of strings. +func Strings(key string, ss []string) Field { + return Array(key, stringArray(ss)) +} + +// Times constructs a field that carries a slice of time.Times. +func Times(key string, ts []time.Time) Field { + return Array(key, times(ts)) +} + +// Uints constructs a field that carries a slice of unsigned integers. +func Uints(key string, nums []uint) Field { + return Array(key, uints(nums)) +} + +// Uint64s constructs a field that carries a slice of unsigned integers. +func Uint64s(key string, nums []uint64) Field { + return Array(key, uint64s(nums)) +} + +// Uint32s constructs a field that carries a slice of unsigned integers. +func Uint32s(key string, nums []uint32) Field { + return Array(key, uint32s(nums)) +} + +// Uint16s constructs a field that carries a slice of unsigned integers. +func Uint16s(key string, nums []uint16) Field { + return Array(key, uint16s(nums)) +} + +// Uint8s constructs a field that carries a slice of unsigned integers. +func Uint8s(key string, nums []uint8) Field { + return Array(key, uint8s(nums)) +} + +// Uintptrs constructs a field that carries a slice of pointer addresses. +func Uintptrs(key string, us []uintptr) Field { + return Array(key, uintptrs(us)) +} + +// Errors constructs a field that carries a slice of errors. +func Errors(key string, errs []error) Field { + return Array(key, errArray(errs)) +} + +type bools []bool + +func (bs bools) MarshalLogArray(arr zapcore.ArrayEncoder) error { + for i := range bs { + arr.AppendBool(bs[i]) + } + return nil +} + +type byteStringsArray [][]byte + +func (bss byteStringsArray) MarshalLogArray(arr zapcore.ArrayEncoder) error { + for i := range bss { + arr.AppendByteString(bss[i]) + } + return nil +} + +type complex128s []complex128 + +func (nums complex128s) MarshalLogArray(arr zapcore.ArrayEncoder) error { + for i := range nums { + arr.AppendComplex128(nums[i]) + } + return nil +} + +type complex64s []complex64 + +func (nums complex64s) MarshalLogArray(arr zapcore.ArrayEncoder) error { + for i := range nums { + arr.AppendComplex64(nums[i]) + } + return nil +} + +type durations []time.Duration + +func (ds durations) MarshalLogArray(arr zapcore.ArrayEncoder) error { + for i := range ds { + arr.AppendDuration(ds[i]) + } + return nil +} + +type float64s []float64 + +func (nums float64s) MarshalLogArray(arr zapcore.ArrayEncoder) error { + for i := range nums { + arr.AppendFloat64(nums[i]) + } + return nil +} + +type float32s []float32 + +func (nums float32s) MarshalLogArray(arr zapcore.ArrayEncoder) error { + for i := range nums { + arr.AppendFloat32(nums[i]) + } + return nil +} + +type ints []int + +func (nums ints) MarshalLogArray(arr zapcore.ArrayEncoder) error { + for i := range nums { + arr.AppendInt(nums[i]) + } + return nil +} + +type int64s []int64 + +func (nums int64s) MarshalLogArray(arr zapcore.ArrayEncoder) error { + for i := range nums { + arr.AppendInt64(nums[i]) + } + return nil +} + +type int32s []int32 + +func (nums int32s) MarshalLogArray(arr zapcore.ArrayEncoder) error { + for i := range nums { + arr.AppendInt32(nums[i]) + } + return nil +} + +type int16s []int16 + +func (nums int16s) MarshalLogArray(arr zapcore.ArrayEncoder) error { + for i := range nums { + arr.AppendInt16(nums[i]) + } + return nil +} + +type int8s []int8 + +func (nums int8s) MarshalLogArray(arr zapcore.ArrayEncoder) error { + for i := range nums { + arr.AppendInt8(nums[i]) + } + return nil +} + +type stringArray []string + +func (ss stringArray) MarshalLogArray(arr zapcore.ArrayEncoder) error { + for i := range ss { + arr.AppendString(ss[i]) + } + return nil +} + +type times []time.Time + +func (ts times) MarshalLogArray(arr zapcore.ArrayEncoder) error { + for i := range ts { + arr.AppendTime(ts[i]) + } + return nil +} + +type uints []uint + +func (nums uints) MarshalLogArray(arr zapcore.ArrayEncoder) error { + for i := range nums { + arr.AppendUint(nums[i]) + } + return nil +} + +type uint64s []uint64 + +func (nums uint64s) MarshalLogArray(arr zapcore.ArrayEncoder) error { + for i := range nums { + arr.AppendUint64(nums[i]) + } + return nil +} + +type uint32s []uint32 + +func (nums uint32s) MarshalLogArray(arr zapcore.ArrayEncoder) error { + for i := range nums { + arr.AppendUint32(nums[i]) + } + return nil +} + +type uint16s []uint16 + +func (nums uint16s) MarshalLogArray(arr zapcore.ArrayEncoder) error { + for i := range nums { + arr.AppendUint16(nums[i]) + } + return nil +} + +type uint8s []uint8 + +func (nums uint8s) MarshalLogArray(arr zapcore.ArrayEncoder) error { + for i := range nums { + arr.AppendUint8(nums[i]) + } + return nil +} + +type uintptrs []uintptr + +func (nums uintptrs) MarshalLogArray(arr zapcore.ArrayEncoder) error { + for i := range nums { + arr.AppendUintptr(nums[i]) + } + return nil +} diff --git a/vendor/go.uber.org/zap/buffer/buffer.go b/vendor/go.uber.org/zap/buffer/buffer.go new file mode 100644 index 0000000..d15f7fd --- /dev/null +++ b/vendor/go.uber.org/zap/buffer/buffer.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +// Package buffer provides a thin wrapper around a byte slice. Unlike the +// standard library's bytes.Buffer, it supports a portion of the strconv +// package's zero-allocation formatters. +package buffer // import "go.uber.org/zap/buffer" + +import "strconv" + +const _size = 1024 // by default, create 1 KiB buffers + +// Buffer is a thin wrapper around a byte slice. It's intended to be pooled, so +// the only way to construct one is via a Pool. +type Buffer struct { + bs []byte + pool Pool +} + +// AppendByte writes a single byte to the Buffer. +func (b *Buffer) AppendByte(v byte) { + b.bs = append(b.bs, v) +} + +// AppendString writes a string to the Buffer. +func (b *Buffer) AppendString(s string) { + b.bs = append(b.bs, s...) +} + +// AppendInt appends an integer to the underlying buffer (assuming base 10). +func (b *Buffer) AppendInt(i int64) { + b.bs = strconv.AppendInt(b.bs, i, 10) +} + +// AppendUint appends an unsigned integer to the underlying buffer (assuming +// base 10). +func (b *Buffer) AppendUint(i uint64) { + b.bs = strconv.AppendUint(b.bs, i, 10) +} + +// AppendBool appends a bool to the underlying buffer. +func (b *Buffer) AppendBool(v bool) { + b.bs = strconv.AppendBool(b.bs, v) +} + +// AppendFloat appends a float to the underlying buffer. It doesn't quote NaN +// or +/- Inf. +func (b *Buffer) AppendFloat(f float64, bitSize int) { + b.bs = strconv.AppendFloat(b.bs, f, 'f', -1, bitSize) +} + +// Len returns the length of the underlying byte slice. +func (b *Buffer) Len() int { + return len(b.bs) +} + +// Cap returns the capacity of the underlying byte slice. +func (b *Buffer) Cap() int { + return cap(b.bs) +} + +// Bytes returns a mutable reference to the underlying byte slice. +func (b *Buffer) Bytes() []byte { + return b.bs +} + +// String returns a string copy of the underlying byte slice. +func (b *Buffer) String() string { + return string(b.bs) +} + +// Reset resets the underlying byte slice. Subsequent writes re-use the slice's +// backing array. +func (b *Buffer) Reset() { + b.bs = b.bs[:0] +} + +// Write implements io.Writer. +func (b *Buffer) Write(bs []byte) (int, error) { + b.bs = append(b.bs, bs...) + return len(bs), nil +} + +// Free returns the Buffer to its Pool. +// +// Callers must not retain references to the Buffer after calling Free. +func (b *Buffer) Free() { + b.pool.put(b) +} diff --git a/vendor/go.uber.org/zap/buffer/pool.go b/vendor/go.uber.org/zap/buffer/pool.go new file mode 100644 index 0000000..8fb3e20 --- /dev/null +++ b/vendor/go.uber.org/zap/buffer/pool.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package buffer + +import "sync" + +// A Pool is a type-safe wrapper around a sync.Pool. +type Pool struct { + p *sync.Pool +} + +// NewPool constructs a new Pool. +func NewPool() Pool { + return Pool{p: &sync.Pool{ + New: func() interface{} { + return &Buffer{bs: make([]byte, 0, _size)} + }, + }} +} + +// Get retrieves a Buffer from the pool, creating one if necessary. +func (p Pool) Get() *Buffer { + buf := p.p.Get().(*Buffer) + buf.Reset() + buf.pool = p + return buf +} + +func (p Pool) put(buf *Buffer) { + p.p.Put(buf) +} diff --git a/vendor/go.uber.org/zap/check_license.sh b/vendor/go.uber.org/zap/check_license.sh new file mode 100755 index 0000000..345ac8b --- /dev/null +++ b/vendor/go.uber.org/zap/check_license.sh @@ -0,0 +1,17 @@ +#!/bin/bash -e + +ERROR_COUNT=0 +while read -r file +do + case "$(head -1 "${file}")" in + *"Copyright (c) "*" Uber Technologies, Inc.") + # everything's cool + ;; + *) + echo "$file is missing license header." + (( ERROR_COUNT++ )) + ;; + esac +done < <(git ls-files "*\.go") + +exit $ERROR_COUNT diff --git a/vendor/go.uber.org/zap/config.go b/vendor/go.uber.org/zap/config.go new file mode 100644 index 0000000..dae1303 --- /dev/null +++ b/vendor/go.uber.org/zap/config.go @@ -0,0 +1,243 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zap + +import ( + "sort" + "time" + + "go.uber.org/zap/zapcore" +) + +// SamplingConfig sets a sampling strategy for the logger. Sampling caps the +// global CPU and I/O load that logging puts on your process while attempting +// to preserve a representative subset of your logs. +// +// Values configured here are per-second. See zapcore.NewSampler for details. +type SamplingConfig struct { + Initial int `json:"initial" yaml:"initial"` + Thereafter int `json:"thereafter" yaml:"thereafter"` +} + +// Config offers a declarative way to construct a logger. It doesn't do +// anything that can't be done with New, Options, and the various +// zapcore.WriteSyncer and zapcore.Core wrappers, but it's a simpler way to +// toggle common options. +// +// Note that Config intentionally supports only the most common options. More +// unusual logging setups (logging to network connections or message queues, +// splitting output between multiple files, etc.) are possible, but require +// direct use of the zapcore package. For sample code, see the package-level +// BasicConfiguration and AdvancedConfiguration examples. +// +// For an example showing runtime log level changes, see the documentation for +// AtomicLevel. +type Config struct { + // Level is the minimum enabled logging level. Note that this is a dynamic + // level, so calling Config.Level.SetLevel will atomically change the log + // level of all loggers descended from this config. + Level AtomicLevel `json:"level" yaml:"level"` + // Development puts the logger in development mode, which changes the + // behavior of DPanicLevel and takes stacktraces more liberally. + Development bool `json:"development" yaml:"development"` + // DisableCaller stops annotating logs with the calling function's file + // name and line number. By default, all logs are annotated. + DisableCaller bool `json:"disableCaller" yaml:"disableCaller"` + // DisableStacktrace completely disables automatic stacktrace capturing. By + // default, stacktraces are captured for WarnLevel and above logs in + // development and ErrorLevel and above in production. + DisableStacktrace bool `json:"disableStacktrace" yaml:"disableStacktrace"` + // Sampling sets a sampling policy. A nil SamplingConfig disables sampling. + Sampling *SamplingConfig `json:"sampling" yaml:"sampling"` + // Encoding sets the logger's encoding. Valid values are "json" and + // "console", as well as any third-party encodings registered via + // RegisterEncoder. + Encoding string `json:"encoding" yaml:"encoding"` + // EncoderConfig sets options for the chosen encoder. See + // zapcore.EncoderConfig for details. + EncoderConfig zapcore.EncoderConfig `json:"encoderConfig" yaml:"encoderConfig"` + // OutputPaths is a list of paths to write logging output to. See Open for + // details. + OutputPaths []string `json:"outputPaths" yaml:"outputPaths"` + // ErrorOutputPaths is a list of paths to write internal logger errors to. + // The default is standard error. + // + // Note that this setting only affects internal errors; for sample code that + // sends error-level logs to a different location from info- and debug-level + // logs, see the package-level AdvancedConfiguration example. + ErrorOutputPaths []string `json:"errorOutputPaths" yaml:"errorOutputPaths"` + // InitialFields is a collection of fields to add to the root logger. + InitialFields map[string]interface{} `json:"initialFields" yaml:"initialFields"` +} + +// NewProductionEncoderConfig returns an opinionated EncoderConfig for +// production environments. +func NewProductionEncoderConfig() zapcore.EncoderConfig { + return zapcore.EncoderConfig{ + TimeKey: "ts", + LevelKey: "level", + NameKey: "logger", + CallerKey: "caller", + MessageKey: "msg", + StacktraceKey: "stacktrace", + LineEnding: zapcore.DefaultLineEnding, + EncodeLevel: zapcore.LowercaseLevelEncoder, + EncodeTime: zapcore.EpochTimeEncoder, + EncodeDuration: zapcore.SecondsDurationEncoder, + EncodeCaller: zapcore.ShortCallerEncoder, + } +} + +// NewProductionConfig is a reasonable production logging configuration. +// Logging is enabled at InfoLevel and above. +// +// It uses a JSON encoder, writes to standard error, and enables sampling. +// Stacktraces are automatically included on logs of ErrorLevel and above. +func NewProductionConfig() Config { + return Config{ + Level: NewAtomicLevelAt(InfoLevel), + Development: false, + Sampling: &SamplingConfig{ + Initial: 100, + Thereafter: 100, + }, + Encoding: "json", + EncoderConfig: NewProductionEncoderConfig(), + OutputPaths: []string{"stderr"}, + ErrorOutputPaths: []string{"stderr"}, + } +} + +// NewDevelopmentEncoderConfig returns an opinionated EncoderConfig for +// development environments. +func NewDevelopmentEncoderConfig() zapcore.EncoderConfig { + return zapcore.EncoderConfig{ + // Keys can be anything except the empty string. + TimeKey: "T", + LevelKey: "L", + NameKey: "N", + CallerKey: "C", + MessageKey: "M", + StacktraceKey: "S", + LineEnding: zapcore.DefaultLineEnding, + EncodeLevel: zapcore.CapitalLevelEncoder, + EncodeTime: zapcore.ISO8601TimeEncoder, + EncodeDuration: zapcore.StringDurationEncoder, + EncodeCaller: zapcore.ShortCallerEncoder, + } +} + +// NewDevelopmentConfig is a reasonable development logging configuration. +// Logging is enabled at DebugLevel and above. +// +// It enables development mode (which makes DPanicLevel logs panic), uses a +// console encoder, writes to standard error, and disables sampling. +// Stacktraces are automatically included on logs of WarnLevel and above. +func NewDevelopmentConfig() Config { + return Config{ + Level: NewAtomicLevelAt(DebugLevel), + Development: true, + Encoding: "console", + EncoderConfig: NewDevelopmentEncoderConfig(), + OutputPaths: []string{"stderr"}, + ErrorOutputPaths: []string{"stderr"}, + } +} + +// Build constructs a logger from the Config and Options. +func (cfg Config) Build(opts ...Option) (*Logger, error) { + enc, err := cfg.buildEncoder() + if err != nil { + return nil, err + } + + sink, errSink, err := cfg.openSinks() + if err != nil { + return nil, err + } + + log := New( + zapcore.NewCore(enc, sink, cfg.Level), + cfg.buildOptions(errSink)..., + ) + if len(opts) > 0 { + log = log.WithOptions(opts...) + } + return log, nil +} + +func (cfg Config) buildOptions(errSink zapcore.WriteSyncer) []Option { + opts := []Option{ErrorOutput(errSink)} + + if cfg.Development { + opts = append(opts, Development()) + } + + if !cfg.DisableCaller { + opts = append(opts, AddCaller()) + } + + stackLevel := ErrorLevel + if cfg.Development { + stackLevel = WarnLevel + } + if !cfg.DisableStacktrace { + opts = append(opts, AddStacktrace(stackLevel)) + } + + if cfg.Sampling != nil { + opts = append(opts, WrapCore(func(core zapcore.Core) zapcore.Core { + return zapcore.NewSampler(core, time.Second, int(cfg.Sampling.Initial), int(cfg.Sampling.Thereafter)) + })) + } + + if len(cfg.InitialFields) > 0 { + fs := make([]Field, 0, len(cfg.InitialFields)) + keys := make([]string, 0, len(cfg.InitialFields)) + for k := range cfg.InitialFields { + keys = append(keys, k) + } + sort.Strings(keys) + for _, k := range keys { + fs = append(fs, Any(k, cfg.InitialFields[k])) + } + opts = append(opts, Fields(fs...)) + } + + return opts +} + +func (cfg Config) openSinks() (zapcore.WriteSyncer, zapcore.WriteSyncer, error) { + sink, closeOut, err := Open(cfg.OutputPaths...) + if err != nil { + return nil, nil, err + } + errSink, _, err := Open(cfg.ErrorOutputPaths...) + if err != nil { + closeOut() + return nil, nil, err + } + return sink, errSink, nil +} + +func (cfg Config) buildEncoder() (zapcore.Encoder, error) { + return newEncoder(cfg.Encoding, cfg.EncoderConfig) +} diff --git a/vendor/go.uber.org/zap/doc.go b/vendor/go.uber.org/zap/doc.go new file mode 100644 index 0000000..3f16a8d --- /dev/null +++ b/vendor/go.uber.org/zap/doc.go @@ -0,0 +1,113 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +// Package zap provides fast, structured, leveled logging. +// +// For applications that log in the hot path, reflection-based serialization +// and string formatting are prohibitively expensive - they're CPU-intensive +// and make many small allocations. Put differently, using json.Marshal and +// fmt.Fprintf to log tons of interface{} makes your application slow. +// +// Zap takes a different approach. It includes a reflection-free, +// zero-allocation JSON encoder, and the base Logger strives to avoid +// serialization overhead and allocations wherever possible. By building the +// high-level SugaredLogger on that foundation, zap lets users choose when +// they need to count every allocation and when they'd prefer a more familiar, +// loosely typed API. +// +// Choosing a Logger +// +// In contexts where performance is nice, but not critical, use the +// SugaredLogger. It's 4-10x faster than other structured logging packages and +// supports both structured and printf-style logging. Like log15 and go-kit, +// the SugaredLogger's structured logging APIs are loosely typed and accept a +// variadic number of key-value pairs. (For more advanced use cases, they also +// accept strongly typed fields - see the SugaredLogger.With documentation for +// details.) +// sugar := zap.NewExample().Sugar() +// defer sugar.Sync() +// sugar.Infow("failed to fetch URL", +// "url", "http://example.com", +// "attempt", 3, +// "backoff", time.Second, +// ) +// sugar.Printf("failed to fetch URL: %s", "http://example.com") +// +// By default, loggers are unbuffered. However, since zap's low-level APIs +// allow buffering, calling Sync before letting your process exit is a good +// habit. +// +// In the rare contexts where every microsecond and every allocation matter, +// use the Logger. It's even faster than the SugaredLogger and allocates far +// less, but it only supports strongly-typed, structured logging. +// logger := zap.NewExample() +// defer logger.Sync() +// logger.Info("failed to fetch URL", +// zap.String("url", "http://example.com"), +// zap.Int("attempt", 3), +// zap.Duration("backoff", time.Second), +// ) +// +// Choosing between the Logger and SugaredLogger doesn't need to be an +// application-wide decision: converting between the two is simple and +// inexpensive. +// logger := zap.NewExample() +// defer logger.Sync() +// sugar := logger.Sugar() +// plain := sugar.Desugar() +// +// Configuring Zap +// +// The simplest way to build a Logger is to use zap's opinionated presets: +// NewExample, NewProduction, and NewDevelopment. These presets build a logger +// with a single function call: +// logger, err := zap.NewProduction() +// if err != nil { +// log.Fatalf("can't initialize zap logger: %v", err) +// } +// defer logger.Sync() +// +// Presets are fine for small projects, but larger projects and organizations +// naturally require a bit more customization. For most users, zap's Config +// struct strikes the right balance between flexibility and convenience. See +// the package-level BasicConfiguration example for sample code. +// +// More unusual configurations (splitting output between files, sending logs +// to a message queue, etc.) are possible, but require direct use of +// go.uber.org/zap/zapcore. See the package-level AdvancedConfiguration +// example for sample code. +// +// Extending Zap +// +// The zap package itself is a relatively thin wrapper around the interfaces +// in go.uber.org/zap/zapcore. Extending zap to support a new encoding (e.g., +// BSON), a new log sink (e.g., Kafka), or something more exotic (perhaps an +// exception aggregation service, like Sentry or Rollbar) typically requires +// implementing the zapcore.Encoder, zapcore.WriteSyncer, or zapcore.Core +// interfaces. See the zapcore documentation for details. +// +// Similarly, package authors can use the high-performance Encoder and Core +// implementations in the zapcore package to build their own loggers. +// +// Frequently Asked Questions +// +// An FAQ covering everything from installation errors to design decisions is +// available at https://github.com/uber-go/zap/blob/master/FAQ.md. +package zap // import "go.uber.org/zap" diff --git a/vendor/go.uber.org/zap/encoder.go b/vendor/go.uber.org/zap/encoder.go new file mode 100644 index 0000000..2e9d3c3 --- /dev/null +++ b/vendor/go.uber.org/zap/encoder.go @@ -0,0 +1,75 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zap + +import ( + "errors" + "fmt" + "sync" + + "go.uber.org/zap/zapcore" +) + +var ( + errNoEncoderNameSpecified = errors.New("no encoder name specified") + + _encoderNameToConstructor = map[string]func(zapcore.EncoderConfig) (zapcore.Encoder, error){ + "console": func(encoderConfig zapcore.EncoderConfig) (zapcore.Encoder, error) { + return zapcore.NewConsoleEncoder(encoderConfig), nil + }, + "json": func(encoderConfig zapcore.EncoderConfig) (zapcore.Encoder, error) { + return zapcore.NewJSONEncoder(encoderConfig), nil + }, + } + _encoderMutex sync.RWMutex +) + +// RegisterEncoder registers an encoder constructor, which the Config struct +// can then reference. By default, the "json" and "console" encoders are +// registered. +// +// Attempting to register an encoder whose name is already taken returns an +// error. +func RegisterEncoder(name string, constructor func(zapcore.EncoderConfig) (zapcore.Encoder, error)) error { + _encoderMutex.Lock() + defer _encoderMutex.Unlock() + if name == "" { + return errNoEncoderNameSpecified + } + if _, ok := _encoderNameToConstructor[name]; ok { + return fmt.Errorf("encoder already registered for name %q", name) + } + _encoderNameToConstructor[name] = constructor + return nil +} + +func newEncoder(name string, encoderConfig zapcore.EncoderConfig) (zapcore.Encoder, error) { + _encoderMutex.RLock() + defer _encoderMutex.RUnlock() + if name == "" { + return nil, errNoEncoderNameSpecified + } + constructor, ok := _encoderNameToConstructor[name] + if !ok { + return nil, fmt.Errorf("no encoder registered for name %q", name) + } + return constructor(encoderConfig) +} diff --git a/vendor/go.uber.org/zap/error.go b/vendor/go.uber.org/zap/error.go new file mode 100644 index 0000000..65982a5 --- /dev/null +++ b/vendor/go.uber.org/zap/error.go @@ -0,0 +1,80 @@ +// Copyright (c) 2017 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zap + +import ( + "sync" + + "go.uber.org/zap/zapcore" +) + +var _errArrayElemPool = sync.Pool{New: func() interface{} { + return &errArrayElem{} +}} + +// Error is shorthand for the common idiom NamedError("error", err). +func Error(err error) Field { + return NamedError("error", err) +} + +// NamedError constructs a field that lazily stores err.Error() under the +// provided key. Errors which also implement fmt.Formatter (like those produced +// by github.com/pkg/errors) will also have their verbose representation stored +// under key+"Verbose". If passed a nil error, the field is a no-op. +// +// For the common case in which the key is simply "error", the Error function +// is shorter and less repetitive. +func NamedError(key string, err error) Field { + if err == nil { + return Skip() + } + return Field{Key: key, Type: zapcore.ErrorType, Interface: err} +} + +type errArray []error + +func (errs errArray) MarshalLogArray(arr zapcore.ArrayEncoder) error { + for i := range errs { + if errs[i] == nil { + continue + } + // To represent each error as an object with an "error" attribute and + // potentially an "errorVerbose" attribute, we need to wrap it in a + // type that implements LogObjectMarshaler. To prevent this from + // allocating, pool the wrapper type. + elem := _errArrayElemPool.Get().(*errArrayElem) + elem.error = errs[i] + arr.AppendObject(elem) + elem.error = nil + _errArrayElemPool.Put(elem) + } + return nil +} + +type errArrayElem struct { + error +} + +func (e *errArrayElem) MarshalLogObject(enc zapcore.ObjectEncoder) error { + // Re-use the error field's logic, which supports non-standard error types. + Error(e.error).AddTo(enc) + return nil +} diff --git a/vendor/go.uber.org/zap/field.go b/vendor/go.uber.org/zap/field.go new file mode 100644 index 0000000..5130e13 --- /dev/null +++ b/vendor/go.uber.org/zap/field.go @@ -0,0 +1,310 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zap + +import ( + "fmt" + "math" + "time" + + "go.uber.org/zap/zapcore" +) + +// Field is an alias for Field. Aliasing this type dramatically +// improves the navigability of this package's API documentation. +type Field = zapcore.Field + +// Skip constructs a no-op field, which is often useful when handling invalid +// inputs in other Field constructors. +func Skip() Field { + return Field{Type: zapcore.SkipType} +} + +// Binary constructs a field that carries an opaque binary blob. +// +// Binary data is serialized in an encoding-appropriate format. For example, +// zap's JSON encoder base64-encodes binary blobs. To log UTF-8 encoded text, +// use ByteString. +func Binary(key string, val []byte) Field { + return Field{Key: key, Type: zapcore.BinaryType, Interface: val} +} + +// Bool constructs a field that carries a bool. +func Bool(key string, val bool) Field { + var ival int64 + if val { + ival = 1 + } + return Field{Key: key, Type: zapcore.BoolType, Integer: ival} +} + +// ByteString constructs a field that carries UTF-8 encoded text as a []byte. +// To log opaque binary blobs (which aren't necessarily valid UTF-8), use +// Binary. +func ByteString(key string, val []byte) Field { + return Field{Key: key, Type: zapcore.ByteStringType, Interface: val} +} + +// Complex128 constructs a field that carries a complex number. Unlike most +// numeric fields, this costs an allocation (to convert the complex128 to +// interface{}). +func Complex128(key string, val complex128) Field { + return Field{Key: key, Type: zapcore.Complex128Type, Interface: val} +} + +// Complex64 constructs a field that carries a complex number. Unlike most +// numeric fields, this costs an allocation (to convert the complex64 to +// interface{}). +func Complex64(key string, val complex64) Field { + return Field{Key: key, Type: zapcore.Complex64Type, Interface: val} +} + +// Float64 constructs a field that carries a float64. The way the +// floating-point value is represented is encoder-dependent, so marshaling is +// necessarily lazy. +func Float64(key string, val float64) Field { + return Field{Key: key, Type: zapcore.Float64Type, Integer: int64(math.Float64bits(val))} +} + +// Float32 constructs a field that carries a float32. The way the +// floating-point value is represented is encoder-dependent, so marshaling is +// necessarily lazy. +func Float32(key string, val float32) Field { + return Field{Key: key, Type: zapcore.Float32Type, Integer: int64(math.Float32bits(val))} +} + +// Int constructs a field with the given key and value. +func Int(key string, val int) Field { + return Int64(key, int64(val)) +} + +// Int64 constructs a field with the given key and value. +func Int64(key string, val int64) Field { + return Field{Key: key, Type: zapcore.Int64Type, Integer: val} +} + +// Int32 constructs a field with the given key and value. +func Int32(key string, val int32) Field { + return Field{Key: key, Type: zapcore.Int32Type, Integer: int64(val)} +} + +// Int16 constructs a field with the given key and value. +func Int16(key string, val int16) Field { + return Field{Key: key, Type: zapcore.Int16Type, Integer: int64(val)} +} + +// Int8 constructs a field with the given key and value. +func Int8(key string, val int8) Field { + return Field{Key: key, Type: zapcore.Int8Type, Integer: int64(val)} +} + +// String constructs a field with the given key and value. +func String(key string, val string) Field { + return Field{Key: key, Type: zapcore.StringType, String: val} +} + +// Uint constructs a field with the given key and value. +func Uint(key string, val uint) Field { + return Uint64(key, uint64(val)) +} + +// Uint64 constructs a field with the given key and value. +func Uint64(key string, val uint64) Field { + return Field{Key: key, Type: zapcore.Uint64Type, Integer: int64(val)} +} + +// Uint32 constructs a field with the given key and value. +func Uint32(key string, val uint32) Field { + return Field{Key: key, Type: zapcore.Uint32Type, Integer: int64(val)} +} + +// Uint16 constructs a field with the given key and value. +func Uint16(key string, val uint16) Field { + return Field{Key: key, Type: zapcore.Uint16Type, Integer: int64(val)} +} + +// Uint8 constructs a field with the given key and value. +func Uint8(key string, val uint8) Field { + return Field{Key: key, Type: zapcore.Uint8Type, Integer: int64(val)} +} + +// Uintptr constructs a field with the given key and value. +func Uintptr(key string, val uintptr) Field { + return Field{Key: key, Type: zapcore.UintptrType, Integer: int64(val)} +} + +// Reflect constructs a field with the given key and an arbitrary object. It uses +// an encoding-appropriate, reflection-based function to lazily serialize nearly +// any object into the logging context, but it's relatively slow and +// allocation-heavy. Outside tests, Any is always a better choice. +// +// If encoding fails (e.g., trying to serialize a map[int]string to JSON), Reflect +// includes the error message in the final log output. +func Reflect(key string, val interface{}) Field { + return Field{Key: key, Type: zapcore.ReflectType, Interface: val} +} + +// Namespace creates a named, isolated scope within the logger's context. All +// subsequent fields will be added to the new namespace. +// +// This helps prevent key collisions when injecting loggers into sub-components +// or third-party libraries. +func Namespace(key string) Field { + return Field{Key: key, Type: zapcore.NamespaceType} +} + +// Stringer constructs a field with the given key and the output of the value's +// String method. The Stringer's String method is called lazily. +func Stringer(key string, val fmt.Stringer) Field { + return Field{Key: key, Type: zapcore.StringerType, Interface: val} +} + +// Time constructs a Field with the given key and value. The encoder +// controls how the time is serialized. +func Time(key string, val time.Time) Field { + return Field{Key: key, Type: zapcore.TimeType, Integer: val.UnixNano(), Interface: val.Location()} +} + +// Stack constructs a field that stores a stacktrace of the current goroutine +// under provided key. Keep in mind that taking a stacktrace is eager and +// expensive (relatively speaking); this function both makes an allocation and +// takes about two microseconds. +func Stack(key string) Field { + // Returning the stacktrace as a string costs an allocation, but saves us + // from expanding the zapcore.Field union struct to include a byte slice. Since + // taking a stacktrace is already so expensive (~10us), the extra allocation + // is okay. + return String(key, takeStacktrace()) +} + +// Duration constructs a field with the given key and value. The encoder +// controls how the duration is serialized. +func Duration(key string, val time.Duration) Field { + return Field{Key: key, Type: zapcore.DurationType, Integer: int64(val)} +} + +// Object constructs a field with the given key and ObjectMarshaler. It +// provides a flexible, but still type-safe and efficient, way to add map- or +// struct-like user-defined types to the logging context. The struct's +// MarshalLogObject method is called lazily. +func Object(key string, val zapcore.ObjectMarshaler) Field { + return Field{Key: key, Type: zapcore.ObjectMarshalerType, Interface: val} +} + +// Any takes a key and an arbitrary value and chooses the best way to represent +// them as a field, falling back to a reflection-based approach only if +// necessary. +// +// Since byte/uint8 and rune/int32 are aliases, Any can't differentiate between +// them. To minimize surprises, []byte values are treated as binary blobs, byte +// values are treated as uint8, and runes are always treated as integers. +func Any(key string, value interface{}) Field { + switch val := value.(type) { + case zapcore.ObjectMarshaler: + return Object(key, val) + case zapcore.ArrayMarshaler: + return Array(key, val) + case bool: + return Bool(key, val) + case []bool: + return Bools(key, val) + case complex128: + return Complex128(key, val) + case []complex128: + return Complex128s(key, val) + case complex64: + return Complex64(key, val) + case []complex64: + return Complex64s(key, val) + case float64: + return Float64(key, val) + case []float64: + return Float64s(key, val) + case float32: + return Float32(key, val) + case []float32: + return Float32s(key, val) + case int: + return Int(key, val) + case []int: + return Ints(key, val) + case int64: + return Int64(key, val) + case []int64: + return Int64s(key, val) + case int32: + return Int32(key, val) + case []int32: + return Int32s(key, val) + case int16: + return Int16(key, val) + case []int16: + return Int16s(key, val) + case int8: + return Int8(key, val) + case []int8: + return Int8s(key, val) + case string: + return String(key, val) + case []string: + return Strings(key, val) + case uint: + return Uint(key, val) + case []uint: + return Uints(key, val) + case uint64: + return Uint64(key, val) + case []uint64: + return Uint64s(key, val) + case uint32: + return Uint32(key, val) + case []uint32: + return Uint32s(key, val) + case uint16: + return Uint16(key, val) + case []uint16: + return Uint16s(key, val) + case uint8: + return Uint8(key, val) + case []byte: + return Binary(key, val) + case uintptr: + return Uintptr(key, val) + case []uintptr: + return Uintptrs(key, val) + case time.Time: + return Time(key, val) + case []time.Time: + return Times(key, val) + case time.Duration: + return Duration(key, val) + case []time.Duration: + return Durations(key, val) + case error: + return NamedError(key, val) + case []error: + return Errors(key, val) + case fmt.Stringer: + return Stringer(key, val) + default: + return Reflect(key, val) + } +} diff --git a/vendor/go.uber.org/zap/flag.go b/vendor/go.uber.org/zap/flag.go new file mode 100644 index 0000000..1312875 --- /dev/null +++ b/vendor/go.uber.org/zap/flag.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zap + +import ( + "flag" + + "go.uber.org/zap/zapcore" +) + +// LevelFlag uses the standard library's flag.Var to declare a global flag +// with the specified name, default, and usage guidance. The returned value is +// a pointer to the value of the flag. +// +// If you don't want to use the flag package's global state, you can use any +// non-nil *Level as a flag.Value with your own *flag.FlagSet. +func LevelFlag(name string, defaultLevel zapcore.Level, usage string) *zapcore.Level { + lvl := defaultLevel + flag.Var(&lvl, name, usage) + return &lvl +} diff --git a/vendor/go.uber.org/zap/glide.lock b/vendor/go.uber.org/zap/glide.lock new file mode 100644 index 0000000..881b462 --- /dev/null +++ b/vendor/go.uber.org/zap/glide.lock @@ -0,0 +1,76 @@ +hash: f073ba522c06c88ea3075bde32a8aaf0969a840a66cab6318a0897d141ffee92 +updated: 2017-07-22T18:06:49.598185334-07:00 +imports: +- name: go.uber.org/atomic + version: 4e336646b2ef9fc6e47be8e21594178f98e5ebcf +- name: go.uber.org/multierr + version: 3c4937480c32f4c13a875a1829af76c98ca3d40a +testImports: +- name: github.com/apex/log + version: d9b960447bfa720077b2da653cc79e533455b499 + subpackages: + - handlers/json +- name: github.com/axw/gocov + version: 3a69a0d2a4ef1f263e2d92b041a69593d6964fe8 + subpackages: + - gocov +- name: github.com/davecgh/go-spew + version: 04cdfd42973bb9c8589fd6a731800cf222fde1a9 + subpackages: + - spew +- name: github.com/fatih/color + version: 62e9147c64a1ed519147b62a56a14e83e2be02c1 +- name: github.com/go-kit/kit + version: e10f5bf035be9af21fd5b2fb4469d5716c6ab07d + subpackages: + - log +- name: github.com/go-logfmt/logfmt + version: 390ab7935ee28ec6b286364bba9b4dd6410cb3d5 +- name: github.com/go-stack/stack + version: 54be5f394ed2c3e19dac9134a40a95ba5a017f7b +- name: github.com/golang/lint + version: c5fb716d6688a859aae56d26d3e6070808df29f7 + subpackages: + - golint +- name: github.com/kr/logfmt + version: b84e30acd515aadc4b783ad4ff83aff3299bdfe0 +- name: github.com/mattn/go-colorable + version: 3fa8c76f9daed4067e4a806fb7e4dc86455c6d6a +- name: github.com/mattn/go-isatty + version: fc9e8d8ef48496124e79ae0df75490096eccf6fe +- name: github.com/mattn/goveralls + version: 6efce81852ad1b7567c17ad71b03aeccc9dd9ae0 +- name: github.com/pborman/uuid + version: e790cca94e6cc75c7064b1332e63811d4aae1a53 +- name: github.com/pkg/errors + version: 645ef00459ed84a119197bfb8d8205042c6df63d +- name: github.com/pmezard/go-difflib + version: d8ed2627bdf02c080bf22230dbb337003b7aba2d + subpackages: + - difflib +- name: github.com/rs/zerolog + version: eed4c2b94d945e0b2456ad6aa518a443986b5f22 +- name: github.com/satori/go.uuid + version: 5bf94b69c6b68ee1b541973bb8e1144db23a194b +- name: github.com/sirupsen/logrus + version: 7dd06bf38e1e13df288d471a57d5adbac106be9e +- name: github.com/stretchr/testify + version: f6abca593680b2315d2075e0f5e2a9751e3f431a + subpackages: + - assert + - require +- name: go.pedge.io/lion + version: 87958e8713f1fa138d993087133b97e976642159 +- name: golang.org/x/sys + version: c4489faa6e5ab84c0ef40d6ee878f7a030281f0f + subpackages: + - unix +- name: golang.org/x/tools + version: 496819729719f9d07692195e0a94d6edd2251389 + subpackages: + - cover +- name: gopkg.in/inconshreveable/log15.v2 + version: b105bd37f74e5d9dc7b6ad7806715c7a2b83fd3f + subpackages: + - stack + - term diff --git a/vendor/go.uber.org/zap/glide.yaml b/vendor/go.uber.org/zap/glide.yaml new file mode 100644 index 0000000..9441259 --- /dev/null +++ b/vendor/go.uber.org/zap/glide.yaml @@ -0,0 +1,35 @@ +package: go.uber.org/zap +license: MIT +import: +- package: go.uber.org/atomic + version: ^1 +- package: go.uber.org/multierr + version: ^1 +testImport: +- package: github.com/satori/go.uuid +- package: github.com/sirupsen/logrus +- package: github.com/apex/log + subpackages: + - handlers/json +- package: github.com/go-kit/kit + subpackages: + - log +- package: github.com/stretchr/testify + subpackages: + - assert + - require +- package: gopkg.in/inconshreveable/log15.v2 +- package: github.com/mattn/goveralls +- package: github.com/pborman/uuid +- package: github.com/pkg/errors +- package: go.pedge.io/lion +- package: github.com/rs/zerolog +- package: golang.org/x/tools + subpackages: + - cover +- package: github.com/golang/lint + subpackages: + - golint +- package: github.com/axw/gocov + subpackages: + - gocov diff --git a/vendor/go.uber.org/zap/global.go b/vendor/go.uber.org/zap/global.go new file mode 100644 index 0000000..d02232e --- /dev/null +++ b/vendor/go.uber.org/zap/global.go @@ -0,0 +1,169 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zap + +import ( + "bytes" + "fmt" + "log" + "os" + "sync" + + "go.uber.org/zap/zapcore" +) + +const ( + _stdLogDefaultDepth = 2 + _loggerWriterDepth = 2 + _programmerErrorTemplate = "You've found a bug in zap! Please file a bug at " + + "https://github.com/uber-go/zap/issues/new and reference this error: %v" +) + +var ( + _globalMu sync.RWMutex + _globalL = NewNop() + _globalS = _globalL.Sugar() +) + +// L returns the global Logger, which can be reconfigured with ReplaceGlobals. +// It's safe for concurrent use. +func L() *Logger { + _globalMu.RLock() + l := _globalL + _globalMu.RUnlock() + return l +} + +// S returns the global SugaredLogger, which can be reconfigured with +// ReplaceGlobals. It's safe for concurrent use. +func S() *SugaredLogger { + _globalMu.RLock() + s := _globalS + _globalMu.RUnlock() + return s +} + +// ReplaceGlobals replaces the global Logger and SugaredLogger, and returns a +// function to restore the original values. It's safe for concurrent use. +func ReplaceGlobals(logger *Logger) func() { + _globalMu.Lock() + prev := _globalL + _globalL = logger + _globalS = logger.Sugar() + _globalMu.Unlock() + return func() { ReplaceGlobals(prev) } +} + +// NewStdLog returns a *log.Logger which writes to the supplied zap Logger at +// InfoLevel. To redirect the standard library's package-global logging +// functions, use RedirectStdLog instead. +func NewStdLog(l *Logger) *log.Logger { + logger := l.WithOptions(AddCallerSkip(_stdLogDefaultDepth + _loggerWriterDepth)) + f := logger.Info + return log.New(&loggerWriter{f}, "" /* prefix */, 0 /* flags */) +} + +// NewStdLogAt returns *log.Logger which writes to supplied zap logger at +// required level. +func NewStdLogAt(l *Logger, level zapcore.Level) (*log.Logger, error) { + logger := l.WithOptions(AddCallerSkip(_stdLogDefaultDepth + _loggerWriterDepth)) + logFunc, err := levelToFunc(logger, level) + if err != nil { + return nil, err + } + return log.New(&loggerWriter{logFunc}, "" /* prefix */, 0 /* flags */), nil +} + +// RedirectStdLog redirects output from the standard library's package-global +// logger to the supplied logger at InfoLevel. Since zap already handles caller +// annotations, timestamps, etc., it automatically disables the standard +// library's annotations and prefixing. +// +// It returns a function to restore the original prefix and flags and reset the +// standard library's output to os.Stderr. +func RedirectStdLog(l *Logger) func() { + f, err := redirectStdLogAt(l, InfoLevel) + if err != nil { + // Can't get here, since passing InfoLevel to redirectStdLogAt always + // works. + panic(fmt.Sprintf(_programmerErrorTemplate, err)) + } + return f +} + +// RedirectStdLogAt redirects output from the standard library's package-global +// logger to the supplied logger at the specified level. Since zap already +// handles caller annotations, timestamps, etc., it automatically disables the +// standard library's annotations and prefixing. +// +// It returns a function to restore the original prefix and flags and reset the +// standard library's output to os.Stderr. +func RedirectStdLogAt(l *Logger, level zapcore.Level) (func(), error) { + return redirectStdLogAt(l, level) +} + +func redirectStdLogAt(l *Logger, level zapcore.Level) (func(), error) { + flags := log.Flags() + prefix := log.Prefix() + log.SetFlags(0) + log.SetPrefix("") + logger := l.WithOptions(AddCallerSkip(_stdLogDefaultDepth + _loggerWriterDepth)) + logFunc, err := levelToFunc(logger, level) + if err != nil { + return nil, err + } + log.SetOutput(&loggerWriter{logFunc}) + return func() { + log.SetFlags(flags) + log.SetPrefix(prefix) + log.SetOutput(os.Stderr) + }, nil +} + +func levelToFunc(logger *Logger, lvl zapcore.Level) (func(string, ...Field), error) { + switch lvl { + case DebugLevel: + return logger.Debug, nil + case InfoLevel: + return logger.Info, nil + case WarnLevel: + return logger.Warn, nil + case ErrorLevel: + return logger.Error, nil + case DPanicLevel: + return logger.DPanic, nil + case PanicLevel: + return logger.Panic, nil + case FatalLevel: + return logger.Fatal, nil + } + return nil, fmt.Errorf("unrecognized level: %q", lvl) +} + +type loggerWriter struct { + logFunc func(msg string, fields ...Field) +} + +func (l *loggerWriter) Write(p []byte) (int, error) { + p = bytes.TrimSpace(p) + l.logFunc(string(p)) + return len(p), nil +} diff --git a/vendor/go.uber.org/zap/http_handler.go b/vendor/go.uber.org/zap/http_handler.go new file mode 100644 index 0000000..f171c38 --- /dev/null +++ b/vendor/go.uber.org/zap/http_handler.go @@ -0,0 +1,81 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zap + +import ( + "encoding/json" + "fmt" + "net/http" + + "go.uber.org/zap/zapcore" +) + +// ServeHTTP is a simple JSON endpoint that can report on or change the current +// logging level. +// +// GET requests return a JSON description of the current logging level. PUT +// requests change the logging level and expect a payload like: +// {"level":"info"} +// +// It's perfectly safe to change the logging level while a program is running. +func (lvl AtomicLevel) ServeHTTP(w http.ResponseWriter, r *http.Request) { + type errorResponse struct { + Error string `json:"error"` + } + type payload struct { + Level *zapcore.Level `json:"level"` + } + + enc := json.NewEncoder(w) + + switch r.Method { + + case "GET": + current := lvl.Level() + enc.Encode(payload{Level: ¤t}) + + case "PUT": + var req payload + + if errmess := func() string { + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + return fmt.Sprintf("Request body must be well-formed JSON: %v", err) + } + if req.Level == nil { + return "Must specify a logging level." + } + return "" + }(); errmess != "" { + w.WriteHeader(http.StatusBadRequest) + enc.Encode(errorResponse{Error: errmess}) + return + } + + lvl.SetLevel(*req.Level) + enc.Encode(req) + + default: + w.WriteHeader(http.StatusMethodNotAllowed) + enc.Encode(errorResponse{ + Error: "Only GET and PUT are supported.", + }) + } +} diff --git a/vendor/go.uber.org/zap/internal/bufferpool/bufferpool.go b/vendor/go.uber.org/zap/internal/bufferpool/bufferpool.go new file mode 100644 index 0000000..dad583a --- /dev/null +++ b/vendor/go.uber.org/zap/internal/bufferpool/bufferpool.go @@ -0,0 +1,31 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +// Package bufferpool houses zap's shared internal buffer pool. Third-party +// packages can recreate the same functionality with buffers.NewPool. +package bufferpool + +import "go.uber.org/zap/buffer" + +var ( + _pool = buffer.NewPool() + // Get retrieves a buffer from the pool, creating one if necessary. + Get = _pool.Get +) diff --git a/vendor/go.uber.org/zap/internal/color/color.go b/vendor/go.uber.org/zap/internal/color/color.go new file mode 100644 index 0000000..c4d5d02 --- /dev/null +++ b/vendor/go.uber.org/zap/internal/color/color.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +// Package color adds coloring functionality for TTY output. +package color + +import "fmt" + +// Foreground colors. +const ( + Black Color = iota + 30 + Red + Green + Yellow + Blue + Magenta + Cyan + White +) + +// Color represents a text color. +type Color uint8 + +// Add adds the coloring to the given string. +func (c Color) Add(s string) string { + return fmt.Sprintf("\x1b[%dm%s\x1b[0m", uint8(c), s) +} diff --git a/vendor/go.uber.org/zap/internal/exit/exit.go b/vendor/go.uber.org/zap/internal/exit/exit.go new file mode 100644 index 0000000..dfc5b05 --- /dev/null +++ b/vendor/go.uber.org/zap/internal/exit/exit.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +// Package exit provides stubs so that unit tests can exercise code that calls +// os.Exit(1). +package exit + +import "os" + +var real = func() { os.Exit(1) } + +// Exit normally terminates the process by calling os.Exit(1). If the package +// is stubbed, it instead records a call in the testing spy. +func Exit() { + real() +} + +// A StubbedExit is a testing fake for os.Exit. +type StubbedExit struct { + Exited bool + prev func() +} + +// Stub substitutes a fake for the call to os.Exit(1). +func Stub() *StubbedExit { + s := &StubbedExit{prev: real} + real = s.exit + return s +} + +// WithStub runs the supplied function with Exit stubbed. It returns the stub +// used, so that users can test whether the process would have crashed. +func WithStub(f func()) *StubbedExit { + s := Stub() + defer s.Unstub() + f() + return s +} + +// Unstub restores the previous exit function. +func (se *StubbedExit) Unstub() { + real = se.prev +} + +func (se *StubbedExit) exit() { + se.Exited = true +} diff --git a/vendor/go.uber.org/zap/level.go b/vendor/go.uber.org/zap/level.go new file mode 100644 index 0000000..3567a9a --- /dev/null +++ b/vendor/go.uber.org/zap/level.go @@ -0,0 +1,132 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zap + +import ( + "go.uber.org/atomic" + "go.uber.org/zap/zapcore" +) + +const ( + // DebugLevel logs are typically voluminous, and are usually disabled in + // production. + DebugLevel = zapcore.DebugLevel + // InfoLevel is the default logging priority. + InfoLevel = zapcore.InfoLevel + // WarnLevel logs are more important than Info, but don't need individual + // human review. + WarnLevel = zapcore.WarnLevel + // ErrorLevel logs are high-priority. If an application is running smoothly, + // it shouldn't generate any error-level logs. + ErrorLevel = zapcore.ErrorLevel + // DPanicLevel logs are particularly important errors. In development the + // logger panics after writing the message. + DPanicLevel = zapcore.DPanicLevel + // PanicLevel logs a message, then panics. + PanicLevel = zapcore.PanicLevel + // FatalLevel logs a message, then calls os.Exit(1). + FatalLevel = zapcore.FatalLevel +) + +// LevelEnablerFunc is a convenient way to implement zapcore.LevelEnabler with +// an anonymous function. +// +// It's particularly useful when splitting log output between different +// outputs (e.g., standard error and standard out). For sample code, see the +// package-level AdvancedConfiguration example. +type LevelEnablerFunc func(zapcore.Level) bool + +// Enabled calls the wrapped function. +func (f LevelEnablerFunc) Enabled(lvl zapcore.Level) bool { return f(lvl) } + +// An AtomicLevel is an atomically changeable, dynamic logging level. It lets +// you safely change the log level of a tree of loggers (the root logger and +// any children created by adding context) at runtime. +// +// The AtomicLevel itself is an http.Handler that serves a JSON endpoint to +// alter its level. +// +// AtomicLevels must be created with the NewAtomicLevel constructor to allocate +// their internal atomic pointer. +type AtomicLevel struct { + l *atomic.Int32 +} + +// NewAtomicLevel creates an AtomicLevel with InfoLevel and above logging +// enabled. +func NewAtomicLevel() AtomicLevel { + return AtomicLevel{ + l: atomic.NewInt32(int32(InfoLevel)), + } +} + +// NewAtomicLevelAt is a convenience function that creates an AtomicLevel +// and then calls SetLevel with the given level. +func NewAtomicLevelAt(l zapcore.Level) AtomicLevel { + a := NewAtomicLevel() + a.SetLevel(l) + return a +} + +// Enabled implements the zapcore.LevelEnabler interface, which allows the +// AtomicLevel to be used in place of traditional static levels. +func (lvl AtomicLevel) Enabled(l zapcore.Level) bool { + return lvl.Level().Enabled(l) +} + +// Level returns the minimum enabled log level. +func (lvl AtomicLevel) Level() zapcore.Level { + return zapcore.Level(int8(lvl.l.Load())) +} + +// SetLevel alters the logging level. +func (lvl AtomicLevel) SetLevel(l zapcore.Level) { + lvl.l.Store(int32(l)) +} + +// String returns the string representation of the underlying Level. +func (lvl AtomicLevel) String() string { + return lvl.Level().String() +} + +// UnmarshalText unmarshals the text to an AtomicLevel. It uses the same text +// representations as the static zapcore.Levels ("debug", "info", "warn", +// "error", "dpanic", "panic", and "fatal"). +func (lvl *AtomicLevel) UnmarshalText(text []byte) error { + if lvl.l == nil { + lvl.l = &atomic.Int32{} + } + + var l zapcore.Level + if err := l.UnmarshalText(text); err != nil { + return err + } + + lvl.SetLevel(l) + return nil +} + +// MarshalText marshals the AtomicLevel to a byte slice. It uses the same +// text representation as the static zapcore.Levels ("debug", "info", "warn", +// "error", "dpanic", "panic", and "fatal"). +func (lvl AtomicLevel) MarshalText() (text []byte, err error) { + return lvl.Level().MarshalText() +} diff --git a/vendor/go.uber.org/zap/logger.go b/vendor/go.uber.org/zap/logger.go new file mode 100644 index 0000000..dc8f6e3 --- /dev/null +++ b/vendor/go.uber.org/zap/logger.go @@ -0,0 +1,305 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zap + +import ( + "fmt" + "io/ioutil" + "os" + "runtime" + "strings" + "time" + + "go.uber.org/zap/zapcore" +) + +// A Logger provides fast, leveled, structured logging. All methods are safe +// for concurrent use. +// +// The Logger is designed for contexts in which every microsecond and every +// allocation matters, so its API intentionally favors performance and type +// safety over brevity. For most applications, the SugaredLogger strikes a +// better balance between performance and ergonomics. +type Logger struct { + core zapcore.Core + + development bool + name string + errorOutput zapcore.WriteSyncer + + addCaller bool + addStack zapcore.LevelEnabler + + callerSkip int +} + +// New constructs a new Logger from the provided zapcore.Core and Options. If +// the passed zapcore.Core is nil, it falls back to using a no-op +// implementation. +// +// This is the most flexible way to construct a Logger, but also the most +// verbose. For typical use cases, the highly-opinionated presets +// (NewProduction, NewDevelopment, and NewExample) or the Config struct are +// more convenient. +// +// For sample code, see the package-level AdvancedConfiguration example. +func New(core zapcore.Core, options ...Option) *Logger { + if core == nil { + return NewNop() + } + log := &Logger{ + core: core, + errorOutput: zapcore.Lock(os.Stderr), + addStack: zapcore.FatalLevel + 1, + } + return log.WithOptions(options...) +} + +// NewNop returns a no-op Logger. It never writes out logs or internal errors, +// and it never runs user-defined hooks. +// +// Using WithOptions to replace the Core or error output of a no-op Logger can +// re-enable logging. +func NewNop() *Logger { + return &Logger{ + core: zapcore.NewNopCore(), + errorOutput: zapcore.AddSync(ioutil.Discard), + addStack: zapcore.FatalLevel + 1, + } +} + +// NewProduction builds a sensible production Logger that writes InfoLevel and +// above logs to standard error as JSON. +// +// It's a shortcut for NewProductionConfig().Build(...Option). +func NewProduction(options ...Option) (*Logger, error) { + return NewProductionConfig().Build(options...) +} + +// NewDevelopment builds a development Logger that writes DebugLevel and above +// logs to standard error in a human-friendly format. +// +// It's a shortcut for NewDevelopmentConfig().Build(...Option). +func NewDevelopment(options ...Option) (*Logger, error) { + return NewDevelopmentConfig().Build(options...) +} + +// NewExample builds a Logger that's designed for use in zap's testable +// examples. It writes DebugLevel and above logs to standard out as JSON, but +// omits the timestamp and calling function to keep example output +// short and deterministic. +func NewExample(options ...Option) *Logger { + encoderCfg := zapcore.EncoderConfig{ + MessageKey: "msg", + LevelKey: "level", + NameKey: "logger", + EncodeLevel: zapcore.LowercaseLevelEncoder, + EncodeTime: zapcore.ISO8601TimeEncoder, + EncodeDuration: zapcore.StringDurationEncoder, + } + core := zapcore.NewCore(zapcore.NewJSONEncoder(encoderCfg), os.Stdout, DebugLevel) + return New(core).WithOptions(options...) +} + +// Sugar wraps the Logger to provide a more ergonomic, but slightly slower, +// API. Sugaring a Logger is quite inexpensive, so it's reasonable for a +// single application to use both Loggers and SugaredLoggers, converting +// between them on the boundaries of performance-sensitive code. +func (log *Logger) Sugar() *SugaredLogger { + core := log.clone() + core.callerSkip += 2 + return &SugaredLogger{core} +} + +// Named adds a new path segment to the logger's name. Segments are joined by +// periods. By default, Loggers are unnamed. +func (log *Logger) Named(s string) *Logger { + if s == "" { + return log + } + l := log.clone() + if log.name == "" { + l.name = s + } else { + l.name = strings.Join([]string{l.name, s}, ".") + } + return l +} + +// WithOptions clones the current Logger, applies the supplied Options, and +// returns the resulting Logger. It's safe to use concurrently. +func (log *Logger) WithOptions(opts ...Option) *Logger { + c := log.clone() + for _, opt := range opts { + opt.apply(c) + } + return c +} + +// With creates a child logger and adds structured context to it. Fields added +// to the child don't affect the parent, and vice versa. +func (log *Logger) With(fields ...Field) *Logger { + if len(fields) == 0 { + return log + } + l := log.clone() + l.core = l.core.With(fields) + return l +} + +// Check returns a CheckedEntry if logging a message at the specified level +// is enabled. It's a completely optional optimization; in high-performance +// applications, Check can help avoid allocating a slice to hold fields. +func (log *Logger) Check(lvl zapcore.Level, msg string) *zapcore.CheckedEntry { + return log.check(lvl, msg) +} + +// Debug logs a message at DebugLevel. The message includes any fields passed +// at the log site, as well as any fields accumulated on the logger. +func (log *Logger) Debug(msg string, fields ...Field) { + if ce := log.check(DebugLevel, msg); ce != nil { + ce.Write(fields...) + } +} + +// Info logs a message at InfoLevel. The message includes any fields passed +// at the log site, as well as any fields accumulated on the logger. +func (log *Logger) Info(msg string, fields ...Field) { + if ce := log.check(InfoLevel, msg); ce != nil { + ce.Write(fields...) + } +} + +// Warn logs a message at WarnLevel. The message includes any fields passed +// at the log site, as well as any fields accumulated on the logger. +func (log *Logger) Warn(msg string, fields ...Field) { + if ce := log.check(WarnLevel, msg); ce != nil { + ce.Write(fields...) + } +} + +// Error logs a message at ErrorLevel. The message includes any fields passed +// at the log site, as well as any fields accumulated on the logger. +func (log *Logger) Error(msg string, fields ...Field) { + if ce := log.check(ErrorLevel, msg); ce != nil { + ce.Write(fields...) + } +} + +// DPanic logs a message at DPanicLevel. The message includes any fields +// passed at the log site, as well as any fields accumulated on the logger. +// +// If the logger is in development mode, it then panics (DPanic means +// "development panic"). This is useful for catching errors that are +// recoverable, but shouldn't ever happen. +func (log *Logger) DPanic(msg string, fields ...Field) { + if ce := log.check(DPanicLevel, msg); ce != nil { + ce.Write(fields...) + } +} + +// Panic logs a message at PanicLevel. The message includes any fields passed +// at the log site, as well as any fields accumulated on the logger. +// +// The logger then panics, even if logging at PanicLevel is disabled. +func (log *Logger) Panic(msg string, fields ...Field) { + if ce := log.check(PanicLevel, msg); ce != nil { + ce.Write(fields...) + } +} + +// Fatal logs a message at FatalLevel. The message includes any fields passed +// at the log site, as well as any fields accumulated on the logger. +// +// The logger then calls os.Exit(1), even if logging at FatalLevel is +// disabled. +func (log *Logger) Fatal(msg string, fields ...Field) { + if ce := log.check(FatalLevel, msg); ce != nil { + ce.Write(fields...) + } +} + +// Sync calls the underlying Core's Sync method, flushing any buffered log +// entries. Applications should take care to call Sync before exiting. +func (log *Logger) Sync() error { + return log.core.Sync() +} + +// Core returns the Logger's underlying zapcore.Core. +func (log *Logger) Core() zapcore.Core { + return log.core +} + +func (log *Logger) clone() *Logger { + copy := *log + return © +} + +func (log *Logger) check(lvl zapcore.Level, msg string) *zapcore.CheckedEntry { + // check must always be called directly by a method in the Logger interface + // (e.g., Check, Info, Fatal). + const callerSkipOffset = 2 + + // Create basic checked entry thru the core; this will be non-nil if the + // log message will actually be written somewhere. + ent := zapcore.Entry{ + LoggerName: log.name, + Time: time.Now(), + Level: lvl, + Message: msg, + } + ce := log.core.Check(ent, nil) + willWrite := ce != nil + + // Set up any required terminal behavior. + switch ent.Level { + case zapcore.PanicLevel: + ce = ce.Should(ent, zapcore.WriteThenPanic) + case zapcore.FatalLevel: + ce = ce.Should(ent, zapcore.WriteThenFatal) + case zapcore.DPanicLevel: + if log.development { + ce = ce.Should(ent, zapcore.WriteThenPanic) + } + } + + // Only do further annotation if we're going to write this message; checked + // entries that exist only for terminal behavior don't benefit from + // annotation. + if !willWrite { + return ce + } + + // Thread the error output through to the CheckedEntry. + ce.ErrorOutput = log.errorOutput + if log.addCaller { + ce.Entry.Caller = zapcore.NewEntryCaller(runtime.Caller(log.callerSkip + callerSkipOffset)) + if !ce.Entry.Caller.Defined { + fmt.Fprintf(log.errorOutput, "%v Logger.check error: failed to get caller\n", time.Now().UTC()) + log.errorOutput.Sync() + } + } + if log.addStack.Enabled(ce.Entry.Level) { + ce.Entry.Stack = Stack("").String + } + + return ce +} diff --git a/vendor/go.uber.org/zap/options.go b/vendor/go.uber.org/zap/options.go new file mode 100644 index 0000000..7a6b0fc --- /dev/null +++ b/vendor/go.uber.org/zap/options.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zap + +import "go.uber.org/zap/zapcore" + +// An Option configures a Logger. +type Option interface { + apply(*Logger) +} + +// optionFunc wraps a func so it satisfies the Option interface. +type optionFunc func(*Logger) + +func (f optionFunc) apply(log *Logger) { + f(log) +} + +// WrapCore wraps or replaces the Logger's underlying zapcore.Core. +func WrapCore(f func(zapcore.Core) zapcore.Core) Option { + return optionFunc(func(log *Logger) { + log.core = f(log.core) + }) +} + +// Hooks registers functions which will be called each time the Logger writes +// out an Entry. Repeated use of Hooks is additive. +// +// Hooks are useful for simple side effects, like capturing metrics for the +// number of emitted logs. More complex side effects, including anything that +// requires access to the Entry's structured fields, should be implemented as +// a zapcore.Core instead. See zapcore.RegisterHooks for details. +func Hooks(hooks ...func(zapcore.Entry) error) Option { + return optionFunc(func(log *Logger) { + log.core = zapcore.RegisterHooks(log.core, hooks...) + }) +} + +// Fields adds fields to the Logger. +func Fields(fs ...Field) Option { + return optionFunc(func(log *Logger) { + log.core = log.core.With(fs) + }) +} + +// ErrorOutput sets the destination for errors generated by the Logger. Note +// that this option only affects internal errors; for sample code that sends +// error-level logs to a different location from info- and debug-level logs, +// see the package-level AdvancedConfiguration example. +// +// The supplied WriteSyncer must be safe for concurrent use. The Open and +// zapcore.Lock functions are the simplest ways to protect files with a mutex. +func ErrorOutput(w zapcore.WriteSyncer) Option { + return optionFunc(func(log *Logger) { + log.errorOutput = w + }) +} + +// Development puts the logger in development mode, which makes DPanic-level +// logs panic instead of simply logging an error. +func Development() Option { + return optionFunc(func(log *Logger) { + log.development = true + }) +} + +// AddCaller configures the Logger to annotate each message with the filename +// and line number of zap's caller. +func AddCaller() Option { + return optionFunc(func(log *Logger) { + log.addCaller = true + }) +} + +// AddCallerSkip increases the number of callers skipped by caller annotation +// (as enabled by the AddCaller option). When building wrappers around the +// Logger and SugaredLogger, supplying this Option prevents zap from always +// reporting the wrapper code as the caller. +func AddCallerSkip(skip int) Option { + return optionFunc(func(log *Logger) { + log.callerSkip += skip + }) +} + +// AddStacktrace configures the Logger to record a stack trace for all messages at +// or above a given level. +func AddStacktrace(lvl zapcore.LevelEnabler) Option { + return optionFunc(func(log *Logger) { + log.addStack = lvl + }) +} diff --git a/vendor/go.uber.org/zap/stacktrace.go b/vendor/go.uber.org/zap/stacktrace.go new file mode 100644 index 0000000..100fac2 --- /dev/null +++ b/vendor/go.uber.org/zap/stacktrace.go @@ -0,0 +1,126 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zap + +import ( + "runtime" + "strings" + "sync" + + "go.uber.org/zap/internal/bufferpool" +) + +const _zapPackage = "go.uber.org/zap" + +var ( + _stacktracePool = sync.Pool{ + New: func() interface{} { + return newProgramCounters(64) + }, + } + + // We add "." and "/" suffixes to the package name to ensure we only match + // the exact package and not any package with the same prefix. + _zapStacktracePrefixes = addPrefix(_zapPackage, ".", "/") + _zapStacktraceVendorContains = addPrefix("/vendor/", _zapStacktracePrefixes...) +) + +func takeStacktrace() string { + buffer := bufferpool.Get() + defer buffer.Free() + programCounters := _stacktracePool.Get().(*programCounters) + defer _stacktracePool.Put(programCounters) + + var numFrames int + for { + // Skip the call to runtime.Counters and takeStacktrace so that the + // program counters start at the caller of takeStacktrace. + numFrames = runtime.Callers(2, programCounters.pcs) + if numFrames < len(programCounters.pcs) { + break + } + // Don't put the too-short counter slice back into the pool; this lets + // the pool adjust if we consistently take deep stacktraces. + programCounters = newProgramCounters(len(programCounters.pcs) * 2) + } + + i := 0 + skipZapFrames := true // skip all consecutive zap frames at the beginning. + frames := runtime.CallersFrames(programCounters.pcs[:numFrames]) + + // Note: On the last iteration, frames.Next() returns false, with a valid + // frame, but we ignore this frame. The last frame is a a runtime frame which + // adds noise, since it's only either runtime.main or runtime.goexit. + for frame, more := frames.Next(); more; frame, more = frames.Next() { + if skipZapFrames && isZapFrame(frame.Function) { + continue + } else { + skipZapFrames = false + } + + if i != 0 { + buffer.AppendByte('\n') + } + i++ + buffer.AppendString(frame.Function) + buffer.AppendByte('\n') + buffer.AppendByte('\t') + buffer.AppendString(frame.File) + buffer.AppendByte(':') + buffer.AppendInt(int64(frame.Line)) + } + + return buffer.String() +} + +func isZapFrame(function string) bool { + for _, prefix := range _zapStacktracePrefixes { + if strings.HasPrefix(function, prefix) { + return true + } + } + + // We can't use a prefix match here since the location of the vendor + // directory affects the prefix. Instead we do a contains match. + for _, contains := range _zapStacktraceVendorContains { + if strings.Contains(function, contains) { + return true + } + } + + return false +} + +type programCounters struct { + pcs []uintptr +} + +func newProgramCounters(size int) *programCounters { + return &programCounters{make([]uintptr, size)} +} + +func addPrefix(prefix string, ss ...string) []string { + withPrefix := make([]string, len(ss)) + for i, s := range ss { + withPrefix[i] = prefix + s + } + return withPrefix +} diff --git a/vendor/go.uber.org/zap/sugar.go b/vendor/go.uber.org/zap/sugar.go new file mode 100644 index 0000000..77ca227 --- /dev/null +++ b/vendor/go.uber.org/zap/sugar.go @@ -0,0 +1,304 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zap + +import ( + "fmt" + + "go.uber.org/zap/zapcore" + + "go.uber.org/multierr" +) + +const ( + _oddNumberErrMsg = "Ignored key without a value." + _nonStringKeyErrMsg = "Ignored key-value pairs with non-string keys." +) + +// A SugaredLogger wraps the base Logger functionality in a slower, but less +// verbose, API. Any Logger can be converted to a SugaredLogger with its Sugar +// method. +// +// Unlike the Logger, the SugaredLogger doesn't insist on structured logging. +// For each log level, it exposes three methods: one for loosely-typed +// structured logging, one for println-style formatting, and one for +// printf-style formatting. For example, SugaredLoggers can produce InfoLevel +// output with Infow ("info with" structured context), Info, or Infof. +type SugaredLogger struct { + base *Logger +} + +// Desugar unwraps a SugaredLogger, exposing the original Logger. Desugaring +// is quite inexpensive, so it's reasonable for a single application to use +// both Loggers and SugaredLoggers, converting between them on the boundaries +// of performance-sensitive code. +func (s *SugaredLogger) Desugar() *Logger { + base := s.base.clone() + base.callerSkip -= 2 + return base +} + +// Named adds a sub-scope to the logger's name. See Logger.Named for details. +func (s *SugaredLogger) Named(name string) *SugaredLogger { + return &SugaredLogger{base: s.base.Named(name)} +} + +// With adds a variadic number of fields to the logging context. It accepts a +// mix of strongly-typed Field objects and loosely-typed key-value pairs. When +// processing pairs, the first element of the pair is used as the field key +// and the second as the field value. +// +// For example, +// sugaredLogger.With( +// "hello", "world", +// "failure", errors.New("oh no"), +// Stack(), +// "count", 42, +// "user", User{Name: "alice"}, +// ) +// is the equivalent of +// unsugared.With( +// String("hello", "world"), +// String("failure", "oh no"), +// Stack(), +// Int("count", 42), +// Object("user", User{Name: "alice"}), +// ) +// +// Note that the keys in key-value pairs should be strings. In development, +// passing a non-string key panics. In production, the logger is more +// forgiving: a separate error is logged, but the key-value pair is skipped +// and execution continues. Passing an orphaned key triggers similar behavior: +// panics in development and errors in production. +func (s *SugaredLogger) With(args ...interface{}) *SugaredLogger { + return &SugaredLogger{base: s.base.With(s.sweetenFields(args)...)} +} + +// Debug uses fmt.Sprint to construct and log a message. +func (s *SugaredLogger) Debug(args ...interface{}) { + s.log(DebugLevel, "", args, nil) +} + +// Info uses fmt.Sprint to construct and log a message. +func (s *SugaredLogger) Info(args ...interface{}) { + s.log(InfoLevel, "", args, nil) +} + +// Warn uses fmt.Sprint to construct and log a message. +func (s *SugaredLogger) Warn(args ...interface{}) { + s.log(WarnLevel, "", args, nil) +} + +// Error uses fmt.Sprint to construct and log a message. +func (s *SugaredLogger) Error(args ...interface{}) { + s.log(ErrorLevel, "", args, nil) +} + +// DPanic uses fmt.Sprint to construct and log a message. In development, the +// logger then panics. (See DPanicLevel for details.) +func (s *SugaredLogger) DPanic(args ...interface{}) { + s.log(DPanicLevel, "", args, nil) +} + +// Panic uses fmt.Sprint to construct and log a message, then panics. +func (s *SugaredLogger) Panic(args ...interface{}) { + s.log(PanicLevel, "", args, nil) +} + +// Fatal uses fmt.Sprint to construct and log a message, then calls os.Exit. +func (s *SugaredLogger) Fatal(args ...interface{}) { + s.log(FatalLevel, "", args, nil) +} + +// Debugf uses fmt.Sprintf to log a templated message. +func (s *SugaredLogger) Debugf(template string, args ...interface{}) { + s.log(DebugLevel, template, args, nil) +} + +// Infof uses fmt.Sprintf to log a templated message. +func (s *SugaredLogger) Infof(template string, args ...interface{}) { + s.log(InfoLevel, template, args, nil) +} + +// Warnf uses fmt.Sprintf to log a templated message. +func (s *SugaredLogger) Warnf(template string, args ...interface{}) { + s.log(WarnLevel, template, args, nil) +} + +// Errorf uses fmt.Sprintf to log a templated message. +func (s *SugaredLogger) Errorf(template string, args ...interface{}) { + s.log(ErrorLevel, template, args, nil) +} + +// DPanicf uses fmt.Sprintf to log a templated message. In development, the +// logger then panics. (See DPanicLevel for details.) +func (s *SugaredLogger) DPanicf(template string, args ...interface{}) { + s.log(DPanicLevel, template, args, nil) +} + +// Panicf uses fmt.Sprintf to log a templated message, then panics. +func (s *SugaredLogger) Panicf(template string, args ...interface{}) { + s.log(PanicLevel, template, args, nil) +} + +// Fatalf uses fmt.Sprintf to log a templated message, then calls os.Exit. +func (s *SugaredLogger) Fatalf(template string, args ...interface{}) { + s.log(FatalLevel, template, args, nil) +} + +// Debugw logs a message with some additional context. The variadic key-value +// pairs are treated as they are in With. +// +// When debug-level logging is disabled, this is much faster than +// s.With(keysAndValues).Debug(msg) +func (s *SugaredLogger) Debugw(msg string, keysAndValues ...interface{}) { + s.log(DebugLevel, msg, nil, keysAndValues) +} + +// Infow logs a message with some additional context. The variadic key-value +// pairs are treated as they are in With. +func (s *SugaredLogger) Infow(msg string, keysAndValues ...interface{}) { + s.log(InfoLevel, msg, nil, keysAndValues) +} + +// Warnw logs a message with some additional context. The variadic key-value +// pairs are treated as they are in With. +func (s *SugaredLogger) Warnw(msg string, keysAndValues ...interface{}) { + s.log(WarnLevel, msg, nil, keysAndValues) +} + +// Errorw logs a message with some additional context. The variadic key-value +// pairs are treated as they are in With. +func (s *SugaredLogger) Errorw(msg string, keysAndValues ...interface{}) { + s.log(ErrorLevel, msg, nil, keysAndValues) +} + +// DPanicw logs a message with some additional context. In development, the +// logger then panics. (See DPanicLevel for details.) The variadic key-value +// pairs are treated as they are in With. +func (s *SugaredLogger) DPanicw(msg string, keysAndValues ...interface{}) { + s.log(DPanicLevel, msg, nil, keysAndValues) +} + +// Panicw logs a message with some additional context, then panics. The +// variadic key-value pairs are treated as they are in With. +func (s *SugaredLogger) Panicw(msg string, keysAndValues ...interface{}) { + s.log(PanicLevel, msg, nil, keysAndValues) +} + +// Fatalw logs a message with some additional context, then calls os.Exit. The +// variadic key-value pairs are treated as they are in With. +func (s *SugaredLogger) Fatalw(msg string, keysAndValues ...interface{}) { + s.log(FatalLevel, msg, nil, keysAndValues) +} + +// Sync flushes any buffered log entries. +func (s *SugaredLogger) Sync() error { + return s.base.Sync() +} + +func (s *SugaredLogger) log(lvl zapcore.Level, template string, fmtArgs []interface{}, context []interface{}) { + // If logging at this level is completely disabled, skip the overhead of + // string formatting. + if lvl < DPanicLevel && !s.base.Core().Enabled(lvl) { + return + } + + // Format with Sprint, Sprintf, or neither. + msg := template + if msg == "" && len(fmtArgs) > 0 { + msg = fmt.Sprint(fmtArgs...) + } else if msg != "" && len(fmtArgs) > 0 { + msg = fmt.Sprintf(template, fmtArgs...) + } + + if ce := s.base.Check(lvl, msg); ce != nil { + ce.Write(s.sweetenFields(context)...) + } +} + +func (s *SugaredLogger) sweetenFields(args []interface{}) []Field { + if len(args) == 0 { + return nil + } + + // Allocate enough space for the worst case; if users pass only structured + // fields, we shouldn't penalize them with extra allocations. + fields := make([]Field, 0, len(args)) + var invalid invalidPairs + + for i := 0; i < len(args); { + // This is a strongly-typed field. Consume it and move on. + if f, ok := args[i].(Field); ok { + fields = append(fields, f) + i++ + continue + } + + // Make sure this element isn't a dangling key. + if i == len(args)-1 { + s.base.DPanic(_oddNumberErrMsg, Any("ignored", args[i])) + break + } + + // Consume this value and the next, treating them as a key-value pair. If the + // key isn't a string, add this pair to the slice of invalid pairs. + key, val := args[i], args[i+1] + if keyStr, ok := key.(string); !ok { + // Subsequent errors are likely, so allocate once up front. + if cap(invalid) == 0 { + invalid = make(invalidPairs, 0, len(args)/2) + } + invalid = append(invalid, invalidPair{i, key, val}) + } else { + fields = append(fields, Any(keyStr, val)) + } + i += 2 + } + + // If we encountered any invalid key-value pairs, log an error. + if len(invalid) > 0 { + s.base.DPanic(_nonStringKeyErrMsg, Array("invalid", invalid)) + } + return fields +} + +type invalidPair struct { + position int + key, value interface{} +} + +func (p invalidPair) MarshalLogObject(enc zapcore.ObjectEncoder) error { + enc.AddInt64("position", int64(p.position)) + Any("key", p.key).AddTo(enc) + Any("value", p.value).AddTo(enc) + return nil +} + +type invalidPairs []invalidPair + +func (ps invalidPairs) MarshalLogArray(enc zapcore.ArrayEncoder) error { + var err error + for i := range ps { + err = multierr.Append(err, enc.AppendObject(ps[i])) + } + return err +} diff --git a/vendor/go.uber.org/zap/time.go b/vendor/go.uber.org/zap/time.go new file mode 100644 index 0000000..c5a1f16 --- /dev/null +++ b/vendor/go.uber.org/zap/time.go @@ -0,0 +1,27 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zap + +import "time" + +func timeToMillis(t time.Time) int64 { + return t.UnixNano() / int64(time.Millisecond) +} diff --git a/vendor/go.uber.org/zap/writer.go b/vendor/go.uber.org/zap/writer.go new file mode 100644 index 0000000..16f55ce --- /dev/null +++ b/vendor/go.uber.org/zap/writer.go @@ -0,0 +1,96 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zap + +import ( + "io/ioutil" + "os" + + "go.uber.org/zap/zapcore" + + "go.uber.org/multierr" +) + +// Open is a high-level wrapper that takes a variadic number of paths, opens or +// creates each of the specified files, and combines them into a locked +// WriteSyncer. It also returns any error encountered and a function to close +// any opened files. +// +// Passing no paths returns a no-op WriteSyncer. The special paths "stdout" and +// "stderr" are interpreted as os.Stdout and os.Stderr, respectively. +func Open(paths ...string) (zapcore.WriteSyncer, func(), error) { + writers, close, err := open(paths) + if err != nil { + return nil, nil, err + } + + writer := CombineWriteSyncers(writers...) + return writer, close, nil +} + +func open(paths []string) ([]zapcore.WriteSyncer, func(), error) { + var openErr error + writers := make([]zapcore.WriteSyncer, 0, len(paths)) + files := make([]*os.File, 0, len(paths)) + close := func() { + for _, f := range files { + f.Close() + } + } + for _, path := range paths { + switch path { + case "stdout": + writers = append(writers, os.Stdout) + // Don't close standard out. + continue + case "stderr": + writers = append(writers, os.Stderr) + // Don't close standard error. + continue + } + f, err := os.OpenFile(path, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0644) + openErr = multierr.Append(openErr, err) + if err == nil { + writers = append(writers, f) + files = append(files, f) + } + } + + if openErr != nil { + close() + return writers, nil, openErr + } + + return writers, close, nil +} + +// CombineWriteSyncers is a utility that combines multiple WriteSyncers into a +// single, locked WriteSyncer. If no inputs are supplied, it returns a no-op +// WriteSyncer. +// +// It's provided purely as a convenience; the result is no different from +// using zapcore.NewMultiWriteSyncer and zapcore.Lock individually. +func CombineWriteSyncers(writers ...zapcore.WriteSyncer) zapcore.WriteSyncer { + if len(writers) == 0 { + return zapcore.AddSync(ioutil.Discard) + } + return zapcore.Lock(zapcore.NewMultiWriteSyncer(writers...)) +} diff --git a/vendor/go.uber.org/zap/zapcore/console_encoder.go b/vendor/go.uber.org/zap/zapcore/console_encoder.go new file mode 100644 index 0000000..b787596 --- /dev/null +++ b/vendor/go.uber.org/zap/zapcore/console_encoder.go @@ -0,0 +1,147 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zapcore + +import ( + "fmt" + "sync" + + "go.uber.org/zap/buffer" + "go.uber.org/zap/internal/bufferpool" +) + +var _sliceEncoderPool = sync.Pool{ + New: func() interface{} { + return &sliceArrayEncoder{elems: make([]interface{}, 0, 2)} + }, +} + +func getSliceEncoder() *sliceArrayEncoder { + return _sliceEncoderPool.Get().(*sliceArrayEncoder) +} + +func putSliceEncoder(e *sliceArrayEncoder) { + e.elems = e.elems[:0] + _sliceEncoderPool.Put(e) +} + +type consoleEncoder struct { + *jsonEncoder +} + +// NewConsoleEncoder creates an encoder whose output is designed for human - +// rather than machine - consumption. It serializes the core log entry data +// (message, level, timestamp, etc.) in a plain-text format and leaves the +// structured context as JSON. +// +// Note that although the console encoder doesn't use the keys specified in the +// encoder configuration, it will omit any element whose key is set to the empty +// string. +func NewConsoleEncoder(cfg EncoderConfig) Encoder { + return consoleEncoder{newJSONEncoder(cfg, true)} +} + +func (c consoleEncoder) Clone() Encoder { + return consoleEncoder{c.jsonEncoder.Clone().(*jsonEncoder)} +} + +func (c consoleEncoder) EncodeEntry(ent Entry, fields []Field) (*buffer.Buffer, error) { + line := bufferpool.Get() + + // We don't want the entry's metadata to be quoted and escaped (if it's + // encoded as strings), which means that we can't use the JSON encoder. The + // simplest option is to use the memory encoder and fmt.Fprint. + // + // If this ever becomes a performance bottleneck, we can implement + // ArrayEncoder for our plain-text format. + arr := getSliceEncoder() + if c.TimeKey != "" && c.EncodeTime != nil { + c.EncodeTime(ent.Time, arr) + } + if c.LevelKey != "" && c.EncodeLevel != nil { + c.EncodeLevel(ent.Level, arr) + } + if ent.LoggerName != "" && c.NameKey != "" { + nameEncoder := c.EncodeName + + if nameEncoder == nil { + // Fall back to FullNameEncoder for backward compatibility. + nameEncoder = FullNameEncoder + } + + nameEncoder(ent.LoggerName, arr) + } + if ent.Caller.Defined && c.CallerKey != "" && c.EncodeCaller != nil { + c.EncodeCaller(ent.Caller, arr) + } + for i := range arr.elems { + if i > 0 { + line.AppendByte('\t') + } + fmt.Fprint(line, arr.elems[i]) + } + putSliceEncoder(arr) + + // Add the message itself. + if c.MessageKey != "" { + c.addTabIfNecessary(line) + line.AppendString(ent.Message) + } + + // Add any structured context. + c.writeContext(line, fields) + + // If there's no stacktrace key, honor that; this allows users to force + // single-line output. + if ent.Stack != "" && c.StacktraceKey != "" { + line.AppendByte('\n') + line.AppendString(ent.Stack) + } + + if c.LineEnding != "" { + line.AppendString(c.LineEnding) + } else { + line.AppendString(DefaultLineEnding) + } + return line, nil +} + +func (c consoleEncoder) writeContext(line *buffer.Buffer, extra []Field) { + context := c.jsonEncoder.Clone().(*jsonEncoder) + defer context.buf.Free() + + addFields(context, extra) + context.closeOpenNamespaces() + if context.buf.Len() == 0 { + return + } + + c.addTabIfNecessary(line) + line.AppendByte('{') + line.Write(context.buf.Bytes()) + line.AppendByte('}') +} + +func (c consoleEncoder) addTabIfNecessary(line *buffer.Buffer) { + if line.Len() > 0 { + line.AppendByte('\t') + } +} diff --git a/vendor/go.uber.org/zap/zapcore/core.go b/vendor/go.uber.org/zap/zapcore/core.go new file mode 100644 index 0000000..a1ef8b0 --- /dev/null +++ b/vendor/go.uber.org/zap/zapcore/core.go @@ -0,0 +1,113 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zapcore + +// Core is a minimal, fast logger interface. It's designed for library authors +// to wrap in a more user-friendly API. +type Core interface { + LevelEnabler + + // With adds structured context to the Core. + With([]Field) Core + // Check determines whether the supplied Entry should be logged (using the + // embedded LevelEnabler and possibly some extra logic). If the entry + // should be logged, the Core adds itself to the CheckedEntry and returns + // the result. + // + // Callers must use Check before calling Write. + Check(Entry, *CheckedEntry) *CheckedEntry + // Write serializes the Entry and any Fields supplied at the log site and + // writes them to their destination. + // + // If called, Write should always log the Entry and Fields; it should not + // replicate the logic of Check. + Write(Entry, []Field) error + // Sync flushes buffered logs (if any). + Sync() error +} + +type nopCore struct{} + +// NewNopCore returns a no-op Core. +func NewNopCore() Core { return nopCore{} } +func (nopCore) Enabled(Level) bool { return false } +func (n nopCore) With([]Field) Core { return n } +func (nopCore) Check(_ Entry, ce *CheckedEntry) *CheckedEntry { return ce } +func (nopCore) Write(Entry, []Field) error { return nil } +func (nopCore) Sync() error { return nil } + +// NewCore creates a Core that writes logs to a WriteSyncer. +func NewCore(enc Encoder, ws WriteSyncer, enab LevelEnabler) Core { + return &ioCore{ + LevelEnabler: enab, + enc: enc, + out: ws, + } +} + +type ioCore struct { + LevelEnabler + enc Encoder + out WriteSyncer +} + +func (c *ioCore) With(fields []Field) Core { + clone := c.clone() + addFields(clone.enc, fields) + return clone +} + +func (c *ioCore) Check(ent Entry, ce *CheckedEntry) *CheckedEntry { + if c.Enabled(ent.Level) { + return ce.AddCore(ent, c) + } + return ce +} + +func (c *ioCore) Write(ent Entry, fields []Field) error { + buf, err := c.enc.EncodeEntry(ent, fields) + if err != nil { + return err + } + _, err = c.out.Write(buf.Bytes()) + buf.Free() + if err != nil { + return err + } + if ent.Level > ErrorLevel { + // Since we may be crashing the program, sync the output. Ignore Sync + // errors, pending a clean solution to issue #370. + c.Sync() + } + return nil +} + +func (c *ioCore) Sync() error { + return c.out.Sync() +} + +func (c *ioCore) clone() *ioCore { + return &ioCore{ + LevelEnabler: c.LevelEnabler, + enc: c.enc.Clone(), + out: c.out, + } +} diff --git a/vendor/go.uber.org/zap/zapcore/doc.go b/vendor/go.uber.org/zap/zapcore/doc.go new file mode 100644 index 0000000..31000e9 --- /dev/null +++ b/vendor/go.uber.org/zap/zapcore/doc.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +// Package zapcore defines and implements the low-level interfaces upon which +// zap is built. By providing alternate implementations of these interfaces, +// external packages can extend zap's capabilities. +package zapcore // import "go.uber.org/zap/zapcore" diff --git a/vendor/go.uber.org/zap/zapcore/encoder.go b/vendor/go.uber.org/zap/zapcore/encoder.go new file mode 100644 index 0000000..f050952 --- /dev/null +++ b/vendor/go.uber.org/zap/zapcore/encoder.go @@ -0,0 +1,348 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zapcore + +import ( + "time" + + "go.uber.org/zap/buffer" +) + +// DefaultLineEnding defines the default line ending when writing logs. +// Alternate line endings specified in EncoderConfig can override this +// behavior. +const DefaultLineEnding = "\n" + +// A LevelEncoder serializes a Level to a primitive type. +type LevelEncoder func(Level, PrimitiveArrayEncoder) + +// LowercaseLevelEncoder serializes a Level to a lowercase string. For example, +// InfoLevel is serialized to "info". +func LowercaseLevelEncoder(l Level, enc PrimitiveArrayEncoder) { + enc.AppendString(l.String()) +} + +// LowercaseColorLevelEncoder serializes a Level to a lowercase string and adds coloring. +// For example, InfoLevel is serialized to "info" and colored blue. +func LowercaseColorLevelEncoder(l Level, enc PrimitiveArrayEncoder) { + s, ok := _levelToLowercaseColorString[l] + if !ok { + s = _unknownLevelColor.Add(l.String()) + } + enc.AppendString(s) +} + +// CapitalLevelEncoder serializes a Level to an all-caps string. For example, +// InfoLevel is serialized to "INFO". +func CapitalLevelEncoder(l Level, enc PrimitiveArrayEncoder) { + enc.AppendString(l.CapitalString()) +} + +// CapitalColorLevelEncoder serializes a Level to an all-caps string and adds color. +// For example, InfoLevel is serialized to "INFO" and colored blue. +func CapitalColorLevelEncoder(l Level, enc PrimitiveArrayEncoder) { + s, ok := _levelToCapitalColorString[l] + if !ok { + s = _unknownLevelColor.Add(l.CapitalString()) + } + enc.AppendString(s) +} + +// UnmarshalText unmarshals text to a LevelEncoder. "capital" is unmarshaled to +// CapitalLevelEncoder, "coloredCapital" is unmarshaled to CapitalColorLevelEncoder, +// "colored" is unmarshaled to LowercaseColorLevelEncoder, and anything else +// is unmarshaled to LowercaseLevelEncoder. +func (e *LevelEncoder) UnmarshalText(text []byte) error { + switch string(text) { + case "capital": + *e = CapitalLevelEncoder + case "capitalColor": + *e = CapitalColorLevelEncoder + case "color": + *e = LowercaseColorLevelEncoder + default: + *e = LowercaseLevelEncoder + } + return nil +} + +// A TimeEncoder serializes a time.Time to a primitive type. +type TimeEncoder func(time.Time, PrimitiveArrayEncoder) + +// EpochTimeEncoder serializes a time.Time to a floating-point number of seconds +// since the Unix epoch. +func EpochTimeEncoder(t time.Time, enc PrimitiveArrayEncoder) { + nanos := t.UnixNano() + sec := float64(nanos) / float64(time.Second) + enc.AppendFloat64(sec) +} + +// EpochMillisTimeEncoder serializes a time.Time to a floating-point number of +// milliseconds since the Unix epoch. +func EpochMillisTimeEncoder(t time.Time, enc PrimitiveArrayEncoder) { + nanos := t.UnixNano() + millis := float64(nanos) / float64(time.Millisecond) + enc.AppendFloat64(millis) +} + +// EpochNanosTimeEncoder serializes a time.Time to an integer number of +// nanoseconds since the Unix epoch. +func EpochNanosTimeEncoder(t time.Time, enc PrimitiveArrayEncoder) { + enc.AppendInt64(t.UnixNano()) +} + +// ISO8601TimeEncoder serializes a time.Time to an ISO8601-formatted string +// with millisecond precision. +func ISO8601TimeEncoder(t time.Time, enc PrimitiveArrayEncoder) { + enc.AppendString(t.Format("2006-01-02T15:04:05.000Z0700")) +} + +// UnmarshalText unmarshals text to a TimeEncoder. "iso8601" and "ISO8601" are +// unmarshaled to ISO8601TimeEncoder, "millis" is unmarshaled to +// EpochMillisTimeEncoder, and anything else is unmarshaled to EpochTimeEncoder. +func (e *TimeEncoder) UnmarshalText(text []byte) error { + switch string(text) { + case "iso8601", "ISO8601": + *e = ISO8601TimeEncoder + case "millis": + *e = EpochMillisTimeEncoder + case "nanos": + *e = EpochNanosTimeEncoder + default: + *e = EpochTimeEncoder + } + return nil +} + +// A DurationEncoder serializes a time.Duration to a primitive type. +type DurationEncoder func(time.Duration, PrimitiveArrayEncoder) + +// SecondsDurationEncoder serializes a time.Duration to a floating-point number of seconds elapsed. +func SecondsDurationEncoder(d time.Duration, enc PrimitiveArrayEncoder) { + enc.AppendFloat64(float64(d) / float64(time.Second)) +} + +// NanosDurationEncoder serializes a time.Duration to an integer number of +// nanoseconds elapsed. +func NanosDurationEncoder(d time.Duration, enc PrimitiveArrayEncoder) { + enc.AppendInt64(int64(d)) +} + +// StringDurationEncoder serializes a time.Duration using its built-in String +// method. +func StringDurationEncoder(d time.Duration, enc PrimitiveArrayEncoder) { + enc.AppendString(d.String()) +} + +// UnmarshalText unmarshals text to a DurationEncoder. "string" is unmarshaled +// to StringDurationEncoder, and anything else is unmarshaled to +// NanosDurationEncoder. +func (e *DurationEncoder) UnmarshalText(text []byte) error { + switch string(text) { + case "string": + *e = StringDurationEncoder + case "nanos": + *e = NanosDurationEncoder + default: + *e = SecondsDurationEncoder + } + return nil +} + +// A CallerEncoder serializes an EntryCaller to a primitive type. +type CallerEncoder func(EntryCaller, PrimitiveArrayEncoder) + +// FullCallerEncoder serializes a caller in /full/path/to/package/file:line +// format. +func FullCallerEncoder(caller EntryCaller, enc PrimitiveArrayEncoder) { + // TODO: consider using a byte-oriented API to save an allocation. + enc.AppendString(caller.String()) +} + +// ShortCallerEncoder serializes a caller in package/file:line format, trimming +// all but the final directory from the full path. +func ShortCallerEncoder(caller EntryCaller, enc PrimitiveArrayEncoder) { + // TODO: consider using a byte-oriented API to save an allocation. + enc.AppendString(caller.TrimmedPath()) +} + +// UnmarshalText unmarshals text to a CallerEncoder. "full" is unmarshaled to +// FullCallerEncoder and anything else is unmarshaled to ShortCallerEncoder. +func (e *CallerEncoder) UnmarshalText(text []byte) error { + switch string(text) { + case "full": + *e = FullCallerEncoder + default: + *e = ShortCallerEncoder + } + return nil +} + +// A NameEncoder serializes a period-separated logger name to a primitive +// type. +type NameEncoder func(string, PrimitiveArrayEncoder) + +// FullNameEncoder serializes the logger name as-is. +func FullNameEncoder(loggerName string, enc PrimitiveArrayEncoder) { + enc.AppendString(loggerName) +} + +// UnmarshalText unmarshals text to a NameEncoder. Currently, everything is +// unmarshaled to FullNameEncoder. +func (e *NameEncoder) UnmarshalText(text []byte) error { + switch string(text) { + case "full": + *e = FullNameEncoder + default: + *e = FullNameEncoder + } + return nil +} + +// An EncoderConfig allows users to configure the concrete encoders supplied by +// zapcore. +type EncoderConfig struct { + // Set the keys used for each log entry. If any key is empty, that portion + // of the entry is omitted. + MessageKey string `json:"messageKey" yaml:"messageKey"` + LevelKey string `json:"levelKey" yaml:"levelKey"` + TimeKey string `json:"timeKey" yaml:"timeKey"` + NameKey string `json:"nameKey" yaml:"nameKey"` + CallerKey string `json:"callerKey" yaml:"callerKey"` + StacktraceKey string `json:"stacktraceKey" yaml:"stacktraceKey"` + LineEnding string `json:"lineEnding" yaml:"lineEnding"` + // Configure the primitive representations of common complex types. For + // example, some users may want all time.Times serialized as floating-point + // seconds since epoch, while others may prefer ISO8601 strings. + EncodeLevel LevelEncoder `json:"levelEncoder" yaml:"levelEncoder"` + EncodeTime TimeEncoder `json:"timeEncoder" yaml:"timeEncoder"` + EncodeDuration DurationEncoder `json:"durationEncoder" yaml:"durationEncoder"` + EncodeCaller CallerEncoder `json:"callerEncoder" yaml:"callerEncoder"` + // Unlike the other primitive type encoders, EncodeName is optional. The + // zero value falls back to FullNameEncoder. + EncodeName NameEncoder `json:"nameEncoder" yaml:"nameEncoder"` +} + +// ObjectEncoder is a strongly-typed, encoding-agnostic interface for adding a +// map- or struct-like object to the logging context. Like maps, ObjectEncoders +// aren't safe for concurrent use (though typical use shouldn't require locks). +type ObjectEncoder interface { + // Logging-specific marshalers. + AddArray(key string, marshaler ArrayMarshaler) error + AddObject(key string, marshaler ObjectMarshaler) error + + // Built-in types. + AddBinary(key string, value []byte) // for arbitrary bytes + AddByteString(key string, value []byte) // for UTF-8 encoded bytes + AddBool(key string, value bool) + AddComplex128(key string, value complex128) + AddComplex64(key string, value complex64) + AddDuration(key string, value time.Duration) + AddFloat64(key string, value float64) + AddFloat32(key string, value float32) + AddInt(key string, value int) + AddInt64(key string, value int64) + AddInt32(key string, value int32) + AddInt16(key string, value int16) + AddInt8(key string, value int8) + AddString(key, value string) + AddTime(key string, value time.Time) + AddUint(key string, value uint) + AddUint64(key string, value uint64) + AddUint32(key string, value uint32) + AddUint16(key string, value uint16) + AddUint8(key string, value uint8) + AddUintptr(key string, value uintptr) + + // AddReflected uses reflection to serialize arbitrary objects, so it's slow + // and allocation-heavy. + AddReflected(key string, value interface{}) error + // OpenNamespace opens an isolated namespace where all subsequent fields will + // be added. Applications can use namespaces to prevent key collisions when + // injecting loggers into sub-components or third-party libraries. + OpenNamespace(key string) +} + +// ArrayEncoder is a strongly-typed, encoding-agnostic interface for adding +// array-like objects to the logging context. Of note, it supports mixed-type +// arrays even though they aren't typical in Go. Like slices, ArrayEncoders +// aren't safe for concurrent use (though typical use shouldn't require locks). +type ArrayEncoder interface { + // Built-in types. + PrimitiveArrayEncoder + + // Time-related types. + AppendDuration(time.Duration) + AppendTime(time.Time) + + // Logging-specific marshalers. + AppendArray(ArrayMarshaler) error + AppendObject(ObjectMarshaler) error + + // AppendReflected uses reflection to serialize arbitrary objects, so it's + // slow and allocation-heavy. + AppendReflected(value interface{}) error +} + +// PrimitiveArrayEncoder is the subset of the ArrayEncoder interface that deals +// only in Go's built-in types. It's included only so that Duration- and +// TimeEncoders cannot trigger infinite recursion. +type PrimitiveArrayEncoder interface { + // Built-in types. + AppendBool(bool) + AppendByteString([]byte) // for UTF-8 encoded bytes + AppendComplex128(complex128) + AppendComplex64(complex64) + AppendFloat64(float64) + AppendFloat32(float32) + AppendInt(int) + AppendInt64(int64) + AppendInt32(int32) + AppendInt16(int16) + AppendInt8(int8) + AppendString(string) + AppendUint(uint) + AppendUint64(uint64) + AppendUint32(uint32) + AppendUint16(uint16) + AppendUint8(uint8) + AppendUintptr(uintptr) +} + +// Encoder is a format-agnostic interface for all log entry marshalers. Since +// log encoders don't need to support the same wide range of use cases as +// general-purpose marshalers, it's possible to make them faster and +// lower-allocation. +// +// Implementations of the ObjectEncoder interface's methods can, of course, +// freely modify the receiver. However, the Clone and EncodeEntry methods will +// be called concurrently and shouldn't modify the receiver. +type Encoder interface { + ObjectEncoder + + // Clone copies the encoder, ensuring that adding fields to the copy doesn't + // affect the original. + Clone() Encoder + + // EncodeEntry encodes an entry and fields, along with any accumulated + // context, into a byte buffer and returns it. + EncodeEntry(Entry, []Field) (*buffer.Buffer, error) +} diff --git a/vendor/go.uber.org/zap/zapcore/entry.go b/vendor/go.uber.org/zap/zapcore/entry.go new file mode 100644 index 0000000..7d9893f --- /dev/null +++ b/vendor/go.uber.org/zap/zapcore/entry.go @@ -0,0 +1,257 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zapcore + +import ( + "fmt" + "strings" + "sync" + "time" + + "go.uber.org/zap/internal/bufferpool" + "go.uber.org/zap/internal/exit" + + "go.uber.org/multierr" +) + +var ( + _cePool = sync.Pool{New: func() interface{} { + // Pre-allocate some space for cores. + return &CheckedEntry{ + cores: make([]Core, 4), + } + }} +) + +func getCheckedEntry() *CheckedEntry { + ce := _cePool.Get().(*CheckedEntry) + ce.reset() + return ce +} + +func putCheckedEntry(ce *CheckedEntry) { + if ce == nil { + return + } + _cePool.Put(ce) +} + +// NewEntryCaller makes an EntryCaller from the return signature of +// runtime.Caller. +func NewEntryCaller(pc uintptr, file string, line int, ok bool) EntryCaller { + if !ok { + return EntryCaller{} + } + return EntryCaller{ + PC: pc, + File: file, + Line: line, + Defined: true, + } +} + +// EntryCaller represents the caller of a logging function. +type EntryCaller struct { + Defined bool + PC uintptr + File string + Line int +} + +// String returns the full path and line number of the caller. +func (ec EntryCaller) String() string { + return ec.FullPath() +} + +// FullPath returns a /full/path/to/package/file:line description of the +// caller. +func (ec EntryCaller) FullPath() string { + if !ec.Defined { + return "undefined" + } + buf := bufferpool.Get() + buf.AppendString(ec.File) + buf.AppendByte(':') + buf.AppendInt(int64(ec.Line)) + caller := buf.String() + buf.Free() + return caller +} + +// TrimmedPath returns a package/file:line description of the caller, +// preserving only the leaf directory name and file name. +func (ec EntryCaller) TrimmedPath() string { + if !ec.Defined { + return "undefined" + } + // nb. To make sure we trim the path correctly on Windows too, we + // counter-intuitively need to use '/' and *not* os.PathSeparator here, + // because the path given originates from Go stdlib, specifically + // runtime.Caller() which (as of Mar/17) returns forward slashes even on + // Windows. + // + // See https://github.com/golang/go/issues/3335 + // and https://github.com/golang/go/issues/18151 + // + // for discussion on the issue on Go side. + // + // Find the last separator. + // + idx := strings.LastIndexByte(ec.File, '/') + if idx == -1 { + return ec.FullPath() + } + // Find the penultimate separator. + idx = strings.LastIndexByte(ec.File[:idx], '/') + if idx == -1 { + return ec.FullPath() + } + buf := bufferpool.Get() + // Keep everything after the penultimate separator. + buf.AppendString(ec.File[idx+1:]) + buf.AppendByte(':') + buf.AppendInt(int64(ec.Line)) + caller := buf.String() + buf.Free() + return caller +} + +// An Entry represents a complete log message. The entry's structured context +// is already serialized, but the log level, time, message, and call site +// information are available for inspection and modification. +// +// Entries are pooled, so any functions that accept them MUST be careful not to +// retain references to them. +type Entry struct { + Level Level + Time time.Time + LoggerName string + Message string + Caller EntryCaller + Stack string +} + +// CheckWriteAction indicates what action to take after a log entry is +// processed. Actions are ordered in increasing severity. +type CheckWriteAction uint8 + +const ( + // WriteThenNoop indicates that nothing special needs to be done. It's the + // default behavior. + WriteThenNoop CheckWriteAction = iota + // WriteThenPanic causes a panic after Write. + WriteThenPanic + // WriteThenFatal causes a fatal os.Exit after Write. + WriteThenFatal +) + +// CheckedEntry is an Entry together with a collection of Cores that have +// already agreed to log it. +// +// CheckedEntry references should be created by calling AddCore or Should on a +// nil *CheckedEntry. References are returned to a pool after Write, and MUST +// NOT be retained after calling their Write method. +type CheckedEntry struct { + Entry + ErrorOutput WriteSyncer + dirty bool // best-effort detection of pool misuse + should CheckWriteAction + cores []Core +} + +func (ce *CheckedEntry) reset() { + ce.Entry = Entry{} + ce.ErrorOutput = nil + ce.dirty = false + ce.should = WriteThenNoop + for i := range ce.cores { + // don't keep references to cores + ce.cores[i] = nil + } + ce.cores = ce.cores[:0] +} + +// Write writes the entry to the stored Cores, returns any errors, and returns +// the CheckedEntry reference to a pool for immediate re-use. Finally, it +// executes any required CheckWriteAction. +func (ce *CheckedEntry) Write(fields ...Field) { + if ce == nil { + return + } + + if ce.dirty { + if ce.ErrorOutput != nil { + // Make a best effort to detect unsafe re-use of this CheckedEntry. + // If the entry is dirty, log an internal error; because the + // CheckedEntry is being used after it was returned to the pool, + // the message may be an amalgamation from multiple call sites. + fmt.Fprintf(ce.ErrorOutput, "%v Unsafe CheckedEntry re-use near Entry %+v.\n", time.Now(), ce.Entry) + ce.ErrorOutput.Sync() + } + return + } + ce.dirty = true + + var err error + for i := range ce.cores { + err = multierr.Append(err, ce.cores[i].Write(ce.Entry, fields)) + } + if ce.ErrorOutput != nil { + if err != nil { + fmt.Fprintf(ce.ErrorOutput, "%v write error: %v\n", time.Now(), err) + ce.ErrorOutput.Sync() + } + } + + should, msg := ce.should, ce.Message + putCheckedEntry(ce) + + switch should { + case WriteThenPanic: + panic(msg) + case WriteThenFatal: + exit.Exit() + } +} + +// AddCore adds a Core that has agreed to log this CheckedEntry. It's intended to be +// used by Core.Check implementations, and is safe to call on nil CheckedEntry +// references. +func (ce *CheckedEntry) AddCore(ent Entry, core Core) *CheckedEntry { + if ce == nil { + ce = getCheckedEntry() + ce.Entry = ent + } + ce.cores = append(ce.cores, core) + return ce +} + +// Should sets this CheckedEntry's CheckWriteAction, which controls whether a +// Core will panic or fatal after writing this log entry. Like AddCore, it's +// safe to call on nil CheckedEntry references. +func (ce *CheckedEntry) Should(ent Entry, should CheckWriteAction) *CheckedEntry { + if ce == nil { + ce = getCheckedEntry() + ce.Entry = ent + } + ce.should = should + return ce +} diff --git a/vendor/go.uber.org/zap/zapcore/error.go b/vendor/go.uber.org/zap/zapcore/error.go new file mode 100644 index 0000000..a67c7ba --- /dev/null +++ b/vendor/go.uber.org/zap/zapcore/error.go @@ -0,0 +1,120 @@ +// Copyright (c) 2017 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zapcore + +import ( + "fmt" + "sync" +) + +// Encodes the given error into fields of an object. A field with the given +// name is added for the error message. +// +// If the error implements fmt.Formatter, a field with the name ${key}Verbose +// is also added with the full verbose error message. +// +// Finally, if the error implements errorGroup (from go.uber.org/multierr) or +// causer (from github.com/pkg/errors), a ${key}Causes field is added with an +// array of objects containing the errors this error was comprised of. +// +// { +// "error": err.Error(), +// "errorVerbose": fmt.Sprintf("%+v", err), +// "errorCauses": [ +// ... +// ], +// } +func encodeError(key string, err error, enc ObjectEncoder) error { + basic := err.Error() + enc.AddString(key, basic) + + switch e := err.(type) { + case errorGroup: + return enc.AddArray(key+"Causes", errArray(e.Errors())) + case fmt.Formatter: + verbose := fmt.Sprintf("%+v", e) + if verbose != basic { + // This is a rich error type, like those produced by + // github.com/pkg/errors. + enc.AddString(key+"Verbose", verbose) + } + } + return nil +} + +type errorGroup interface { + // Provides read-only access to the underlying list of errors, preferably + // without causing any allocs. + Errors() []error +} + +type causer interface { + // Provides access to the error that caused this error. + Cause() error +} + +// Note that errArry and errArrayElem are very similar to the version +// implemented in the top-level error.go file. We can't re-use this because +// that would require exporting errArray as part of the zapcore API. + +// Encodes a list of errors using the standard error encoding logic. +type errArray []error + +func (errs errArray) MarshalLogArray(arr ArrayEncoder) error { + for i := range errs { + if errs[i] == nil { + continue + } + + el := newErrArrayElem(errs[i]) + arr.AppendObject(el) + el.Free() + } + return nil +} + +var _errArrayElemPool = sync.Pool{New: func() interface{} { + return &errArrayElem{} +}} + +// Encodes any error into a {"error": ...} re-using the same errors logic. +// +// May be passed in place of an array to build a single-element array. +type errArrayElem struct{ err error } + +func newErrArrayElem(err error) *errArrayElem { + e := _errArrayElemPool.Get().(*errArrayElem) + e.err = err + return e +} + +func (e *errArrayElem) MarshalLogArray(arr ArrayEncoder) error { + return arr.AppendObject(e) +} + +func (e *errArrayElem) MarshalLogObject(enc ObjectEncoder) error { + return encodeError("error", e.err, enc) +} + +func (e *errArrayElem) Free() { + e.err = nil + _errArrayElemPool.Put(e) +} diff --git a/vendor/go.uber.org/zap/zapcore/field.go b/vendor/go.uber.org/zap/zapcore/field.go new file mode 100644 index 0000000..6a5e33e --- /dev/null +++ b/vendor/go.uber.org/zap/zapcore/field.go @@ -0,0 +1,201 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zapcore + +import ( + "bytes" + "fmt" + "math" + "reflect" + "time" +) + +// A FieldType indicates which member of the Field union struct should be used +// and how it should be serialized. +type FieldType uint8 + +const ( + // UnknownType is the default field type. Attempting to add it to an encoder will panic. + UnknownType FieldType = iota + // ArrayMarshalerType indicates that the field carries an ArrayMarshaler. + ArrayMarshalerType + // ObjectMarshalerType indicates that the field carries an ObjectMarshaler. + ObjectMarshalerType + // BinaryType indicates that the field carries an opaque binary blob. + BinaryType + // BoolType indicates that the field carries a bool. + BoolType + // ByteStringType indicates that the field carries UTF-8 encoded bytes. + ByteStringType + // Complex128Type indicates that the field carries a complex128. + Complex128Type + // Complex64Type indicates that the field carries a complex128. + Complex64Type + // DurationType indicates that the field carries a time.Duration. + DurationType + // Float64Type indicates that the field carries a float64. + Float64Type + // Float32Type indicates that the field carries a float32. + Float32Type + // Int64Type indicates that the field carries an int64. + Int64Type + // Int32Type indicates that the field carries an int32. + Int32Type + // Int16Type indicates that the field carries an int16. + Int16Type + // Int8Type indicates that the field carries an int8. + Int8Type + // StringType indicates that the field carries a string. + StringType + // TimeType indicates that the field carries a time.Time. + TimeType + // Uint64Type indicates that the field carries a uint64. + Uint64Type + // Uint32Type indicates that the field carries a uint32. + Uint32Type + // Uint16Type indicates that the field carries a uint16. + Uint16Type + // Uint8Type indicates that the field carries a uint8. + Uint8Type + // UintptrType indicates that the field carries a uintptr. + UintptrType + // ReflectType indicates that the field carries an interface{}, which should + // be serialized using reflection. + ReflectType + // NamespaceType signals the beginning of an isolated namespace. All + // subsequent fields should be added to the new namespace. + NamespaceType + // StringerType indicates that the field carries a fmt.Stringer. + StringerType + // ErrorType indicates that the field carries an error. + ErrorType + // SkipType indicates that the field is a no-op. + SkipType +) + +// A Field is a marshaling operation used to add a key-value pair to a logger's +// context. Most fields are lazily marshaled, so it's inexpensive to add fields +// to disabled debug-level log statements. +type Field struct { + Key string + Type FieldType + Integer int64 + String string + Interface interface{} +} + +// AddTo exports a field through the ObjectEncoder interface. It's primarily +// useful to library authors, and shouldn't be necessary in most applications. +func (f Field) AddTo(enc ObjectEncoder) { + var err error + + switch f.Type { + case ArrayMarshalerType: + err = enc.AddArray(f.Key, f.Interface.(ArrayMarshaler)) + case ObjectMarshalerType: + err = enc.AddObject(f.Key, f.Interface.(ObjectMarshaler)) + case BinaryType: + enc.AddBinary(f.Key, f.Interface.([]byte)) + case BoolType: + enc.AddBool(f.Key, f.Integer == 1) + case ByteStringType: + enc.AddByteString(f.Key, f.Interface.([]byte)) + case Complex128Type: + enc.AddComplex128(f.Key, f.Interface.(complex128)) + case Complex64Type: + enc.AddComplex64(f.Key, f.Interface.(complex64)) + case DurationType: + enc.AddDuration(f.Key, time.Duration(f.Integer)) + case Float64Type: + enc.AddFloat64(f.Key, math.Float64frombits(uint64(f.Integer))) + case Float32Type: + enc.AddFloat32(f.Key, math.Float32frombits(uint32(f.Integer))) + case Int64Type: + enc.AddInt64(f.Key, f.Integer) + case Int32Type: + enc.AddInt32(f.Key, int32(f.Integer)) + case Int16Type: + enc.AddInt16(f.Key, int16(f.Integer)) + case Int8Type: + enc.AddInt8(f.Key, int8(f.Integer)) + case StringType: + enc.AddString(f.Key, f.String) + case TimeType: + if f.Interface != nil { + enc.AddTime(f.Key, time.Unix(0, f.Integer).In(f.Interface.(*time.Location))) + } else { + // Fall back to UTC if location is nil. + enc.AddTime(f.Key, time.Unix(0, f.Integer)) + } + case Uint64Type: + enc.AddUint64(f.Key, uint64(f.Integer)) + case Uint32Type: + enc.AddUint32(f.Key, uint32(f.Integer)) + case Uint16Type: + enc.AddUint16(f.Key, uint16(f.Integer)) + case Uint8Type: + enc.AddUint8(f.Key, uint8(f.Integer)) + case UintptrType: + enc.AddUintptr(f.Key, uintptr(f.Integer)) + case ReflectType: + err = enc.AddReflected(f.Key, f.Interface) + case NamespaceType: + enc.OpenNamespace(f.Key) + case StringerType: + enc.AddString(f.Key, f.Interface.(fmt.Stringer).String()) + case ErrorType: + encodeError(f.Key, f.Interface.(error), enc) + case SkipType: + break + default: + panic(fmt.Sprintf("unknown field type: %v", f)) + } + + if err != nil { + enc.AddString(fmt.Sprintf("%sError", f.Key), err.Error()) + } +} + +// Equals returns whether two fields are equal. For non-primitive types such as +// errors, marshalers, or reflect types, it uses reflect.DeepEqual. +func (f Field) Equals(other Field) bool { + if f.Type != other.Type { + return false + } + if f.Key != other.Key { + return false + } + + switch f.Type { + case BinaryType, ByteStringType: + return bytes.Equal(f.Interface.([]byte), other.Interface.([]byte)) + case ArrayMarshalerType, ObjectMarshalerType, ErrorType, ReflectType: + return reflect.DeepEqual(f.Interface, other.Interface) + default: + return f == other + } +} + +func addFields(enc ObjectEncoder, fields []Field) { + for i := range fields { + fields[i].AddTo(enc) + } +} diff --git a/vendor/go.uber.org/zap/zapcore/hook.go b/vendor/go.uber.org/zap/zapcore/hook.go new file mode 100644 index 0000000..5db4afb --- /dev/null +++ b/vendor/go.uber.org/zap/zapcore/hook.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zapcore + +import "go.uber.org/multierr" + +type hooked struct { + Core + funcs []func(Entry) error +} + +// RegisterHooks wraps a Core and runs a collection of user-defined callback +// hooks each time a message is logged. Execution of the callbacks is blocking. +// +// This offers users an easy way to register simple callbacks (e.g., metrics +// collection) without implementing the full Core interface. +func RegisterHooks(core Core, hooks ...func(Entry) error) Core { + funcs := append([]func(Entry) error{}, hooks...) + return &hooked{ + Core: core, + funcs: funcs, + } +} + +func (h *hooked) Check(ent Entry, ce *CheckedEntry) *CheckedEntry { + // Let the wrapped Core decide whether to log this message or not. This + // also gives the downstream a chance to register itself directly with the + // CheckedEntry. + if downstream := h.Core.Check(ent, ce); downstream != nil { + return downstream.AddCore(ent, h) + } + return ce +} + +func (h *hooked) With(fields []Field) Core { + return &hooked{ + Core: h.Core.With(fields), + funcs: h.funcs, + } +} + +func (h *hooked) Write(ent Entry, _ []Field) error { + // Since our downstream had a chance to register itself directly with the + // CheckedMessage, we don't need to call it here. + var err error + for i := range h.funcs { + err = multierr.Append(err, h.funcs[i](ent)) + } + return err +} diff --git a/vendor/go.uber.org/zap/zapcore/json_encoder.go b/vendor/go.uber.org/zap/zapcore/json_encoder.go new file mode 100644 index 0000000..1006ba2 --- /dev/null +++ b/vendor/go.uber.org/zap/zapcore/json_encoder.go @@ -0,0 +1,480 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zapcore + +import ( + "encoding/base64" + "encoding/json" + "math" + "sync" + "time" + "unicode/utf8" + + "go.uber.org/zap/buffer" + "go.uber.org/zap/internal/bufferpool" +) + +// For JSON-escaping; see jsonEncoder.safeAddString below. +const _hex = "0123456789abcdef" + +var _jsonPool = sync.Pool{New: func() interface{} { + return &jsonEncoder{} +}} + +func getJSONEncoder() *jsonEncoder { + return _jsonPool.Get().(*jsonEncoder) +} + +func putJSONEncoder(enc *jsonEncoder) { + enc.EncoderConfig = nil + enc.buf = nil + enc.spaced = false + enc.openNamespaces = 0 + _jsonPool.Put(enc) +} + +type jsonEncoder struct { + *EncoderConfig + buf *buffer.Buffer + spaced bool // include spaces after colons and commas + openNamespaces int +} + +// NewJSONEncoder creates a fast, low-allocation JSON encoder. The encoder +// appropriately escapes all field keys and values. +// +// Note that the encoder doesn't deduplicate keys, so it's possible to produce +// a message like +// {"foo":"bar","foo":"baz"} +// This is permitted by the JSON specification, but not encouraged. Many +// libraries will ignore duplicate key-value pairs (typically keeping the last +// pair) when unmarshaling, but users should attempt to avoid adding duplicate +// keys. +func NewJSONEncoder(cfg EncoderConfig) Encoder { + return newJSONEncoder(cfg, false) +} + +func newJSONEncoder(cfg EncoderConfig, spaced bool) *jsonEncoder { + return &jsonEncoder{ + EncoderConfig: &cfg, + buf: bufferpool.Get(), + spaced: spaced, + } +} + +func (enc *jsonEncoder) AddArray(key string, arr ArrayMarshaler) error { + enc.addKey(key) + return enc.AppendArray(arr) +} + +func (enc *jsonEncoder) AddObject(key string, obj ObjectMarshaler) error { + enc.addKey(key) + return enc.AppendObject(obj) +} + +func (enc *jsonEncoder) AddBinary(key string, val []byte) { + enc.AddString(key, base64.StdEncoding.EncodeToString(val)) +} + +func (enc *jsonEncoder) AddByteString(key string, val []byte) { + enc.addKey(key) + enc.AppendByteString(val) +} + +func (enc *jsonEncoder) AddBool(key string, val bool) { + enc.addKey(key) + enc.AppendBool(val) +} + +func (enc *jsonEncoder) AddComplex128(key string, val complex128) { + enc.addKey(key) + enc.AppendComplex128(val) +} + +func (enc *jsonEncoder) AddDuration(key string, val time.Duration) { + enc.addKey(key) + enc.AppendDuration(val) +} + +func (enc *jsonEncoder) AddFloat64(key string, val float64) { + enc.addKey(key) + enc.AppendFloat64(val) +} + +func (enc *jsonEncoder) AddInt64(key string, val int64) { + enc.addKey(key) + enc.AppendInt64(val) +} + +func (enc *jsonEncoder) AddReflected(key string, obj interface{}) error { + marshaled, err := json.Marshal(obj) + if err != nil { + return err + } + enc.addKey(key) + _, err = enc.buf.Write(marshaled) + return err +} + +func (enc *jsonEncoder) OpenNamespace(key string) { + enc.addKey(key) + enc.buf.AppendByte('{') + enc.openNamespaces++ +} + +func (enc *jsonEncoder) AddString(key, val string) { + enc.addKey(key) + enc.AppendString(val) +} + +func (enc *jsonEncoder) AddTime(key string, val time.Time) { + enc.addKey(key) + enc.AppendTime(val) +} + +func (enc *jsonEncoder) AddUint64(key string, val uint64) { + enc.addKey(key) + enc.AppendUint64(val) +} + +func (enc *jsonEncoder) AppendArray(arr ArrayMarshaler) error { + enc.addElementSeparator() + enc.buf.AppendByte('[') + err := arr.MarshalLogArray(enc) + enc.buf.AppendByte(']') + return err +} + +func (enc *jsonEncoder) AppendObject(obj ObjectMarshaler) error { + enc.addElementSeparator() + enc.buf.AppendByte('{') + err := obj.MarshalLogObject(enc) + enc.buf.AppendByte('}') + return err +} + +func (enc *jsonEncoder) AppendBool(val bool) { + enc.addElementSeparator() + enc.buf.AppendBool(val) +} + +func (enc *jsonEncoder) AppendByteString(val []byte) { + enc.addElementSeparator() + enc.buf.AppendByte('"') + enc.safeAddByteString(val) + enc.buf.AppendByte('"') +} + +func (enc *jsonEncoder) AppendComplex128(val complex128) { + enc.addElementSeparator() + // Cast to a platform-independent, fixed-size type. + r, i := float64(real(val)), float64(imag(val)) + enc.buf.AppendByte('"') + // Because we're always in a quoted string, we can use strconv without + // special-casing NaN and +/-Inf. + enc.buf.AppendFloat(r, 64) + enc.buf.AppendByte('+') + enc.buf.AppendFloat(i, 64) + enc.buf.AppendByte('i') + enc.buf.AppendByte('"') +} + +func (enc *jsonEncoder) AppendDuration(val time.Duration) { + cur := enc.buf.Len() + enc.EncodeDuration(val, enc) + if cur == enc.buf.Len() { + // User-supplied EncodeDuration is a no-op. Fall back to nanoseconds to keep + // JSON valid. + enc.AppendInt64(int64(val)) + } +} + +func (enc *jsonEncoder) AppendInt64(val int64) { + enc.addElementSeparator() + enc.buf.AppendInt(val) +} + +func (enc *jsonEncoder) AppendReflected(val interface{}) error { + marshaled, err := json.Marshal(val) + if err != nil { + return err + } + enc.addElementSeparator() + _, err = enc.buf.Write(marshaled) + return err +} + +func (enc *jsonEncoder) AppendString(val string) { + enc.addElementSeparator() + enc.buf.AppendByte('"') + enc.safeAddString(val) + enc.buf.AppendByte('"') +} + +func (enc *jsonEncoder) AppendTime(val time.Time) { + cur := enc.buf.Len() + enc.EncodeTime(val, enc) + if cur == enc.buf.Len() { + // User-supplied EncodeTime is a no-op. Fall back to nanos since epoch to keep + // output JSON valid. + enc.AppendInt64(val.UnixNano()) + } +} + +func (enc *jsonEncoder) AppendUint64(val uint64) { + enc.addElementSeparator() + enc.buf.AppendUint(val) +} + +func (enc *jsonEncoder) AddComplex64(k string, v complex64) { enc.AddComplex128(k, complex128(v)) } +func (enc *jsonEncoder) AddFloat32(k string, v float32) { enc.AddFloat64(k, float64(v)) } +func (enc *jsonEncoder) AddInt(k string, v int) { enc.AddInt64(k, int64(v)) } +func (enc *jsonEncoder) AddInt32(k string, v int32) { enc.AddInt64(k, int64(v)) } +func (enc *jsonEncoder) AddInt16(k string, v int16) { enc.AddInt64(k, int64(v)) } +func (enc *jsonEncoder) AddInt8(k string, v int8) { enc.AddInt64(k, int64(v)) } +func (enc *jsonEncoder) AddUint(k string, v uint) { enc.AddUint64(k, uint64(v)) } +func (enc *jsonEncoder) AddUint32(k string, v uint32) { enc.AddUint64(k, uint64(v)) } +func (enc *jsonEncoder) AddUint16(k string, v uint16) { enc.AddUint64(k, uint64(v)) } +func (enc *jsonEncoder) AddUint8(k string, v uint8) { enc.AddUint64(k, uint64(v)) } +func (enc *jsonEncoder) AddUintptr(k string, v uintptr) { enc.AddUint64(k, uint64(v)) } +func (enc *jsonEncoder) AppendComplex64(v complex64) { enc.AppendComplex128(complex128(v)) } +func (enc *jsonEncoder) AppendFloat64(v float64) { enc.appendFloat(v, 64) } +func (enc *jsonEncoder) AppendFloat32(v float32) { enc.appendFloat(float64(v), 32) } +func (enc *jsonEncoder) AppendInt(v int) { enc.AppendInt64(int64(v)) } +func (enc *jsonEncoder) AppendInt32(v int32) { enc.AppendInt64(int64(v)) } +func (enc *jsonEncoder) AppendInt16(v int16) { enc.AppendInt64(int64(v)) } +func (enc *jsonEncoder) AppendInt8(v int8) { enc.AppendInt64(int64(v)) } +func (enc *jsonEncoder) AppendUint(v uint) { enc.AppendUint64(uint64(v)) } +func (enc *jsonEncoder) AppendUint32(v uint32) { enc.AppendUint64(uint64(v)) } +func (enc *jsonEncoder) AppendUint16(v uint16) { enc.AppendUint64(uint64(v)) } +func (enc *jsonEncoder) AppendUint8(v uint8) { enc.AppendUint64(uint64(v)) } +func (enc *jsonEncoder) AppendUintptr(v uintptr) { enc.AppendUint64(uint64(v)) } + +func (enc *jsonEncoder) Clone() Encoder { + clone := enc.clone() + clone.buf.Write(enc.buf.Bytes()) + return clone +} + +func (enc *jsonEncoder) clone() *jsonEncoder { + clone := getJSONEncoder() + clone.EncoderConfig = enc.EncoderConfig + clone.spaced = enc.spaced + clone.openNamespaces = enc.openNamespaces + clone.buf = bufferpool.Get() + return clone +} + +func (enc *jsonEncoder) EncodeEntry(ent Entry, fields []Field) (*buffer.Buffer, error) { + final := enc.clone() + final.buf.AppendByte('{') + + if final.LevelKey != "" { + final.addKey(final.LevelKey) + cur := final.buf.Len() + final.EncodeLevel(ent.Level, final) + if cur == final.buf.Len() { + // User-supplied EncodeLevel was a no-op. Fall back to strings to keep + // output JSON valid. + final.AppendString(ent.Level.String()) + } + } + if final.TimeKey != "" { + final.AddTime(final.TimeKey, ent.Time) + } + if ent.LoggerName != "" && final.NameKey != "" { + final.addKey(final.NameKey) + cur := final.buf.Len() + nameEncoder := final.EncodeName + + // if no name encoder provided, fall back to FullNameEncoder for backwards + // compatibility + if nameEncoder == nil { + nameEncoder = FullNameEncoder + } + + nameEncoder(ent.LoggerName, final) + if cur == final.buf.Len() { + // User-supplied EncodeName was a no-op. Fall back to strings to + // keep output JSON valid. + final.AppendString(ent.LoggerName) + } + } + if ent.Caller.Defined && final.CallerKey != "" { + final.addKey(final.CallerKey) + cur := final.buf.Len() + final.EncodeCaller(ent.Caller, final) + if cur == final.buf.Len() { + // User-supplied EncodeCaller was a no-op. Fall back to strings to + // keep output JSON valid. + final.AppendString(ent.Caller.String()) + } + } + if final.MessageKey != "" { + final.addKey(enc.MessageKey) + final.AppendString(ent.Message) + } + if enc.buf.Len() > 0 { + final.addElementSeparator() + final.buf.Write(enc.buf.Bytes()) + } + addFields(final, fields) + final.closeOpenNamespaces() + if ent.Stack != "" && final.StacktraceKey != "" { + final.AddString(final.StacktraceKey, ent.Stack) + } + final.buf.AppendByte('}') + if final.LineEnding != "" { + final.buf.AppendString(final.LineEnding) + } else { + final.buf.AppendString(DefaultLineEnding) + } + + ret := final.buf + putJSONEncoder(final) + return ret, nil +} + +func (enc *jsonEncoder) truncate() { + enc.buf.Reset() +} + +func (enc *jsonEncoder) closeOpenNamespaces() { + for i := 0; i < enc.openNamespaces; i++ { + enc.buf.AppendByte('}') + } +} + +func (enc *jsonEncoder) addKey(key string) { + enc.addElementSeparator() + enc.buf.AppendByte('"') + enc.safeAddString(key) + enc.buf.AppendByte('"') + enc.buf.AppendByte(':') + if enc.spaced { + enc.buf.AppendByte(' ') + } +} + +func (enc *jsonEncoder) addElementSeparator() { + last := enc.buf.Len() - 1 + if last < 0 { + return + } + switch enc.buf.Bytes()[last] { + case '{', '[', ':', ',', ' ': + return + default: + enc.buf.AppendByte(',') + if enc.spaced { + enc.buf.AppendByte(' ') + } + } +} + +func (enc *jsonEncoder) appendFloat(val float64, bitSize int) { + enc.addElementSeparator() + switch { + case math.IsNaN(val): + enc.buf.AppendString(`"NaN"`) + case math.IsInf(val, 1): + enc.buf.AppendString(`"+Inf"`) + case math.IsInf(val, -1): + enc.buf.AppendString(`"-Inf"`) + default: + enc.buf.AppendFloat(val, bitSize) + } +} + +// safeAddString JSON-escapes a string and appends it to the internal buffer. +// Unlike the standard library's encoder, it doesn't attempt to protect the +// user from browser vulnerabilities or JSONP-related problems. +func (enc *jsonEncoder) safeAddString(s string) { + for i := 0; i < len(s); { + if enc.tryAddRuneSelf(s[i]) { + i++ + continue + } + r, size := utf8.DecodeRuneInString(s[i:]) + if enc.tryAddRuneError(r, size) { + i++ + continue + } + enc.buf.AppendString(s[i : i+size]) + i += size + } +} + +// safeAddByteString is no-alloc equivalent of safeAddString(string(s)) for s []byte. +func (enc *jsonEncoder) safeAddByteString(s []byte) { + for i := 0; i < len(s); { + if enc.tryAddRuneSelf(s[i]) { + i++ + continue + } + r, size := utf8.DecodeRune(s[i:]) + if enc.tryAddRuneError(r, size) { + i++ + continue + } + enc.buf.Write(s[i : i+size]) + i += size + } +} + +// tryAddRuneSelf appends b if it is valid UTF-8 character represented in a single byte. +func (enc *jsonEncoder) tryAddRuneSelf(b byte) bool { + if b >= utf8.RuneSelf { + return false + } + if 0x20 <= b && b != '\\' && b != '"' { + enc.buf.AppendByte(b) + return true + } + switch b { + case '\\', '"': + enc.buf.AppendByte('\\') + enc.buf.AppendByte(b) + case '\n': + enc.buf.AppendByte('\\') + enc.buf.AppendByte('n') + case '\r': + enc.buf.AppendByte('\\') + enc.buf.AppendByte('r') + case '\t': + enc.buf.AppendByte('\\') + enc.buf.AppendByte('t') + default: + // Encode bytes < 0x20, except for the escape sequences above. + enc.buf.AppendString(`\u00`) + enc.buf.AppendByte(_hex[b>>4]) + enc.buf.AppendByte(_hex[b&0xF]) + } + return true +} + +func (enc *jsonEncoder) tryAddRuneError(r rune, size int) bool { + if r == utf8.RuneError && size == 1 { + enc.buf.AppendString(`\ufffd`) + return true + } + return false +} diff --git a/vendor/go.uber.org/zap/zapcore/level.go b/vendor/go.uber.org/zap/zapcore/level.go new file mode 100644 index 0000000..e575c9f --- /dev/null +++ b/vendor/go.uber.org/zap/zapcore/level.go @@ -0,0 +1,175 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zapcore + +import ( + "bytes" + "errors" + "fmt" +) + +var errUnmarshalNilLevel = errors.New("can't unmarshal a nil *Level") + +// A Level is a logging priority. Higher levels are more important. +type Level int8 + +const ( + // DebugLevel logs are typically voluminous, and are usually disabled in + // production. + DebugLevel Level = iota - 1 + // InfoLevel is the default logging priority. + InfoLevel + // WarnLevel logs are more important than Info, but don't need individual + // human review. + WarnLevel + // ErrorLevel logs are high-priority. If an application is running smoothly, + // it shouldn't generate any error-level logs. + ErrorLevel + // DPanicLevel logs are particularly important errors. In development the + // logger panics after writing the message. + DPanicLevel + // PanicLevel logs a message, then panics. + PanicLevel + // FatalLevel logs a message, then calls os.Exit(1). + FatalLevel + + _minLevel = DebugLevel + _maxLevel = FatalLevel +) + +// String returns a lower-case ASCII representation of the log level. +func (l Level) String() string { + switch l { + case DebugLevel: + return "debug" + case InfoLevel: + return "info" + case WarnLevel: + return "warn" + case ErrorLevel: + return "error" + case DPanicLevel: + return "dpanic" + case PanicLevel: + return "panic" + case FatalLevel: + return "fatal" + default: + return fmt.Sprintf("Level(%d)", l) + } +} + +// CapitalString returns an all-caps ASCII representation of the log level. +func (l Level) CapitalString() string { + // Printing levels in all-caps is common enough that we should export this + // functionality. + switch l { + case DebugLevel: + return "DEBUG" + case InfoLevel: + return "INFO" + case WarnLevel: + return "WARN" + case ErrorLevel: + return "ERROR" + case DPanicLevel: + return "DPANIC" + case PanicLevel: + return "PANIC" + case FatalLevel: + return "FATAL" + default: + return fmt.Sprintf("LEVEL(%d)", l) + } +} + +// MarshalText marshals the Level to text. Note that the text representation +// drops the -Level suffix (see example). +func (l Level) MarshalText() ([]byte, error) { + return []byte(l.String()), nil +} + +// UnmarshalText unmarshals text to a level. Like MarshalText, UnmarshalText +// expects the text representation of a Level to drop the -Level suffix (see +// example). +// +// In particular, this makes it easy to configure logging levels using YAML, +// TOML, or JSON files. +func (l *Level) UnmarshalText(text []byte) error { + if l == nil { + return errUnmarshalNilLevel + } + if !l.unmarshalText(text) && !l.unmarshalText(bytes.ToLower(text)) { + return fmt.Errorf("unrecognized level: %q", text) + } + return nil +} + +func (l *Level) unmarshalText(text []byte) bool { + switch string(text) { + case "debug", "DEBUG": + *l = DebugLevel + case "info", "INFO", "": // make the zero value useful + *l = InfoLevel + case "warn", "WARN": + *l = WarnLevel + case "error", "ERROR": + *l = ErrorLevel + case "dpanic", "DPANIC": + *l = DPanicLevel + case "panic", "PANIC": + *l = PanicLevel + case "fatal", "FATAL": + *l = FatalLevel + default: + return false + } + return true +} + +// Set sets the level for the flag.Value interface. +func (l *Level) Set(s string) error { + return l.UnmarshalText([]byte(s)) +} + +// Get gets the level for the flag.Getter interface. +func (l *Level) Get() interface{} { + return *l +} + +// Enabled returns true if the given level is at or above this level. +func (l Level) Enabled(lvl Level) bool { + return lvl >= l +} + +// LevelEnabler decides whether a given logging level is enabled when logging a +// message. +// +// Enablers are intended to be used to implement deterministic filters; +// concerns like sampling are better implemented as a Core. +// +// Each concrete Level value implements a static LevelEnabler which returns +// true for itself and all higher logging levels. For example WarnLevel.Enabled() +// will return true for WarnLevel, ErrorLevel, DPanicLevel, PanicLevel, and +// FatalLevel, but return false for InfoLevel and DebugLevel. +type LevelEnabler interface { + Enabled(Level) bool +} diff --git a/vendor/go.uber.org/zap/zapcore/level_strings.go b/vendor/go.uber.org/zap/zapcore/level_strings.go new file mode 100644 index 0000000..7af8dad --- /dev/null +++ b/vendor/go.uber.org/zap/zapcore/level_strings.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zapcore + +import "go.uber.org/zap/internal/color" + +var ( + _levelToColor = map[Level]color.Color{ + DebugLevel: color.Magenta, + InfoLevel: color.Blue, + WarnLevel: color.Yellow, + ErrorLevel: color.Red, + DPanicLevel: color.Red, + PanicLevel: color.Red, + FatalLevel: color.Red, + } + _unknownLevelColor = color.Red + + _levelToLowercaseColorString = make(map[Level]string, len(_levelToColor)) + _levelToCapitalColorString = make(map[Level]string, len(_levelToColor)) +) + +func init() { + for level, color := range _levelToColor { + _levelToLowercaseColorString[level] = color.Add(level.String()) + _levelToCapitalColorString[level] = color.Add(level.CapitalString()) + } +} diff --git a/vendor/go.uber.org/zap/zapcore/marshaler.go b/vendor/go.uber.org/zap/zapcore/marshaler.go new file mode 100644 index 0000000..2627a65 --- /dev/null +++ b/vendor/go.uber.org/zap/zapcore/marshaler.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zapcore + +// ObjectMarshaler allows user-defined types to efficiently add themselves to the +// logging context, and to selectively omit information which shouldn't be +// included in logs (e.g., passwords). +type ObjectMarshaler interface { + MarshalLogObject(ObjectEncoder) error +} + +// ObjectMarshalerFunc is a type adapter that turns a function into an +// ObjectMarshaler. +type ObjectMarshalerFunc func(ObjectEncoder) error + +// MarshalLogObject calls the underlying function. +func (f ObjectMarshalerFunc) MarshalLogObject(enc ObjectEncoder) error { + return f(enc) +} + +// ArrayMarshaler allows user-defined types to efficiently add themselves to the +// logging context, and to selectively omit information which shouldn't be +// included in logs (e.g., passwords). +type ArrayMarshaler interface { + MarshalLogArray(ArrayEncoder) error +} + +// ArrayMarshalerFunc is a type adapter that turns a function into an +// ArrayMarshaler. +type ArrayMarshalerFunc func(ArrayEncoder) error + +// MarshalLogArray calls the underlying function. +func (f ArrayMarshalerFunc) MarshalLogArray(enc ArrayEncoder) error { + return f(enc) +} diff --git a/vendor/go.uber.org/zap/zapcore/memory_encoder.go b/vendor/go.uber.org/zap/zapcore/memory_encoder.go new file mode 100644 index 0000000..5c46bc1 --- /dev/null +++ b/vendor/go.uber.org/zap/zapcore/memory_encoder.go @@ -0,0 +1,179 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zapcore + +import "time" + +// MapObjectEncoder is an ObjectEncoder backed by a simple +// map[string]interface{}. It's not fast enough for production use, but it's +// helpful in tests. +type MapObjectEncoder struct { + // Fields contains the entire encoded log context. + Fields map[string]interface{} + // cur is a pointer to the namespace we're currently writing to. + cur map[string]interface{} +} + +// NewMapObjectEncoder creates a new map-backed ObjectEncoder. +func NewMapObjectEncoder() *MapObjectEncoder { + m := make(map[string]interface{}) + return &MapObjectEncoder{ + Fields: m, + cur: m, + } +} + +// AddArray implements ObjectEncoder. +func (m *MapObjectEncoder) AddArray(key string, v ArrayMarshaler) error { + arr := &sliceArrayEncoder{} + err := v.MarshalLogArray(arr) + m.cur[key] = arr.elems + return err +} + +// AddObject implements ObjectEncoder. +func (m *MapObjectEncoder) AddObject(k string, v ObjectMarshaler) error { + newMap := NewMapObjectEncoder() + m.cur[k] = newMap.Fields + return v.MarshalLogObject(newMap) +} + +// AddBinary implements ObjectEncoder. +func (m *MapObjectEncoder) AddBinary(k string, v []byte) { m.cur[k] = v } + +// AddByteString implements ObjectEncoder. +func (m *MapObjectEncoder) AddByteString(k string, v []byte) { m.cur[k] = string(v) } + +// AddBool implements ObjectEncoder. +func (m *MapObjectEncoder) AddBool(k string, v bool) { m.cur[k] = v } + +// AddDuration implements ObjectEncoder. +func (m MapObjectEncoder) AddDuration(k string, v time.Duration) { m.cur[k] = v } + +// AddComplex128 implements ObjectEncoder. +func (m *MapObjectEncoder) AddComplex128(k string, v complex128) { m.cur[k] = v } + +// AddComplex64 implements ObjectEncoder. +func (m *MapObjectEncoder) AddComplex64(k string, v complex64) { m.cur[k] = v } + +// AddFloat64 implements ObjectEncoder. +func (m *MapObjectEncoder) AddFloat64(k string, v float64) { m.cur[k] = v } + +// AddFloat32 implements ObjectEncoder. +func (m *MapObjectEncoder) AddFloat32(k string, v float32) { m.cur[k] = v } + +// AddInt implements ObjectEncoder. +func (m *MapObjectEncoder) AddInt(k string, v int) { m.cur[k] = v } + +// AddInt64 implements ObjectEncoder. +func (m *MapObjectEncoder) AddInt64(k string, v int64) { m.cur[k] = v } + +// AddInt32 implements ObjectEncoder. +func (m *MapObjectEncoder) AddInt32(k string, v int32) { m.cur[k] = v } + +// AddInt16 implements ObjectEncoder. +func (m *MapObjectEncoder) AddInt16(k string, v int16) { m.cur[k] = v } + +// AddInt8 implements ObjectEncoder. +func (m *MapObjectEncoder) AddInt8(k string, v int8) { m.cur[k] = v } + +// AddString implements ObjectEncoder. +func (m *MapObjectEncoder) AddString(k string, v string) { m.cur[k] = v } + +// AddTime implements ObjectEncoder. +func (m MapObjectEncoder) AddTime(k string, v time.Time) { m.cur[k] = v } + +// AddUint implements ObjectEncoder. +func (m *MapObjectEncoder) AddUint(k string, v uint) { m.cur[k] = v } + +// AddUint64 implements ObjectEncoder. +func (m *MapObjectEncoder) AddUint64(k string, v uint64) { m.cur[k] = v } + +// AddUint32 implements ObjectEncoder. +func (m *MapObjectEncoder) AddUint32(k string, v uint32) { m.cur[k] = v } + +// AddUint16 implements ObjectEncoder. +func (m *MapObjectEncoder) AddUint16(k string, v uint16) { m.cur[k] = v } + +// AddUint8 implements ObjectEncoder. +func (m *MapObjectEncoder) AddUint8(k string, v uint8) { m.cur[k] = v } + +// AddUintptr implements ObjectEncoder. +func (m *MapObjectEncoder) AddUintptr(k string, v uintptr) { m.cur[k] = v } + +// AddReflected implements ObjectEncoder. +func (m *MapObjectEncoder) AddReflected(k string, v interface{}) error { + m.cur[k] = v + return nil +} + +// OpenNamespace implements ObjectEncoder. +func (m *MapObjectEncoder) OpenNamespace(k string) { + ns := make(map[string]interface{}) + m.cur[k] = ns + m.cur = ns +} + +// sliceArrayEncoder is an ArrayEncoder backed by a simple []interface{}. Like +// the MapObjectEncoder, it's not designed for production use. +type sliceArrayEncoder struct { + elems []interface{} +} + +func (s *sliceArrayEncoder) AppendArray(v ArrayMarshaler) error { + enc := &sliceArrayEncoder{} + err := v.MarshalLogArray(enc) + s.elems = append(s.elems, enc.elems) + return err +} + +func (s *sliceArrayEncoder) AppendObject(v ObjectMarshaler) error { + m := NewMapObjectEncoder() + err := v.MarshalLogObject(m) + s.elems = append(s.elems, m.Fields) + return err +} + +func (s *sliceArrayEncoder) AppendReflected(v interface{}) error { + s.elems = append(s.elems, v) + return nil +} + +func (s *sliceArrayEncoder) AppendBool(v bool) { s.elems = append(s.elems, v) } +func (s *sliceArrayEncoder) AppendByteString(v []byte) { s.elems = append(s.elems, v) } +func (s *sliceArrayEncoder) AppendComplex128(v complex128) { s.elems = append(s.elems, v) } +func (s *sliceArrayEncoder) AppendComplex64(v complex64) { s.elems = append(s.elems, v) } +func (s *sliceArrayEncoder) AppendDuration(v time.Duration) { s.elems = append(s.elems, v) } +func (s *sliceArrayEncoder) AppendFloat64(v float64) { s.elems = append(s.elems, v) } +func (s *sliceArrayEncoder) AppendFloat32(v float32) { s.elems = append(s.elems, v) } +func (s *sliceArrayEncoder) AppendInt(v int) { s.elems = append(s.elems, v) } +func (s *sliceArrayEncoder) AppendInt64(v int64) { s.elems = append(s.elems, v) } +func (s *sliceArrayEncoder) AppendInt32(v int32) { s.elems = append(s.elems, v) } +func (s *sliceArrayEncoder) AppendInt16(v int16) { s.elems = append(s.elems, v) } +func (s *sliceArrayEncoder) AppendInt8(v int8) { s.elems = append(s.elems, v) } +func (s *sliceArrayEncoder) AppendString(v string) { s.elems = append(s.elems, v) } +func (s *sliceArrayEncoder) AppendTime(v time.Time) { s.elems = append(s.elems, v) } +func (s *sliceArrayEncoder) AppendUint(v uint) { s.elems = append(s.elems, v) } +func (s *sliceArrayEncoder) AppendUint64(v uint64) { s.elems = append(s.elems, v) } +func (s *sliceArrayEncoder) AppendUint32(v uint32) { s.elems = append(s.elems, v) } +func (s *sliceArrayEncoder) AppendUint16(v uint16) { s.elems = append(s.elems, v) } +func (s *sliceArrayEncoder) AppendUint8(v uint8) { s.elems = append(s.elems, v) } +func (s *sliceArrayEncoder) AppendUintptr(v uintptr) { s.elems = append(s.elems, v) } diff --git a/vendor/go.uber.org/zap/zapcore/sampler.go b/vendor/go.uber.org/zap/zapcore/sampler.go new file mode 100644 index 0000000..e316418 --- /dev/null +++ b/vendor/go.uber.org/zap/zapcore/sampler.go @@ -0,0 +1,134 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zapcore + +import ( + "time" + + "go.uber.org/atomic" +) + +const ( + _numLevels = _maxLevel - _minLevel + 1 + _countersPerLevel = 4096 +) + +type counter struct { + resetAt atomic.Int64 + counter atomic.Uint64 +} + +type counters [_numLevels][_countersPerLevel]counter + +func newCounters() *counters { + return &counters{} +} + +func (cs *counters) get(lvl Level, key string) *counter { + i := lvl - _minLevel + j := fnv32a(key) % _countersPerLevel + return &cs[i][j] +} + +// fnv32a, adapted from "hash/fnv", but without a []byte(string) alloc +func fnv32a(s string) uint32 { + const ( + offset32 = 2166136261 + prime32 = 16777619 + ) + hash := uint32(offset32) + for i := 0; i < len(s); i++ { + hash ^= uint32(s[i]) + hash *= prime32 + } + return hash +} + +func (c *counter) IncCheckReset(t time.Time, tick time.Duration) uint64 { + tn := t.UnixNano() + resetAfter := c.resetAt.Load() + if resetAfter > tn { + return c.counter.Inc() + } + + c.counter.Store(1) + + newResetAfter := tn + tick.Nanoseconds() + if !c.resetAt.CAS(resetAfter, newResetAfter) { + // We raced with another goroutine trying to reset, and it also reset + // the counter to 1, so we need to reincrement the counter. + return c.counter.Inc() + } + + return 1 +} + +type sampler struct { + Core + + counts *counters + tick time.Duration + first, thereafter uint64 +} + +// NewSampler creates a Core that samples incoming entries, which caps the CPU +// and I/O load of logging while attempting to preserve a representative subset +// of your logs. +// +// Zap samples by logging the first N entries with a given level and message +// each tick. If more Entries with the same level and message are seen during +// the same interval, every Mth message is logged and the rest are dropped. +// +// Keep in mind that zap's sampling implementation is optimized for speed over +// absolute precision; under load, each tick may be slightly over- or +// under-sampled. +func NewSampler(core Core, tick time.Duration, first, thereafter int) Core { + return &sampler{ + Core: core, + tick: tick, + counts: newCounters(), + first: uint64(first), + thereafter: uint64(thereafter), + } +} + +func (s *sampler) With(fields []Field) Core { + return &sampler{ + Core: s.Core.With(fields), + tick: s.tick, + counts: s.counts, + first: s.first, + thereafter: s.thereafter, + } +} + +func (s *sampler) Check(ent Entry, ce *CheckedEntry) *CheckedEntry { + if !s.Enabled(ent.Level) { + return ce + } + + counter := s.counts.get(ent.Level, ent.Message) + n := counter.IncCheckReset(ent.Time, s.tick) + if n > s.first && (n-s.first)%s.thereafter != 0 { + return ce + } + return s.Core.Check(ent, ce) +} diff --git a/vendor/go.uber.org/zap/zapcore/tee.go b/vendor/go.uber.org/zap/zapcore/tee.go new file mode 100644 index 0000000..07a32ee --- /dev/null +++ b/vendor/go.uber.org/zap/zapcore/tee.go @@ -0,0 +1,81 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zapcore + +import "go.uber.org/multierr" + +type multiCore []Core + +// NewTee creates a Core that duplicates log entries into two or more +// underlying Cores. +// +// Calling it with a single Core returns the input unchanged, and calling +// it with no input returns a no-op Core. +func NewTee(cores ...Core) Core { + switch len(cores) { + case 0: + return NewNopCore() + case 1: + return cores[0] + default: + return multiCore(cores) + } +} + +func (mc multiCore) With(fields []Field) Core { + clone := make(multiCore, len(mc)) + for i := range mc { + clone[i] = mc[i].With(fields) + } + return clone +} + +func (mc multiCore) Enabled(lvl Level) bool { + for i := range mc { + if mc[i].Enabled(lvl) { + return true + } + } + return false +} + +func (mc multiCore) Check(ent Entry, ce *CheckedEntry) *CheckedEntry { + for i := range mc { + ce = mc[i].Check(ent, ce) + } + return ce +} + +func (mc multiCore) Write(ent Entry, fields []Field) error { + var err error + for i := range mc { + err = multierr.Append(err, mc[i].Write(ent, fields)) + } + return err +} + +func (mc multiCore) Sync() error { + var err error + for i := range mc { + err = multierr.Append(err, mc[i].Sync()) + } + return err +} diff --git a/vendor/go.uber.org/zap/zapcore/write_syncer.go b/vendor/go.uber.org/zap/zapcore/write_syncer.go new file mode 100644 index 0000000..209e25f --- /dev/null +++ b/vendor/go.uber.org/zap/zapcore/write_syncer.go @@ -0,0 +1,123 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zapcore + +import ( + "io" + "sync" + + "go.uber.org/multierr" +) + +// A WriteSyncer is an io.Writer that can also flush any buffered data. Note +// that *os.File (and thus, os.Stderr and os.Stdout) implement WriteSyncer. +type WriteSyncer interface { + io.Writer + Sync() error +} + +// AddSync converts an io.Writer to a WriteSyncer. It attempts to be +// intelligent: if the concrete type of the io.Writer implements WriteSyncer, +// we'll use the existing Sync method. If it doesn't, we'll add a no-op Sync. +func AddSync(w io.Writer) WriteSyncer { + switch w := w.(type) { + case WriteSyncer: + return w + default: + return writerWrapper{w} + } +} + +type lockedWriteSyncer struct { + sync.Mutex + ws WriteSyncer +} + +// Lock wraps a WriteSyncer in a mutex to make it safe for concurrent use. In +// particular, *os.Files must be locked before use. +func Lock(ws WriteSyncer) WriteSyncer { + if _, ok := ws.(*lockedWriteSyncer); ok { + // no need to layer on another lock + return ws + } + return &lockedWriteSyncer{ws: ws} +} + +func (s *lockedWriteSyncer) Write(bs []byte) (int, error) { + s.Lock() + n, err := s.ws.Write(bs) + s.Unlock() + return n, err +} + +func (s *lockedWriteSyncer) Sync() error { + s.Lock() + err := s.ws.Sync() + s.Unlock() + return err +} + +type writerWrapper struct { + io.Writer +} + +func (w writerWrapper) Sync() error { + return nil +} + +type multiWriteSyncer []WriteSyncer + +// NewMultiWriteSyncer creates a WriteSyncer that duplicates its writes +// and sync calls, much like io.MultiWriter. +func NewMultiWriteSyncer(ws ...WriteSyncer) WriteSyncer { + if len(ws) == 1 { + return ws[0] + } + // Copy to protect against https://github.com/golang/go/issues/7809 + return multiWriteSyncer(append([]WriteSyncer(nil), ws...)) +} + +// See https://golang.org/src/io/multi.go +// When not all underlying syncers write the same number of bytes, +// the smallest number is returned even though Write() is called on +// all of them. +func (ws multiWriteSyncer) Write(p []byte) (int, error) { + var writeErr error + nWritten := 0 + for _, w := range ws { + n, err := w.Write(p) + writeErr = multierr.Append(writeErr, err) + if nWritten == 0 && n != 0 { + nWritten = n + } else if n < nWritten { + nWritten = n + } + } + return nWritten, writeErr +} + +func (ws multiWriteSyncer) Sync() error { + var err error + for _, w := range ws { + err = multierr.Append(err, w.Sync()) + } + return err +} diff --git a/vendor/golang.org/x/image/AUTHORS b/vendor/golang.org/x/image/AUTHORS new file mode 100644 index 0000000..15167cd --- /dev/null +++ b/vendor/golang.org/x/image/AUTHORS @@ -0,0 +1,3 @@ +# This source code refers to The Go Authors for copyright purposes. +# The master list of authors is in the main Go distribution, +# visible at http://tip.golang.org/AUTHORS. diff --git a/vendor/golang.org/x/image/CONTRIBUTORS b/vendor/golang.org/x/image/CONTRIBUTORS new file mode 100644 index 0000000..1c4577e --- /dev/null +++ b/vendor/golang.org/x/image/CONTRIBUTORS @@ -0,0 +1,3 @@ +# This source code was written by the Go contributors. +# The master list of contributors is in the main Go distribution, +# visible at http://tip.golang.org/CONTRIBUTORS. diff --git a/vendor/golang.org/x/image/LICENSE b/vendor/golang.org/x/image/LICENSE new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/vendor/golang.org/x/image/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/golang.org/x/image/PATENTS b/vendor/golang.org/x/image/PATENTS new file mode 100644 index 0000000..7330990 --- /dev/null +++ b/vendor/golang.org/x/image/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/vendor/golang.org/x/image/font/font.go b/vendor/golang.org/x/image/font/font.go new file mode 100644 index 0000000..05f4357 --- /dev/null +++ b/vendor/golang.org/x/image/font/font.go @@ -0,0 +1,359 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package font defines an interface for font faces, for drawing text on an +// image. +// +// Other packages provide font face implementations. For example, a truetype +// package would provide one based on .ttf font files. +package font // import "golang.org/x/image/font" + +import ( + "image" + "image/draw" + "io" + "unicode/utf8" + + "golang.org/x/image/math/fixed" +) + +// TODO: who is responsible for caches (glyph images, glyph indices, kerns)? +// The Drawer or the Face? + +// Face is a font face. Its glyphs are often derived from a font file, such as +// "Comic_Sans_MS.ttf", but a face has a specific size, style, weight and +// hinting. For example, the 12pt and 18pt versions of Comic Sans are two +// different faces, even if derived from the same font file. +// +// A Face is not safe for concurrent use by multiple goroutines, as its methods +// may re-use implementation-specific caches and mask image buffers. +// +// To create a Face, look to other packages that implement specific font file +// formats. +type Face interface { + io.Closer + + // Glyph returns the draw.DrawMask parameters (dr, mask, maskp) to draw r's + // glyph at the sub-pixel destination location dot, and that glyph's + // advance width. + // + // It returns !ok if the face does not contain a glyph for r. + // + // The contents of the mask image returned by one Glyph call may change + // after the next Glyph call. Callers that want to cache the mask must make + // a copy. + Glyph(dot fixed.Point26_6, r rune) ( + dr image.Rectangle, mask image.Image, maskp image.Point, advance fixed.Int26_6, ok bool) + + // GlyphBounds returns the bounding box of r's glyph, drawn at a dot equal + // to the origin, and that glyph's advance width. + // + // It returns !ok if the face does not contain a glyph for r. + // + // The glyph's ascent and descent equal -bounds.Min.Y and +bounds.Max.Y. A + // visual depiction of what these metrics are is at + // https://developer.apple.com/library/mac/documentation/TextFonts/Conceptual/CocoaTextArchitecture/Art/glyph_metrics_2x.png + GlyphBounds(r rune) (bounds fixed.Rectangle26_6, advance fixed.Int26_6, ok bool) + + // GlyphAdvance returns the advance width of r's glyph. + // + // It returns !ok if the face does not contain a glyph for r. + GlyphAdvance(r rune) (advance fixed.Int26_6, ok bool) + + // Kern returns the horizontal adjustment for the kerning pair (r0, r1). A + // positive kern means to move the glyphs further apart. + Kern(r0, r1 rune) fixed.Int26_6 + + // Metrics returns the metrics for this Face. + Metrics() Metrics + + // TODO: ColoredGlyph for various emoji? + // TODO: Ligatures? Shaping? +} + +// Metrics holds the metrics for a Face. A visual depiction is at +// https://developer.apple.com/library/mac/documentation/TextFonts/Conceptual/CocoaTextArchitecture/Art/glyph_metrics_2x.png +type Metrics struct { + // Height is the recommended amount of vertical space between two lines of + // text. + Height fixed.Int26_6 + + // Ascent is the distance from the top of a line to its baseline. + Ascent fixed.Int26_6 + + // Descent is the distance from the bottom of a line to its baseline. The + // value is typically positive, even though a descender goes below the + // baseline. + Descent fixed.Int26_6 +} + +// Drawer draws text on a destination image. +// +// A Drawer is not safe for concurrent use by multiple goroutines, since its +// Face is not. +type Drawer struct { + // Dst is the destination image. + Dst draw.Image + // Src is the source image. + Src image.Image + // Face provides the glyph mask images. + Face Face + // Dot is the baseline location to draw the next glyph. The majority of the + // affected pixels will be above and to the right of the dot, but some may + // be below or to the left. For example, drawing a 'j' in an italic face + // may affect pixels below and to the left of the dot. + Dot fixed.Point26_6 + + // TODO: Clip image.Image? + // TODO: SrcP image.Point for Src images other than *image.Uniform? How + // does it get updated during DrawString? +} + +// TODO: should DrawString return the last rune drawn, so the next DrawString +// call can kern beforehand? Or should that be the responsibility of the caller +// if they really want to do that, since they have to explicitly shift d.Dot +// anyway? What if ligatures span more than two runes? What if grapheme +// clusters span multiple runes? +// +// TODO: do we assume that the input is in any particular Unicode Normalization +// Form? +// +// TODO: have DrawRunes(s []rune)? DrawRuneReader(io.RuneReader)?? If we take +// io.RuneReader, we can't assume that we can rewind the stream. +// +// TODO: how does this work with line breaking: drawing text up until a +// vertical line? Should DrawString return the number of runes drawn? + +// DrawBytes draws s at the dot and advances the dot's location. +// +// It is equivalent to DrawString(string(s)) but may be more efficient. +func (d *Drawer) DrawBytes(s []byte) { + prevC := rune(-1) + for len(s) > 0 { + c, size := utf8.DecodeRune(s) + s = s[size:] + if prevC >= 0 { + d.Dot.X += d.Face.Kern(prevC, c) + } + dr, mask, maskp, advance, ok := d.Face.Glyph(d.Dot, c) + if !ok { + // TODO: is falling back on the U+FFFD glyph the responsibility of + // the Drawer or the Face? + // TODO: set prevC = '\ufffd'? + continue + } + draw.DrawMask(d.Dst, dr, d.Src, image.Point{}, mask, maskp, draw.Over) + d.Dot.X += advance + prevC = c + } +} + +// DrawString draws s at the dot and advances the dot's location. +func (d *Drawer) DrawString(s string) { + prevC := rune(-1) + for _, c := range s { + if prevC >= 0 { + d.Dot.X += d.Face.Kern(prevC, c) + } + dr, mask, maskp, advance, ok := d.Face.Glyph(d.Dot, c) + if !ok { + // TODO: is falling back on the U+FFFD glyph the responsibility of + // the Drawer or the Face? + // TODO: set prevC = '\ufffd'? + continue + } + draw.DrawMask(d.Dst, dr, d.Src, image.Point{}, mask, maskp, draw.Over) + d.Dot.X += advance + prevC = c + } +} + +// BoundBytes returns the bounding box of s, drawn at the drawer dot, as well as +// the advance. +// +// It is equivalent to BoundBytes(string(s)) but may be more efficient. +func (d *Drawer) BoundBytes(s []byte) (bounds fixed.Rectangle26_6, advance fixed.Int26_6) { + bounds, advance = BoundBytes(d.Face, s) + bounds.Min = bounds.Min.Add(d.Dot) + bounds.Max = bounds.Max.Add(d.Dot) + return +} + +// BoundString returns the bounding box of s, drawn at the drawer dot, as well +// as the advance. +func (d *Drawer) BoundString(s string) (bounds fixed.Rectangle26_6, advance fixed.Int26_6) { + bounds, advance = BoundString(d.Face, s) + bounds.Min = bounds.Min.Add(d.Dot) + bounds.Max = bounds.Max.Add(d.Dot) + return +} + +// MeasureBytes returns how far dot would advance by drawing s. +// +// It is equivalent to MeasureString(string(s)) but may be more efficient. +func (d *Drawer) MeasureBytes(s []byte) (advance fixed.Int26_6) { + return MeasureBytes(d.Face, s) +} + +// MeasureString returns how far dot would advance by drawing s. +func (d *Drawer) MeasureString(s string) (advance fixed.Int26_6) { + return MeasureString(d.Face, s) +} + +// BoundBytes returns the bounding box of s with f, drawn at a dot equal to the +// origin, as well as the advance. +// +// It is equivalent to BoundString(string(s)) but may be more efficient. +func BoundBytes(f Face, s []byte) (bounds fixed.Rectangle26_6, advance fixed.Int26_6) { + prevC := rune(-1) + for len(s) > 0 { + c, size := utf8.DecodeRune(s) + s = s[size:] + if prevC >= 0 { + advance += f.Kern(prevC, c) + } + b, a, ok := f.GlyphBounds(c) + if !ok { + // TODO: is falling back on the U+FFFD glyph the responsibility of + // the Drawer or the Face? + // TODO: set prevC = '\ufffd'? + continue + } + b.Min.X += advance + b.Max.X += advance + bounds = bounds.Union(b) + advance += a + prevC = c + } + return +} + +// BoundString returns the bounding box of s with f, drawn at a dot equal to the +// origin, as well as the advance. +func BoundString(f Face, s string) (bounds fixed.Rectangle26_6, advance fixed.Int26_6) { + prevC := rune(-1) + for _, c := range s { + if prevC >= 0 { + advance += f.Kern(prevC, c) + } + b, a, ok := f.GlyphBounds(c) + if !ok { + // TODO: is falling back on the U+FFFD glyph the responsibility of + // the Drawer or the Face? + // TODO: set prevC = '\ufffd'? + continue + } + b.Min.X += advance + b.Max.X += advance + bounds = bounds.Union(b) + advance += a + prevC = c + } + return +} + +// MeasureBytes returns how far dot would advance by drawing s with f. +// +// It is equivalent to MeasureString(string(s)) but may be more efficient. +func MeasureBytes(f Face, s []byte) (advance fixed.Int26_6) { + prevC := rune(-1) + for len(s) > 0 { + c, size := utf8.DecodeRune(s) + s = s[size:] + if prevC >= 0 { + advance += f.Kern(prevC, c) + } + a, ok := f.GlyphAdvance(c) + if !ok { + // TODO: is falling back on the U+FFFD glyph the responsibility of + // the Drawer or the Face? + // TODO: set prevC = '\ufffd'? + continue + } + advance += a + prevC = c + } + return advance +} + +// MeasureString returns how far dot would advance by drawing s with f. +func MeasureString(f Face, s string) (advance fixed.Int26_6) { + prevC := rune(-1) + for _, c := range s { + if prevC >= 0 { + advance += f.Kern(prevC, c) + } + a, ok := f.GlyphAdvance(c) + if !ok { + // TODO: is falling back on the U+FFFD glyph the responsibility of + // the Drawer or the Face? + // TODO: set prevC = '\ufffd'? + continue + } + advance += a + prevC = c + } + return advance +} + +// Hinting selects how to quantize a vector font's glyph nodes. +// +// Not all fonts support hinting. +type Hinting int + +const ( + HintingNone Hinting = iota + HintingVertical + HintingFull +) + +// Stretch selects a normal, condensed, or expanded face. +// +// Not all fonts support stretches. +type Stretch int + +const ( + StretchUltraCondensed Stretch = -4 + StretchExtraCondensed Stretch = -3 + StretchCondensed Stretch = -2 + StretchSemiCondensed Stretch = -1 + StretchNormal Stretch = +0 + StretchSemiExpanded Stretch = +1 + StretchExpanded Stretch = +2 + StretchExtraExpanded Stretch = +3 + StretchUltraExpanded Stretch = +4 +) + +// Style selects a normal, italic, or oblique face. +// +// Not all fonts support styles. +type Style int + +const ( + StyleNormal Style = iota + StyleItalic + StyleOblique +) + +// Weight selects a normal, light or bold face. +// +// Not all fonts support weights. +// +// The named Weight constants (e.g. WeightBold) correspond to CSS' common +// weight names (e.g. "Bold"), but the numerical values differ, so that in Go, +// the zero value means to use a normal weight. For the CSS names and values, +// see https://developer.mozilla.org/en/docs/Web/CSS/font-weight +type Weight int + +const ( + WeightThin Weight = -3 // CSS font-weight value 100. + WeightExtraLight Weight = -2 // CSS font-weight value 200. + WeightLight Weight = -1 // CSS font-weight value 300. + WeightNormal Weight = +0 // CSS font-weight value 400. + WeightMedium Weight = +1 // CSS font-weight value 500. + WeightSemiBold Weight = +2 // CSS font-weight value 600. + WeightBold Weight = +3 // CSS font-weight value 700. + WeightExtraBold Weight = +4 // CSS font-weight value 800. + WeightBlack Weight = +5 // CSS font-weight value 900. +) diff --git a/vendor/golang.org/x/image/math/f32/f32.go b/vendor/golang.org/x/image/math/f32/f32.go new file mode 100644 index 0000000..4ca1eb4 --- /dev/null +++ b/vendor/golang.org/x/image/math/f32/f32.go @@ -0,0 +1,37 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package f32 implements float32 vector and matrix types. +package f32 // import "golang.org/x/image/math/f32" + +// Vec2 is a 2-element vector. +type Vec2 [2]float32 + +// Vec3 is a 3-element vector. +type Vec3 [3]float32 + +// Vec4 is a 4-element vector. +type Vec4 [4]float32 + +// Mat3 is a 3x3 matrix in row major order. +// +// m[3*r + c] is the element in the r'th row and c'th column. +type Mat3 [9]float32 + +// Mat4 is a 4x4 matrix in row major order. +// +// m[4*r + c] is the element in the r'th row and c'th column. +type Mat4 [16]float32 + +// Aff3 is a 3x3 affine transformation matrix in row major order, where the +// bottom row is implicitly [0 0 1]. +// +// m[3*r + c] is the element in the r'th row and c'th column. +type Aff3 [6]float32 + +// Aff4 is a 4x4 affine transformation matrix in row major order, where the +// bottom row is implicitly [0 0 0 1]. +// +// m[4*r + c] is the element in the r'th row and c'th column. +type Aff4 [12]float32 diff --git a/vendor/golang.org/x/image/math/fixed/fixed.go b/vendor/golang.org/x/image/math/fixed/fixed.go new file mode 100644 index 0000000..3d91663 --- /dev/null +++ b/vendor/golang.org/x/image/math/fixed/fixed.go @@ -0,0 +1,410 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package fixed implements fixed-point integer types. +package fixed // import "golang.org/x/image/math/fixed" + +import ( + "fmt" +) + +// TODO: implement fmt.Formatter for %f and %g. + +// I returns the integer value i as an Int26_6. +// +// For example, passing the integer value 2 yields Int26_6(128). +func I(i int) Int26_6 { + return Int26_6(i << 6) +} + +// Int26_6 is a signed 26.6 fixed-point number. +// +// The integer part ranges from -33554432 to 33554431, inclusive. The +// fractional part has 6 bits of precision. +// +// For example, the number one-and-a-quarter is Int26_6(1<<6 + 1<<4). +type Int26_6 int32 + +// String returns a human-readable representation of a 26.6 fixed-point number. +// +// For example, the number one-and-a-quarter becomes "1:16". +func (x Int26_6) String() string { + const shift, mask = 6, 1<<6 - 1 + if x >= 0 { + return fmt.Sprintf("%d:%02d", int32(x>>shift), int32(x&mask)) + } + x = -x + if x >= 0 { + return fmt.Sprintf("-%d:%02d", int32(x>>shift), int32(x&mask)) + } + return "-33554432:00" // The minimum value is -(1<<25). +} + +// Floor returns the greatest integer value less than or equal to x. +// +// Its return type is int, not Int26_6. +func (x Int26_6) Floor() int { return int((x + 0x00) >> 6) } + +// Round returns the nearest integer value to x. Ties are rounded up. +// +// Its return type is int, not Int26_6. +func (x Int26_6) Round() int { return int((x + 0x20) >> 6) } + +// Ceil returns the least integer value greater than or equal to x. +// +// Its return type is int, not Int26_6. +func (x Int26_6) Ceil() int { return int((x + 0x3f) >> 6) } + +// Mul returns x*y in 26.6 fixed-point arithmetic. +func (x Int26_6) Mul(y Int26_6) Int26_6 { + return Int26_6((int64(x)*int64(y) + 1<<5) >> 6) +} + +// Int52_12 is a signed 52.12 fixed-point number. +// +// The integer part ranges from -2251799813685248 to 2251799813685247, +// inclusive. The fractional part has 12 bits of precision. +// +// For example, the number one-and-a-quarter is Int52_12(1<<12 + 1<<10). +type Int52_12 int64 + +// String returns a human-readable representation of a 52.12 fixed-point +// number. +// +// For example, the number one-and-a-quarter becomes "1:1024". +func (x Int52_12) String() string { + const shift, mask = 12, 1<<12 - 1 + if x >= 0 { + return fmt.Sprintf("%d:%04d", int64(x>>shift), int64(x&mask)) + } + x = -x + if x >= 0 { + return fmt.Sprintf("-%d:%04d", int64(x>>shift), int64(x&mask)) + } + return "-2251799813685248:0000" // The minimum value is -(1<<51). +} + +// Floor returns the greatest integer value less than or equal to x. +// +// Its return type is int, not Int52_12. +func (x Int52_12) Floor() int { return int((x + 0x000) >> 12) } + +// Round returns the nearest integer value to x. Ties are rounded up. +// +// Its return type is int, not Int52_12. +func (x Int52_12) Round() int { return int((x + 0x800) >> 12) } + +// Ceil returns the least integer value greater than or equal to x. +// +// Its return type is int, not Int52_12. +func (x Int52_12) Ceil() int { return int((x + 0xfff) >> 12) } + +// Mul returns x*y in 52.12 fixed-point arithmetic. +func (x Int52_12) Mul(y Int52_12) Int52_12 { + const M, N = 52, 12 + lo, hi := muli64(int64(x), int64(y)) + ret := Int52_12(hi<>N) + ret += Int52_12((lo >> (N - 1)) & 1) // Round to nearest, instead of rounding down. + return ret +} + +// muli64 multiplies two int64 values, returning the 128-bit signed integer +// result as two uint64 values. +// +// This implementation is similar to $GOROOT/src/runtime/softfloat64.go's mullu +// function, which is in turn adapted from Hacker's Delight. +func muli64(u, v int64) (lo, hi uint64) { + const ( + s = 32 + mask = 1<> s) + u0 := uint64(u & mask) + v1 := uint64(v >> s) + v0 := uint64(v & mask) + + w0 := u0 * v0 + t := u1*v0 + w0>>s + w1 := t & mask + w2 := uint64(int64(t) >> s) + w1 += u0 * v1 + return uint64(u) * uint64(v), u1*v1 + w2 + uint64(int64(w1)>>s) +} + +// P returns the integer values x and y as a Point26_6. +// +// For example, passing the integer values (2, -3) yields Point26_6{128, -192}. +func P(x, y int) Point26_6 { + return Point26_6{Int26_6(x << 6), Int26_6(y << 6)} +} + +// Point26_6 is a 26.6 fixed-point coordinate pair. +// +// It is analogous to the image.Point type in the standard library. +type Point26_6 struct { + X, Y Int26_6 +} + +// Add returns the vector p+q. +func (p Point26_6) Add(q Point26_6) Point26_6 { + return Point26_6{p.X + q.X, p.Y + q.Y} +} + +// Sub returns the vector p-q. +func (p Point26_6) Sub(q Point26_6) Point26_6 { + return Point26_6{p.X - q.X, p.Y - q.Y} +} + +// Mul returns the vector p*k. +func (p Point26_6) Mul(k Int26_6) Point26_6 { + return Point26_6{p.X * k / 64, p.Y * k / 64} +} + +// Div returns the vector p/k. +func (p Point26_6) Div(k Int26_6) Point26_6 { + return Point26_6{p.X * 64 / k, p.Y * 64 / k} +} + +// In returns whether p is in r. +func (p Point26_6) In(r Rectangle26_6) bool { + return r.Min.X <= p.X && p.X < r.Max.X && r.Min.Y <= p.Y && p.Y < r.Max.Y +} + +// Point52_12 is a 52.12 fixed-point coordinate pair. +// +// It is analogous to the image.Point type in the standard library. +type Point52_12 struct { + X, Y Int52_12 +} + +// Add returns the vector p+q. +func (p Point52_12) Add(q Point52_12) Point52_12 { + return Point52_12{p.X + q.X, p.Y + q.Y} +} + +// Sub returns the vector p-q. +func (p Point52_12) Sub(q Point52_12) Point52_12 { + return Point52_12{p.X - q.X, p.Y - q.Y} +} + +// Mul returns the vector p*k. +func (p Point52_12) Mul(k Int52_12) Point52_12 { + return Point52_12{p.X * k / 4096, p.Y * k / 4096} +} + +// Div returns the vector p/k. +func (p Point52_12) Div(k Int52_12) Point52_12 { + return Point52_12{p.X * 4096 / k, p.Y * 4096 / k} +} + +// In returns whether p is in r. +func (p Point52_12) In(r Rectangle52_12) bool { + return r.Min.X <= p.X && p.X < r.Max.X && r.Min.Y <= p.Y && p.Y < r.Max.Y +} + +// R returns the integer values minX, minY, maxX, maxY as a Rectangle26_6. +// +// For example, passing the integer values (0, 1, 2, 3) yields +// Rectangle26_6{Point26_6{0, 64}, Point26_6{128, 192}}. +// +// Like the image.Rect function in the standard library, the returned rectangle +// has minimum and maximum coordinates swapped if necessary so that it is +// well-formed. +func R(minX, minY, maxX, maxY int) Rectangle26_6 { + if minX > maxX { + minX, maxX = maxX, minX + } + if minY > maxY { + minY, maxY = maxY, minY + } + return Rectangle26_6{ + Point26_6{ + Int26_6(minX << 6), + Int26_6(minY << 6), + }, + Point26_6{ + Int26_6(maxX << 6), + Int26_6(maxY << 6), + }, + } +} + +// Rectangle26_6 is a 26.6 fixed-point coordinate rectangle. The Min bound is +// inclusive and the Max bound is exclusive. It is well-formed if Min.X <= +// Max.X and likewise for Y. +// +// It is analogous to the image.Rectangle type in the standard library. +type Rectangle26_6 struct { + Min, Max Point26_6 +} + +// Add returns the rectangle r translated by p. +func (r Rectangle26_6) Add(p Point26_6) Rectangle26_6 { + return Rectangle26_6{ + Point26_6{r.Min.X + p.X, r.Min.Y + p.Y}, + Point26_6{r.Max.X + p.X, r.Max.Y + p.Y}, + } +} + +// Sub returns the rectangle r translated by -p. +func (r Rectangle26_6) Sub(p Point26_6) Rectangle26_6 { + return Rectangle26_6{ + Point26_6{r.Min.X - p.X, r.Min.Y - p.Y}, + Point26_6{r.Max.X - p.X, r.Max.Y - p.Y}, + } +} + +// Intersect returns the largest rectangle contained by both r and s. If the +// two rectangles do not overlap then the zero rectangle will be returned. +func (r Rectangle26_6) Intersect(s Rectangle26_6) Rectangle26_6 { + if r.Min.X < s.Min.X { + r.Min.X = s.Min.X + } + if r.Min.Y < s.Min.Y { + r.Min.Y = s.Min.Y + } + if r.Max.X > s.Max.X { + r.Max.X = s.Max.X + } + if r.Max.Y > s.Max.Y { + r.Max.Y = s.Max.Y + } + // Letting r0 and s0 be the values of r and s at the time that the method + // is called, this next line is equivalent to: + // + // if max(r0.Min.X, s0.Min.X) >= min(r0.Max.X, s0.Max.X) || likewiseForY { etc } + if r.Empty() { + return Rectangle26_6{} + } + return r +} + +// Union returns the smallest rectangle that contains both r and s. +func (r Rectangle26_6) Union(s Rectangle26_6) Rectangle26_6 { + if r.Empty() { + return s + } + if s.Empty() { + return r + } + if r.Min.X > s.Min.X { + r.Min.X = s.Min.X + } + if r.Min.Y > s.Min.Y { + r.Min.Y = s.Min.Y + } + if r.Max.X < s.Max.X { + r.Max.X = s.Max.X + } + if r.Max.Y < s.Max.Y { + r.Max.Y = s.Max.Y + } + return r +} + +// Empty returns whether the rectangle contains no points. +func (r Rectangle26_6) Empty() bool { + return r.Min.X >= r.Max.X || r.Min.Y >= r.Max.Y +} + +// In returns whether every point in r is in s. +func (r Rectangle26_6) In(s Rectangle26_6) bool { + if r.Empty() { + return true + } + // Note that r.Max is an exclusive bound for r, so that r.In(s) + // does not require that r.Max.In(s). + return s.Min.X <= r.Min.X && r.Max.X <= s.Max.X && + s.Min.Y <= r.Min.Y && r.Max.Y <= s.Max.Y +} + +// Rectangle52_12 is a 52.12 fixed-point coordinate rectangle. The Min bound is +// inclusive and the Max bound is exclusive. It is well-formed if Min.X <= +// Max.X and likewise for Y. +// +// It is analogous to the image.Rectangle type in the standard library. +type Rectangle52_12 struct { + Min, Max Point52_12 +} + +// Add returns the rectangle r translated by p. +func (r Rectangle52_12) Add(p Point52_12) Rectangle52_12 { + return Rectangle52_12{ + Point52_12{r.Min.X + p.X, r.Min.Y + p.Y}, + Point52_12{r.Max.X + p.X, r.Max.Y + p.Y}, + } +} + +// Sub returns the rectangle r translated by -p. +func (r Rectangle52_12) Sub(p Point52_12) Rectangle52_12 { + return Rectangle52_12{ + Point52_12{r.Min.X - p.X, r.Min.Y - p.Y}, + Point52_12{r.Max.X - p.X, r.Max.Y - p.Y}, + } +} + +// Intersect returns the largest rectangle contained by both r and s. If the +// two rectangles do not overlap then the zero rectangle will be returned. +func (r Rectangle52_12) Intersect(s Rectangle52_12) Rectangle52_12 { + if r.Min.X < s.Min.X { + r.Min.X = s.Min.X + } + if r.Min.Y < s.Min.Y { + r.Min.Y = s.Min.Y + } + if r.Max.X > s.Max.X { + r.Max.X = s.Max.X + } + if r.Max.Y > s.Max.Y { + r.Max.Y = s.Max.Y + } + // Letting r0 and s0 be the values of r and s at the time that the method + // is called, this next line is equivalent to: + // + // if max(r0.Min.X, s0.Min.X) >= min(r0.Max.X, s0.Max.X) || likewiseForY { etc } + if r.Empty() { + return Rectangle52_12{} + } + return r +} + +// Union returns the smallest rectangle that contains both r and s. +func (r Rectangle52_12) Union(s Rectangle52_12) Rectangle52_12 { + if r.Empty() { + return s + } + if s.Empty() { + return r + } + if r.Min.X > s.Min.X { + r.Min.X = s.Min.X + } + if r.Min.Y > s.Min.Y { + r.Min.Y = s.Min.Y + } + if r.Max.X < s.Max.X { + r.Max.X = s.Max.X + } + if r.Max.Y < s.Max.Y { + r.Max.Y = s.Max.Y + } + return r +} + +// Empty returns whether the rectangle contains no points. +func (r Rectangle52_12) Empty() bool { + return r.Min.X >= r.Max.X || r.Min.Y >= r.Max.Y +} + +// In returns whether every point in r is in s. +func (r Rectangle52_12) In(s Rectangle52_12) bool { + if r.Empty() { + return true + } + // Note that r.Max is an exclusive bound for r, so that r.In(s) + // does not require that r.Max.In(s). + return s.Min.X <= r.Min.X && r.Max.X <= s.Max.X && + s.Min.Y <= r.Min.Y && r.Max.Y <= s.Max.Y +}