├── go.mod ├── xml ├── README.md ├── overload │ └── gl.xml └── doc │ ├── glXGetCurrentContext.xml │ ├── glXGetCurrentDrawable.xml │ ├── glLoadPaletteFromModelViewMatrix.xml │ ├── glXGetCurrentDisplay.xml │ ├── glXGetCurrentReadDrawable.xml │ ├── glXGetProcAddress.xml │ ├── glReleaseShaderCompiler.xml │ ├── glFinish.xml │ ├── glXWaitX.xml │ ├── glXWaitGL.xml │ ├── glResetHistogram.xml │ ├── glBlendBarrier.xml │ ├── glXDestroyGLXPixmap.xml │ ├── glXIsDirect.xml │ ├── glListBase.xml │ ├── glXDestroyContext.xml │ ├── glInitNames.xml │ ├── glCurrentPaletteMatrix.xml │ ├── glTextureBarrier.xml │ ├── glResetMinmax.xml │ ├── glIsList.xml │ ├── glXGetContextIDEXT.xml │ ├── glPauseTransformFeedback.xml │ ├── glResumeTransformFeedback.xml │ ├── glIsSync.xml │ ├── glXDestroyWindow.xml │ ├── glXDestroyPbuffer.xml │ ├── glXDestroyPixmap.xml │ ├── glIsSampler.xml │ ├── glXQueryExtensionsString.xml │ ├── glIsVertexArray.xml │ ├── glIsFramebuffer.xml │ ├── glXQueryExtension.xml │ ├── glFlush.xml │ ├── glIsQuery.xml │ ├── glIsTransformFeedback.xml │ ├── glXGetFBConfigs.xml │ ├── glXFreeContextEXT.xml │ ├── glIsBuffer.xml │ ├── glIsProgramPipeline.xml │ ├── glXGetSelectedEvent.xml │ ├── glPopDebugGroup.xml │ ├── glXQueryVersion.xml │ ├── glIsRenderbuffer.xml │ ├── glClearAccum.xml │ ├── glLoadName.xml │ ├── glClearDepthf.xml │ ├── glGetFragDataLocation.xml │ ├── glDeleteVertexArrays.xml │ ├── glCreateVertexArrays.xml │ ├── glInvalidateBufferData.xml │ └── glXGetVisualFromFBConfig.xml ├── example.json ├── enums.go ├── .gitignore ├── go.sum ├── type_test.go ├── tmpl ├── debug.tmpl └── procaddr.tmpl ├── LICENSE ├── overload.go ├── version_test.go ├── functions.go ├── docs.go ├── version.go ├── spec_test.go ├── util.go ├── util_test.go └── README.md /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/go-gl/glow 2 | 3 | go 1.12 4 | 5 | require golang.org/x/tools v0.0.0-20190402200628-202502a5a924 6 | -------------------------------------------------------------------------------- /xml/README.md: -------------------------------------------------------------------------------- 1 | XML 2 | === 3 | 4 | This directory contains the XML specification and documentation files used to generate the Glow prebuilt packages. 5 | -------------------------------------------------------------------------------- /example.json: -------------------------------------------------------------------------------- 1 | { 2 | "Enums": [ 3 | "GL_CCW", 4 | "GL_COLOR_ATTACHMENT0", 5 | "GL_COMPRESSED_RGB" 6 | ], 7 | "Functions": [ 8 | "glBindTextures", 9 | "glBindVertexArray" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /enums.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | // An Enum represents an enumerated value. 4 | type Enum struct { 5 | Name string // Raw specification name 6 | GoName string // Go name with the API prefix stripped 7 | Value string // Raw specification value 8 | } 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.cgo1.go 12 | *.cgo2.c 13 | _cgo_defun.c 14 | _cgo_gotypes.go 15 | _cgo_export.* 16 | 17 | _testmain.go 18 | 19 | glow 20 | *.exe 21 | *.test 22 | 23 | # Temporary/output directories 24 | examples/test 25 | examples/cube/cube 26 | egl 27 | gles1 28 | gles2 29 | glx 30 | wgl 31 | 32 | # Vim 33 | *.swp 34 | *.swo 35 | 36 | # GoLand 37 | .idea/ 38 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 2 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 3 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 4 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 5 | golang.org/x/tools v0.0.0-20190402200628-202502a5a924 h1:XgD7l1aFq63td2d4omZwFUpt50/DxIpXW3yrk+V4EOc= 6 | golang.org/x/tools v0.0.0-20190402200628-202502a5a924/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 7 | -------------------------------------------------------------------------------- /type_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "testing" 4 | 5 | func TestGoType(t *testing.T) { 6 | tt := []struct { 7 | in Type 8 | expected string 9 | }{ 10 | { 11 | in: Type{ 12 | Name: "uintptr_t", 13 | PointerLevel: 1, 14 | CDefinition: "uintptr_t*", 15 | Cast: "void *", 16 | }, 17 | expected: "*uintptr", 18 | }, 19 | } 20 | 21 | for _, tc := range tt { 22 | tc := tc 23 | t.Run(tc.in.String(), func(t *testing.T) { 24 | goType := tc.in.GoType() 25 | if goType != tc.expected { 26 | t.Errorf("expected <%s>, got <%s>", tc.expected, goType) 27 | } 28 | }) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /tmpl/debug.tmpl: -------------------------------------------------------------------------------- 1 | //glow:keepspace 2 | // Code generated by glow (https://github.com/go-gl/glow). DO NOT EDIT. 3 | 4 | package {{.Name}} 5 | //glow:rmspace 6 | 7 | import "C" 8 | import "unsafe" 9 | 10 | type DebugProc func( 11 | source uint32, 12 | gltype uint32, 13 | id uint32, 14 | severity uint32, 15 | length int32, 16 | message string, 17 | userParam unsafe.Pointer) 18 | 19 | var userDebugCallback DebugProc 20 | 21 | //export glowDebugCallback_{{.UniqueName}} 22 | func glowDebugCallback_{{.UniqueName}}( 23 | source uint32, 24 | gltype uint32, 25 | id uint32, 26 | severity uint32, 27 | length int32, 28 | message *uint8, 29 | userParam unsafe.Pointer) { 30 | if userDebugCallback != nil { 31 | userDebugCallback(source, gltype, id, severity, length, GoStr(message), userParam) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Eric Woroshow 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /overload.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "encoding/xml" 5 | "os" 6 | ) 7 | 8 | type xmlOverloads struct { 9 | Overloads []xmlOverload `xml:"overload"` 10 | } 11 | 12 | type xmlOverload struct { 13 | Name string `xml:"name,attr"` 14 | OverloadName string `xml:"overloadName,attr"` 15 | 16 | ParameterChanges []xmlParameterChange `xml:"parameterChanges>change"` 17 | } 18 | 19 | type xmlParameterChange struct { 20 | // Index is the zero-based index of the parameter list. 21 | Index int `xml:"index,attr"` 22 | // Name describes a change of the parameter name. 23 | Name *xmlNameChange `xml:"name"` 24 | // Type describes a change of the parameter type. 25 | Type *xmlTypeChange `xml:"type"` 26 | } 27 | 28 | type xmlNameChange struct { 29 | Value string `xml:"value,attr"` 30 | } 31 | 32 | type xmlTypeChange struct { 33 | Signature string `xml:"signature,attr"` 34 | } 35 | 36 | func readOverloadFile(file string) (xmlOverloads, error) { 37 | var overloads xmlOverloads 38 | 39 | _, err := os.Stat(file) 40 | if err != nil { 41 | return overloads, nil 42 | } 43 | 44 | f, err := os.Open(file) 45 | if err != nil { 46 | return overloads, err 47 | } 48 | defer f.Close() 49 | 50 | err = xml.NewDecoder(f).Decode(&overloads) 51 | return overloads, err 52 | } 53 | -------------------------------------------------------------------------------- /version_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | type parseTest struct { 8 | In string 9 | Out Version 10 | Ok bool 11 | } 12 | 13 | var parseTests = []parseTest{ 14 | {"0.0", Version{0, 0}, true}, 15 | {"0.1", Version{0, 1}, true}, 16 | {"1.0", Version{1, 0}, true}, 17 | {"5.6", Version{5, 6}, true}, 18 | {"all", Version{-1, -1}, true}, 19 | {"0.", Version{0, 0}, false}, 20 | {"", Version{0, 0}, false}, 21 | {".", Version{0, 0}, false}, 22 | {"a", Version{0, 0}, false}, 23 | } 24 | 25 | func TestParse(t *testing.T) { 26 | for i := range parseTests { 27 | test := &parseTests[i] 28 | v, err := ParseVersion(test.In) 29 | if (err != nil) == test.Ok { 30 | t.Errorf("failed %v, %v", test, err) 31 | } 32 | if v.Compare(test.Out) != 0 { 33 | t.Errorf("input != output %v", test) 34 | } 35 | } 36 | } 37 | 38 | func TestCompare(t *testing.T) { 39 | v10 := Version{1, 0} 40 | v11 := Version{1, 1} 41 | vAll := Version{-1, -1} 42 | if v10.Compare(v11) > 0 { 43 | t.Errorf("1.0 >= 1.1") 44 | } 45 | if v11.Compare(v10) < 0 { 46 | t.Errorf("1.1 >= 1.0") 47 | } 48 | if v10.Compare(v10) != 0 { 49 | t.Errorf("1.0 != 1.0") 50 | } 51 | if vAll.Compare(v10) != 0 || v10.Compare(vAll) != 0 { 52 | t.Errorf("1.0 != all") 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /functions.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | // A Function definition. 6 | type Function struct { 7 | Name string // C name of the function 8 | GoName string // Go name of the function with the API prefix stripped 9 | Parameters []Parameter 10 | Return Type 11 | Overloads []Overload 12 | } 13 | 14 | // An Overload describes an alternative signature for the same function. 15 | type Overload struct { 16 | GoName string // Go name of the original function 17 | OverloadName string // Go name of the overload 18 | Parameters []Parameter 19 | Return Type 20 | } 21 | 22 | // A Parameter to a Function. 23 | type Parameter struct { 24 | Name string 25 | Type Type 26 | } 27 | 28 | // CName returns a C-safe parameter name. 29 | func (p Parameter) CName() string { 30 | return renameIfReservedCWord(p.Name) 31 | } 32 | 33 | // GoName returns a Go-safe parameter name. 34 | func (p Parameter) GoName() string { 35 | return renameIfReservedGoWord(p.Name) 36 | } 37 | 38 | func renameIfReservedCWord(word string) string { 39 | switch word { 40 | case "near", "far": 41 | return fmt.Sprintf("x%s", word) 42 | } 43 | return word 44 | } 45 | 46 | func renameIfReservedGoWord(word string) string { 47 | switch word { 48 | case "func", "type", "struct", "range", "map", "string": 49 | return fmt.Sprintf("x%s", word) 50 | } 51 | return word 52 | } 53 | -------------------------------------------------------------------------------- /docs.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "encoding/xml" 5 | "os" 6 | "strings" 7 | ) 8 | 9 | type xmlDoc struct { 10 | Purpose string `xml:"refnamediv>refpurpose"` 11 | Names []string `xml:"refnamediv>refname"` 12 | } 13 | 14 | // Documentation is a map from function name to documentation string. 15 | type Documentation map[string]string 16 | 17 | func readDocFile(file string) (*xmlDoc, error) { 18 | var xmlDoc xmlDoc 19 | 20 | f, err := os.Open(file) 21 | if err != nil { 22 | return nil, err 23 | } 24 | defer f.Close() 25 | 26 | decoder := xml.NewDecoder(f) 27 | decoder.Strict = false 28 | 29 | err = decoder.Decode(&xmlDoc) 30 | if err != nil { 31 | return nil, err 32 | } 33 | 34 | return &xmlDoc, nil 35 | } 36 | 37 | // AddDocs adds function documentation to the specified package. 38 | func (d Documentation) AddDocs(pkg *Package) { 39 | for _, fn := range pkg.Functions { 40 | doc, ok := d[fn.Name] 41 | if ok { 42 | // Let the template handle line-wrapping if it chooses 43 | fn.Doc = strings.Replace(doc, "\n", " ", -1) 44 | } 45 | } 46 | } 47 | 48 | // NewDocumentation parses XML documentation files. 49 | func NewDocumentation(files []string) (Documentation, error) { 50 | documentation := make(Documentation) 51 | for _, file := range files { 52 | xmlDoc, err := readDocFile(file) 53 | if err != nil { 54 | return nil, err 55 | } 56 | for _, name := range xmlDoc.Names { 57 | documentation[name] = xmlDoc.Purpose 58 | } 59 | } 60 | return documentation, nil 61 | } 62 | -------------------------------------------------------------------------------- /version.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "strconv" 6 | "strings" 7 | ) 8 | 9 | // A Version wraps a major and minor integer version pair. 10 | type Version struct { 11 | Major int 12 | Minor int 13 | } 14 | 15 | // ParseVersion returns a Version from a "major.minor" or "all" version string. 16 | func ParseVersion(version string) (Version, error) { 17 | if version == "all" { 18 | return Version{-1, -1}, nil 19 | } 20 | 21 | split := strings.Split(version, ".") 22 | if len(split) != 2 { 23 | return Version{0, 0}, fmt.Errorf("invalid version string: %s", version) 24 | } 25 | majorNumber, err := strconv.Atoi(split[0]) 26 | if err != nil { 27 | return Version{0, 0}, fmt.Errorf("invalid major version number: %s", split[0]) 28 | } 29 | minorNumber, err := strconv.Atoi(split[1]) 30 | if err != nil { 31 | return Version{0, 0}, fmt.Errorf("invalid minor version number: %s", split[1]) 32 | } 33 | return Version{majorNumber, minorNumber}, nil 34 | } 35 | 36 | // Compare compares two versions, returning 1, 0, or -1 if the compared version 37 | // is before, after, or equal to this version respectively. The "all versions" 38 | // pseudo-version is equal to all other versions. 39 | func (v Version) Compare(v2 Version) int { 40 | if v.IsAll() || v2.IsAll() { 41 | return 0 42 | } 43 | if v.Major < v2.Major { 44 | return -1 45 | } else if v.Major > v2.Major { 46 | return 1 47 | } else if v.Minor < v2.Minor { 48 | return -1 49 | } else if v.Minor > v2.Minor { 50 | return 1 51 | } 52 | return 0 53 | } 54 | 55 | // IsAll returns true if this version is the "all versions" pseudo-version. 56 | func (v Version) IsAll() bool { 57 | return v.Major < 0 58 | } 59 | 60 | func (v Version) String() string { 61 | if v.IsAll() { 62 | return "all" 63 | } 64 | return fmt.Sprintf("%d.%d", v.Major, v.Minor) 65 | } 66 | -------------------------------------------------------------------------------- /xml/overload/gl.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /spec_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "testing" 4 | 5 | func TestParseSignature(t *testing.T) { 6 | tt := []struct { 7 | input string 8 | expectedName string 9 | expectedType Type 10 | }{ 11 | { 12 | input: "const void *pointer", 13 | expectedName: "pointer", 14 | expectedType: Type{ 15 | Name: "void", 16 | PointerLevel: 1, 17 | CDefinition: "const void *", 18 | }, 19 | }, 20 | { 21 | input: "GLsizei stride", 22 | expectedName: "stride", 23 | expectedType: Type{ 24 | Name: "GLsizei", 25 | PointerLevel: 0, 26 | CDefinition: "GLsizei ", 27 | }, 28 | }, 29 | { 30 | input: "const GLuint *value", 31 | expectedName: "value", 32 | expectedType: Type{ 33 | Name: "GLuint", 34 | PointerLevel: 1, 35 | CDefinition: "const GLuint *", 36 | }, 37 | }, 38 | { 39 | input: "GLuint baseAndCount[2]", 40 | expectedName: "baseAndCount", 41 | expectedType: Type{ 42 | Name: "GLuint", 43 | PointerLevel: 1, 44 | CDefinition: "GLuint *", 45 | }, 46 | }, 47 | { 48 | input: "uintptr_t **", 49 | expectedName: "", 50 | expectedType: Type{ 51 | Name: "uintptr_t", 52 | PointerLevel: 2, 53 | CDefinition: "uintptr_t **", 54 | }, 55 | }, 56 | } 57 | 58 | for _, tc := range tt { 59 | tc := tc 60 | t.Run(tc.input, func(t *testing.T) { 61 | name, ctype, err := parseSignature(xmlSignature(tc.input)) 62 | failed := false 63 | if err != nil { 64 | t.Logf("parseSignature returned error: %v", err) 65 | failed = true 66 | } 67 | if name != tc.expectedName { 68 | t.Logf("name [%s] does not match expected [%s]", name, tc.expectedName) 69 | failed = true 70 | } 71 | if ctype != tc.expectedType { 72 | t.Logf("type [%v] does not match expected [%v]", ctype, tc.expectedType) 73 | failed = true 74 | } 75 | if failed { 76 | t.Fail() 77 | } 78 | }) 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /xml/doc/glXGetCurrentContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glXGetCurrentContext 13 | 3G 14 | 15 | 16 | glXGetCurrentContext 17 | return the current context 18 | 19 | C Specification 20 | 21 | 22 | GLXContext glXGetCurrentContext 23 | 24 | 25 | 26 | 27 | 28 | Description 29 | 30 | glXGetCurrentContext returns the current context, 31 | as specified by glXMakeCurrent. 32 | If there is no current context, 33 | NULL is returned. 34 | 35 | 36 | glXGetCurrentContext returns client-side information. 37 | It does not make a round trip to the server. 38 | 39 | 40 | 41 | 42 | See Also 43 | 44 | glXCreateContext, 45 | glXGetCurrentDisplay, 46 | glXGetCurrentDrawable, 47 | glXMakeCurrent 48 | 49 | 50 | Copyright 51 | 52 | Copyright 1991-2006 53 | Silicon Graphics, Inc. This document is licensed under the SGI 54 | Free Software B License. For details, see 55 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /tmpl/procaddr.tmpl: -------------------------------------------------------------------------------- 1 | //glow:keepspace 2 | // Code generated by glow (https://github.com/go-gl/glow). DO NOT EDIT. 3 | 4 | // This file implements GlowGetProcAddress for every supported platform. The 5 | // correct version is chosen automatically based on build tags: 6 | // 7 | // windows: WGL 8 | // darwin: CGL 9 | // linux freebsd netbsd openbsd: GLX 10 | // 11 | // Use of EGL instead of the platform's default (listed above) is made possible 12 | // via the "egl" build tag. 13 | // 14 | // It is also possible to install your own function outside this package for 15 | // retrieving OpenGL function pointers, to do this see InitWithProcAddrFunc. 16 | 17 | package {{.Name}} 18 | //glow:rmspace 19 | 20 | /* 21 | #cgo windows CFLAGS: -DTAG_WINDOWS 22 | #cgo !gles2,windows LDFLAGS: -lopengl32 23 | #cgo gles2,windows LDFLAGS: -lGLESv2 24 | 25 | #cgo darwin CFLAGS: -DTAG_DARWIN 26 | #cgo !gles2,darwin LDFLAGS: -framework OpenGL 27 | #cgo gles2,darwin LDFLAGS: -framework OpenGLES 28 | 29 | #cgo linux freebsd netbsd openbsd CFLAGS: -DTAG_POSIX 30 | #cgo !egl,linux !egl,freebsd !egl,netbsd !egl,openbsd pkg-config: gl 31 | 32 | #cgo egl,linux egl,freebsd egl,netbsd egl,openbsd egl,windows CFLAGS: -DTAG_EGL 33 | #cgo egl,linux egl,freebsd egl,netbsd egl,openbsd pkg-config: egl 34 | #cgo egl,windows LDFLAGS: -lEGL 35 | #cgo egl,darwin LDFLAGS: -lEGL 36 | 37 | 38 | // Check the EGL tag first as it takes priority over the platform's default 39 | // configuration of WGL/GLX/CGL. 40 | #if defined(TAG_EGL) 41 | 42 | #include 43 | #include 44 | static void* GlowGetProcAddress(const char* name) { 45 | return eglGetProcAddress(name); 46 | } 47 | 48 | #elif defined(TAG_WINDOWS) 49 | 50 | #define WIN32_LEAN_AND_MEAN 1 51 | #include 52 | #include 53 | static HMODULE ogl32dll = NULL; 54 | static void* GlowGetProcAddress(const char* name) { 55 | void* pf = wglGetProcAddress((LPCSTR) name); 56 | if (pf) { 57 | return pf; 58 | } 59 | if (ogl32dll == NULL) { 60 | ogl32dll = LoadLibraryA("opengl32.dll"); 61 | } 62 | return GetProcAddress(ogl32dll, (LPCSTR) name); 63 | } 64 | 65 | #elif defined(TAG_DARWIN) 66 | 67 | #include 68 | #include 69 | static void* GlowGetProcAddress(const char* name) { 70 | return dlsym(RTLD_DEFAULT, name); 71 | } 72 | 73 | #elif defined(TAG_POSIX) 74 | 75 | #include 76 | #include 77 | static void* GlowGetProcAddress(const char* name) { 78 | return glXGetProcAddress((const GLubyte *) name); 79 | } 80 | 81 | #endif 82 | */ 83 | import "C" 84 | 85 | import "unsafe" 86 | 87 | func getProcAddress(namea string) unsafe.Pointer { 88 | cname := C.CString(namea) 89 | defer C.free(unsafe.Pointer(cname)) 90 | return C.GlowGetProcAddress(cname) 91 | } 92 | -------------------------------------------------------------------------------- /xml/doc/glXGetCurrentDrawable.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glXGetCurrentDrawable 13 | 3G 14 | 15 | 16 | glXGetCurrentDrawable 17 | return the current drawable 18 | 19 | C Specification 20 | 21 | 22 | GLXDrawable glXGetCurrentDrawable 23 | 24 | 25 | 26 | Description 27 | 28 | glXGetCurrentDrawable returns the current drawable, 29 | as specified by glXMakeCurrent. 30 | If there is no current drawable, 31 | None is returned. 32 | 33 | 34 | glXGetCurrentDrawable returns client-side information. 35 | It does not make a round trip to the server. 36 | 37 | 38 | See Also 39 | 40 | glXCreateGLXPixmap, 41 | glXGetCurrentContext, 42 | glXGetCurrentDisplay, 43 | glXGetCurrentReadDrawable, 44 | glXMakeCurrent 45 | 46 | 47 | Copyright 48 | 49 | Copyright 1991-2006 50 | Silicon Graphics, Inc. This document is licensed under the SGI 51 | Free Software B License. For details, see 52 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /xml/doc/glLoadPaletteFromModelViewMatrix.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 2003-2004 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glLoadPaletteFromModelViewMatrix 13 | 3G 14 | 15 | 16 | 17 | glLoadPaletteFromModelViewMatrix 18 | glLoadPaletteFromModelViewMatrixOES 19 | 20 | copies the current model view matrix to a 21 | matrix in the current matrix palette 22 | 23 | 24 | 25 | 26 | C Specification 27 | 28 | 29 | 30 | void glLoadPaletteFromModelViewMatrixOES 31 | 32 | 33 | 34 | 35 | 36 | Description 37 | 38 | 39 | glLoadPaletteFromModelViewMatrixOES 40 | copies the current model view matrix to a 41 | matrix in the current matrix palette, as specified by 42 | glCurrentPaletteMatrix. 43 | 44 | 45 | 46 | 47 | See Also 48 | 49 | 50 | glCurrentPaletteMatrix, 51 | glMatrixIndexPointer, 52 | glMatrixMode, 53 | glWeightPointer 54 | 55 | 56 | Copyright 57 | 58 | Copyright 2003-2004 59 | Silicon Graphics, Inc. This document is licensed under the SGI 60 | Free Software B License. For details, see 61 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /xml/doc/glXGetCurrentDisplay.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glXGetCurrentDisplay 13 | 3G 14 | 15 | 16 | glXGetCurrentDisplay 17 | get display for current context 18 | 19 | C Specification 20 | 21 | 22 | Display * glXGetCurrentDisplay 23 | 24 | 25 | 26 | 27 | Description 28 | 29 | glXGetCurrentDisplay returns the display for the current context. If no 30 | context is current, NULL is returned. 31 | 32 | 33 | glXGetCurrentDisplay returns client-side information. It does not make a round-trip 34 | to the server, and therefore does not flush any pending events. 35 | 36 | 37 | Notes 38 | 39 | glXGetCurrentDisplay is only supported if the GLX version is 1.2 or greater. 40 | 41 | 42 | See Also 43 | 44 | glXGetCurrentContext, 45 | glXGetCurrentDrawable, 46 | glXQueryVersion, 47 | glXQueryExtensionsString 48 | 49 | 50 | Copyright 51 | 52 | Copyright 1991-2006 53 | Silicon Graphics, Inc. This document is licensed under the SGI 54 | Free Software B License. For details, see 55 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /xml/doc/glXGetCurrentReadDrawable.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glXGetCurrentReadDrawable 13 | 3G 14 | 15 | 16 | glXGetCurrentReadDrawable 17 | return the current drawable 18 | 19 | C Specification 20 | 21 | 22 | GLXDrawable glXGetCurrentReadDrawable 23 | 24 | 25 | 26 | Description 27 | 28 | glXGetCurrentReadDrawable returns the current read drawable, 29 | as specified by read parameter 30 | of glXMakeContextCurrent. 31 | If there is no current drawable, 32 | None is returned. 33 | 34 | 35 | glXGetCurrentReadDrawable returns client-side information. 36 | It does not make a round-trip to the server. 37 | 38 | 39 | Notes 40 | 41 | glXGetCurrentReadDrawable is only supported if the GLX version is 1.3 or greater. 42 | 43 | 44 | See Also 45 | 46 | glXGetCurrentContext, 47 | glXGetCurrentDisplay, 48 | glXGetCurrentDrawable, 49 | glXMakeContextCurrent 50 | 51 | 52 | Copyright 53 | 54 | Copyright 1991-2006 55 | Silicon Graphics, Inc. This document is licensed under the SGI 56 | Free Software B License. For details, see 57 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /xml/doc/glXGetProcAddress.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glXGetProcAddress 13 | 3G 14 | 15 | 16 | glXGetProcAddress 17 | obtain a pointer to an OpenGL or GLX function 18 | 19 | C Specification 20 | 21 | 22 | void(*)() glXGetProcAddress 23 | const GLubyte * procName 24 | 25 | 26 | 27 | 28 | Parameters 29 | 30 | 31 | procName 32 | 33 | 34 | Specifies the name of the OpenGL or GLX function whose address is to be returned. 35 | 36 | 37 | 38 | 39 | 40 | Description 41 | 42 | glXGetProcAddress returns the address of the function specified in procName. This is 43 | necessary in environments where the OpenGL link library exports a different 44 | set of functions than the runtime library. 45 | 46 | 47 | Notes 48 | 49 | A NULL pointer is returned if function requested is not suported 50 | in the implementation being queried. 51 | 52 | 53 | GLU functions are not queryable due to the fact that the library may not be 54 | loaded at the time of the query. 55 | 56 | 57 | Copyright 58 | 59 | Copyright 1991-2006 60 | Silicon Graphics, Inc. This document is licensed under the SGI 61 | Free Software B License. For details, see 62 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /util.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "bytes" 5 | "io" 6 | "strings" 7 | "unicode" 8 | ) 9 | 10 | // TrimAPIPrefix removes the API-specific prefix from a spec name. 11 | // e.g., glTest becomes Test; GLX_TEST becomes TEST; egl0Test stays egl0Test 12 | func TrimAPIPrefix(name string) string { 13 | prefixes := []string{"glX", "wgl", "egl", "gl", "GLX_", "WGL_", "EGL_", "GL_"} 14 | 15 | trimmed := name 16 | prefix := "" 17 | for _, p := range prefixes { 18 | if strings.HasPrefix(name, p) { 19 | trimmed = strings.TrimPrefix(name, p) 20 | prefix = p 21 | break 22 | } 23 | } 24 | 25 | if strings.IndexAny(trimmed, "0123456789") == 0 { 26 | return prefix + trimmed 27 | } 28 | return trimmed 29 | } 30 | 31 | // BlankLineStrippingWriter removes whitespace- or comment-only lines delimited 32 | // by \n. A necessary evil to work around how text/template handles whitespace. 33 | // The template needs a new line at the end. 34 | // 35 | // Comment-based annotations are accepted to define sections of code that 36 | // should have their blank lines kept intact, like so: 37 | // 38 | // // 39 | // //glow:keepspace 40 | // // 41 | // // Hello World! 42 | // // 43 | // //glow:rmspace 44 | // // 45 | // 46 | // The writer would produce output like: 47 | // // 48 | // // Hello World! 49 | // // 50 | // 51 | type BlankLineStrippingWriter struct { 52 | output io.Writer 53 | buf *bytes.Buffer 54 | stripping bool 55 | } 56 | 57 | // NewBlankLineStrippingWriter creates a new BlankLineStrippingWriter. 58 | func NewBlankLineStrippingWriter(wrapped io.Writer) *BlankLineStrippingWriter { 59 | return &BlankLineStrippingWriter{ 60 | output: wrapped, 61 | buf: new(bytes.Buffer), 62 | stripping: true, 63 | } 64 | } 65 | 66 | func isBlank(line string) bool { 67 | blank := true 68 | for _, ch := range line { 69 | if !unicode.IsSpace(ch) && ch != '/' { 70 | blank = false 71 | break 72 | } 73 | } 74 | return blank 75 | } 76 | 77 | // Write appends the contents of p to the BlankLineStrippingWriter. 78 | // The return values are the length of p and the error of the underlaying io.Writer. 79 | func (w *BlankLineStrippingWriter) Write(p []byte) (int, error) { 80 | // Buffer the current write. 81 | // Error is always nil. 82 | w.buf.Write(p) 83 | n := len(p) 84 | for { 85 | line, err := w.buf.ReadString('\n') 86 | if err != nil { 87 | // Did not have a whole line to read, rebuffer the unconsumed data. 88 | // Error is always nil. 89 | w.buf.Write([]byte(line)) 90 | return n, nil 91 | } 92 | 93 | // Enable/disable blank line stripping based on comment-based 94 | // annotations. 95 | cleanLine := strings.TrimSpace(line) 96 | if cleanLine == "//glow:keepspace" { 97 | w.stripping = false 98 | continue 99 | } else if cleanLine == "//glow:rmspace" { 100 | w.stripping = true 101 | continue 102 | } 103 | 104 | // Write non-empty lines from the buffer. 105 | if !w.stripping || !isBlank(line) { 106 | if _, err := w.output.Write([]byte(line)); err != nil { 107 | return n, err 108 | } 109 | } 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /xml/doc/glReleaseShaderCompiler.xml: -------------------------------------------------------------------------------- 1 | %mathent; ]> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 2010-2014 9 | Khronos Group 10 | 11 | 12 | 13 | glReleaseShaderCompiler 14 | 3G 15 | 16 | 17 | glReleaseShaderCompiler 18 | release resources consumed by the implementation's shader compiler 19 | 20 | C Specification 21 | 22 | 23 | void glReleaseShaderCompiler 24 | void 25 | 26 | 27 | 28 | Description 29 | 30 | glReleaseShaderCompiler provides a hint to the implementation that it 31 | may free internal resources associated with its shader compiler. glCompileShader 32 | may subsequently be called and the implementation may at that time reallocate resources 33 | previously freed by the call to glReleaseShaderCompiler. 34 | 35 | 36 | Version Support 37 | 38 | 39 | 40 | 41 | 42 | glReleaseShaderCompiler 43 | 44 | 45 | 46 | 47 | 48 | 49 | See Also 50 | 51 | glCompileShader, 52 | glLinkProgram 53 | 54 | 55 | Copyright 56 | 57 | Copyright 2010-2014 Khronos Group. 58 | This material may be distributed subject to the terms and conditions set forth in 59 | the Open Publication License, v 1.0, 8 June 1999. 60 | http://opencontent.org/openpub/. 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /util_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "bytes" 5 | "io/ioutil" 6 | "testing" 7 | ) 8 | 9 | type trimAPIPrefixTest struct { 10 | in string 11 | expected string 12 | } 13 | 14 | var trimAPIPrefixTests = []trimAPIPrefixTest{ 15 | {"glTest", "Test"}, 16 | {"wglTest", "Test"}, 17 | {"eglTest", "Test"}, 18 | {"glXTest", "Test"}, 19 | {"GL_TEST", "TEST"}, 20 | {"WGL_TEST", "TEST"}, 21 | {"EGL_TEST", "TEST"}, 22 | {"GLX_TEST", "TEST"}, 23 | {"GL_0TEST", "GL_0TEST"}, 24 | {"gl0Test", "gl0Test"}, 25 | } 26 | 27 | func TestTrimApiPrefix(t *testing.T) { 28 | for _, test := range trimAPIPrefixTests { 29 | trimmed := TrimAPIPrefix(test.in) 30 | if trimmed != test.expected { 31 | t.Errorf("TrimAPIPrefix(%s) failed: %s != %s", test.in, test.expected, trimmed) 32 | } 33 | } 34 | } 35 | 36 | type ByteSliceTest struct { 37 | in []byte 38 | expected []byte 39 | } 40 | 41 | // The string needs a new line at the end. 42 | var BlankLineTests = []ByteSliceTest{ 43 | {nil, []byte("")}, 44 | {[]byte(""), []byte("")}, 45 | {[]byte("ä"), []byte("")}, 46 | {[]byte("\n"), []byte("")}, 47 | {[]byte("a\n"), []byte("a\n")}, 48 | {[]byte("ä\n\n\n"), []byte("ä\n")}, 49 | {[]byte("\nä\n\n"), []byte("ä\n")}, 50 | {[]byte("\n\nä\n"), []byte("ä\n")}, 51 | {[]byte("\n\n\nä"), []byte("")}, 52 | {[]byte("\n//glow:keepspace\n\nä\n\n//glow:rmspace\n\n"), []byte("\nä\n\n")}, 53 | } 54 | 55 | func TestBlankLineStrippingWriter(t *testing.T) { 56 | for n, test := range BlankLineTests { 57 | var out bytes.Buffer 58 | //w := &out 59 | w := NewBlankLineStrippingWriter(&out) 60 | l, err := w.Write(test.in) 61 | if err != nil { 62 | t.Errorf("BlankLineStrippingWriter[%d](%v): %s", n, test.in, err) 63 | } 64 | if l != len(test.in) { 65 | t.Errorf("BlankLineStrippingWriter[%d]:lenght: got %d, want %d", n, l, len(test.in)) 66 | } 67 | b, err := ioutil.ReadAll(&out) 68 | if err != nil { 69 | t.Errorf("BlankLineStrippingWriter[%d](%v): %s", n, test.in, err) 70 | } 71 | if !bytes.Equal(b, test.expected) { 72 | t.Errorf("BlankLineStrippingWriter[%d](%v): got '%v', want '%v'", 73 | n, test.in, b, test.expected) 74 | } 75 | } 76 | } 77 | 78 | func TestBlankLineStrippingWriter2(t *testing.T) { 79 | const repeat = 20 80 | var out bytes.Buffer 81 | w := NewBlankLineStrippingWriter(&out) 82 | in := []byte(`Lorem ipsum dolor sit amet, 83 | consectetur adipiscing elit. 84 | 85 | 86 | Mauris aliquam metus id sagittis scelerisque. `) 87 | 88 | want := bytes.Repeat([]byte(`Lorem ipsum dolor sit amet, 89 | consectetur adipiscing elit. 90 | Mauris aliquam metus id sagittis scelerisque. `), repeat) 91 | want = append(want, '\n') 92 | 93 | for i := 0; i < repeat; i++ { 94 | if _, err := w.Write(in); err != nil { 95 | t.Errorf("BlankLineStrippingWriter2: %s", err) 96 | } 97 | } 98 | if _, err := w.Write([]byte("\n")); err != nil { 99 | t.Errorf("BlankLineStrippingWriter2: %s", err) 100 | } 101 | b, err := ioutil.ReadAll(&out) 102 | if err != nil { 103 | t.Errorf("BlankLineStrippingWriter2: %s", err) 104 | } 105 | if !bytes.Equal(b, want) { 106 | t.Errorf("BlankLineStrippingWriter2: got\n'%s'...\nwant\n'%s'...\n", 107 | string(b[:50]), string(want[:50])) 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /xml/doc/glFinish.xml: -------------------------------------------------------------------------------- 1 | %mathent; ]> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | 2010-2014 13 | Khronos Group 14 | 15 | 16 | 17 | glFinish 18 | 3G 19 | 20 | 21 | glFinish 22 | block until all GL execution is complete 23 | 24 | C Specification 25 | 26 | 27 | void glFinish 28 | void 29 | 30 | 31 | 32 | Description 33 | 34 | glFinish does not return until the effects of all previously 35 | called GL commands are complete. 36 | Such effects include all changes to GL state, 37 | all changes to connection state, 38 | and all changes to the frame buffer contents. 39 | 40 | 41 | Notes 42 | 43 | glFinish requires a round trip to the server. 44 | 45 | 46 | Version Support 47 | 48 | 49 | 50 | 51 | 52 | glFinish 53 | 54 | 55 | 56 | 57 | 58 | 59 | See Also 60 | 61 | glFlush 62 | 63 | 64 | Copyright 65 | 66 | Copyright 1991-2006 Silicon Graphics, Inc. 67 | Copyright 2010-2014 Khronos Group. 68 | This document is licensed under the SGI Free Software B License. 69 | For details, see 70 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /xml/doc/glXWaitX.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glXWaitX 13 | 3G 14 | 15 | 16 | glXWaitX 17 | complete X execution prior to subsequent GL calls 18 | 19 | C Specification 20 | 21 | 22 | void glXWaitX 23 | void 24 | 25 | 26 | 27 | 28 | Description 29 | 30 | X rendering calls made prior to glXWaitX are guaranteed to be 31 | executed before GL rendering calls made after glXWaitX. 32 | Although the same result can be achieved using XSync, 33 | glXWaitX does not require a round trip to the server, 34 | and it is therefore more efficient in cases where client and server 35 | are on separate machines. 36 | 37 | 38 | glXWaitX is ignored if there is no current GLX context. 39 | 40 | 41 | Notes 42 | 43 | glXWaitX may or may not flush the GL stream. 44 | 45 | 46 | Errors 47 | 48 | GLXBadCurrentWindow is generated if the drawable associated 49 | with the current context of the calling thread is a window, and that 50 | window is no longer valid. 51 | 52 | 53 | See Also 54 | 55 | glFinish, 56 | glFlush, 57 | glXWaitGL, 58 | XSync 59 | 60 | 61 | Copyright 62 | 63 | Copyright 1991-2006 64 | Silicon Graphics, Inc. This document is licensed under the SGI 65 | Free Software B License. For details, see 66 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /xml/doc/glXWaitGL.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glXWaitGL 13 | 3G 14 | 15 | 16 | glXWaitGL 17 | complete GL execution prior to subsequent X calls 18 | 19 | C Specification 20 | 21 | 22 | void glXWaitGL 23 | void 24 | 25 | 26 | 27 | 28 | Description 29 | 30 | GL rendering calls made prior to glXWaitGL are guaranteed to be 31 | executed before X rendering calls made after glXWaitGL. 32 | Although this same result can be achieved using glFinish, 33 | glXWaitGL does not require a round trip to the server, 34 | and it is therefore more efficient in cases where client and server 35 | are on separate machines. 36 | 37 | 38 | glXWaitGL is ignored if there is no current GLX context. 39 | 40 | 41 | Notes 42 | 43 | glXWaitGL may or may not flush the X stream. 44 | 45 | 46 | Errors 47 | 48 | GLXBadCurrentWindow is generated if the drawable associated 49 | with the current context of the calling thread is a window, and that 50 | window is no longer valid. 51 | 52 | 53 | See Also 54 | 55 | glFinish, 56 | glFlush, 57 | glXWaitX, 58 | XSync 59 | 60 | 61 | Copyright 62 | 63 | Copyright 1991-2006 64 | Silicon Graphics, Inc. This document is licensed under the SGI 65 | Free Software B License. For details, see 66 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /xml/doc/glResetHistogram.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glResetHistogram 13 | 3G 14 | 15 | 16 | glResetHistogram 17 | reset histogram table entries to zero 18 | 19 | C Specification 20 | 21 | 22 | void glResetHistogram 23 | GLenum target 24 | 25 | 26 | 27 | Parameters 28 | 29 | 30 | target 31 | 32 | 33 | Must be 34 | GL_HISTOGRAM. 35 | 36 | 37 | 38 | 39 | 40 | Description 41 | 42 | glResetHistogram resets all the elements of the current histogram table to zero. 43 | 44 | 45 | Notes 46 | 47 | glResetHistogram is present only if ARB_imaging is returned when glGetString 48 | is called with an argument of GL_EXTENSIONS. 49 | 50 | 51 | Errors 52 | 53 | GL_INVALID_ENUM is generated if target is not GL_HISTOGRAM. 54 | 55 | 56 | GL_INVALID_OPERATION is generated if glResetHistogram is executed 57 | between the execution of glBegin and the corresponding 58 | execution of glEnd. 59 | 60 | 61 | See Also 62 | 63 | glHistogram 64 | 65 | 66 | Copyright 67 | 68 | Copyright 1991-2006 69 | Silicon Graphics, Inc. This document is licensed under the SGI 70 | Free Software B License. For details, see 71 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /xml/doc/glBlendBarrier.xml: -------------------------------------------------------------------------------- 1 | %mathent; ]> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 2015 9 | Khronos Group 10 | 11 | 12 | 13 | glBlendBarrier 14 | 3G 15 | 16 | 17 | glBlendBarrier 18 | specifies a boundary between advanced blending passes 19 | 20 | 21 | C Specification 22 | 23 | 24 | void glBlendBarrier 25 | void 26 | 27 | 28 | 29 | Description 30 | 31 | glBlendBarrier specifies a boundary between passes when using advanced blend equations. 32 | Any command that causes the value of a sample to be modified using the 33 | framebuffer is considered to touch the sample, including clears, blended 34 | or unblended primitives, and BlitFramebuffer copies. Defined results are guaranteed only if each sample 35 | is touched no more than once in any single rendering pass. 36 | 37 | 38 | Associated Gets 39 | 40 | glGet with an argument of GL_BLEND_EQUATION_RGB 41 | 42 | 43 | 44 | API Version Support 45 | 46 | 47 | 48 | 49 | 50 | glBlendBarrier 51 | 52 | 53 | 54 | 55 | 56 | 57 | See Also 58 | 59 | glBlendEquation, 60 | glBlendEquationi, 61 | glGet 62 | 63 | 64 | Copyright 65 | 66 | Copyright 2015 Khronos Group. 67 | This document is licensed under the SGI Free Software B License. 68 | For details, see 69 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Glow 2 | 3 | Glow is an OpenGL binding generator for Go. Glow parses the [OpenGL XML API registry](https://github.com/KhronosGroup/OpenGL-Registry/tree/master/xml) and the [EGL XML API registry](https://github.com/KhronosGroup/EGL-Registry/tree/master/api) to produce a machine-generated cgo bridge between Go functions and native OpenGL functions. Glow is a fork of [GoGL2](https://github.com/chsc/gogl2). 4 | 5 | Features: 6 | 7 | - Go functions that mirror the C specification using Go types. 8 | - Support for multiple OpenGL APIs (GL/GLES/EGL/WGL/GLX/EGL), versions, and profiles. 9 | - Support for extensions (including debug callbacks). 10 | - Support for overloads to provide Go functions with different parameter signatures. 11 | 12 | See the [open issues](https://github.com/go-gl/glow/issues) for caveats about the current state of the implementation. 13 | 14 | ## Generated Packages 15 | 16 | Generated OpenGL binding packages are available in the [go-gl/gl](https://github.com/go-gl/gl) repository. 17 | 18 | ## Overloads 19 | 20 | See subdirectory `xml/overload` for examples. The motivation here is to provide Go functions with different parameter signatures of existing OpenGL functions. 21 | 22 | For example, `glVertexAttribPointer(..., void *)` cannot be used with `gl.VertexAttribPointer(..., unsafe.Pointer)` when using arbitrary offset values. The `checkptr` safeguard will abort the program when doing so. 23 | Overloads allow the creation of an additional `gl.VertexAttribPointerWithOffset(..., uintptr)`, which calls the original OpenGL function with appropriate casts. 24 | 25 | ## Custom Packages 26 | 27 | If the prebuilt, go-gettable packages are not suitable for your needs you can build your own. For example, 28 | 29 | go get github.com/go-gl/glow 30 | cd $GOPATH/src/github.com/go-gl/glow 31 | go build 32 | ./glow download 33 | ./glow generate -api=gl -version=3.3 -profile=core -remext=GL_ARB_cl_event 34 | go install ./gl-core/3.3/gl 35 | 36 | **NOTE:** You will have to provide a GitHub token ([personal access or OAuth2 token](https://developer.github.com/v3/auth/#basic-authentication)) to update the XML specification files. 37 | 38 | A few notes about the flags to `generate`: 39 | 40 | - `api`: One of `gl`, `gles1`, `gles2`, `egl`, `wgl`, or `glx`. 41 | - `version`: The API version to generate. The `all` pseudo-version includes all functions and enumerations for the specified API. 42 | - `profile`: For `gl` packages with version 3.2 or higher, `core` or `compatibility` ([explanation](http://www.opengl.org/wiki/Core_And_Compatibility_in_Contexts)). 43 | - `xml`: The XML directory. 44 | - `tmpl`: The template directory. 45 | - `out`: The output directory for generated files. 46 | - `addext`: If non-empty, a regular expression describing which extensions to include _in addition_ to those supported by the selected profile. Empty by default, including nothing additional. Takes precedence over explicit removal. 47 | - `remext`: If non-empty, a regular expression describing which extensions to exclude. Empty by default, excluding nothing. 48 | - `restrict`: A JSON file that explicitly lists what enumerations / functions that Glow should generate (see example.json). 49 | - `lenientInit`: Flag to disable strict function availability checks at `Init` time. By default if any non-extension function pointer cannot be loaded then initialization fails; when this flag is set initialization will succeed with missing functions. Note that on some platforms unavailable functions will load successfully even but fail upon invocation so check against the OpenGL context what is supported. 50 | -------------------------------------------------------------------------------- /xml/doc/glXDestroyGLXPixmap.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glXDestroyGLXPixmap 13 | 3G 14 | 15 | 16 | glXDestroyGLXPixmap 17 | destroy a GLX pixmap 18 | 19 | C Specification 20 | 21 | 22 | void glXDestroyGLXPixmap 23 | Display * dpy 24 | GLXPixmap pix 25 | 26 | 27 | 28 | 29 | Parameters 30 | 31 | 32 | dpy 33 | 34 | 35 | Specifies the connection to the X server. 36 | 37 | 38 | 39 | 40 | pix 41 | 42 | 43 | Specifies the GLX pixmap to be destroyed. 44 | 45 | 46 | 47 | 48 | 49 | Description 50 | 51 | If the GLX pixmap pix is not current to any client, 52 | glXDestroyGLXPixmap destroys it immediately. 53 | Otherwise, 54 | pix is destroyed when it becomes not current to any client. 55 | In either case, the resource ID 56 | is freed immediately. 57 | 58 | 59 | Errors 60 | 61 | GLXBadPixmap is generated if pix is not a valid GLX pixmap. 62 | 63 | 64 | See Also 65 | 66 | glXCreateGLXPixmap, 67 | glXDestroyPixmap, 68 | glXMakeCurrent 69 | 70 | 71 | Copyright 72 | 73 | Copyright 1991-2006 74 | Silicon Graphics, Inc. This document is licensed under the SGI 75 | Free Software B License. For details, see 76 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /xml/doc/glXIsDirect.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glXIsDirect 13 | 3G 14 | 15 | 16 | glXIsDirect 17 | indicate whether direct rendering is enabled 18 | 19 | C Specification 20 | 21 | 22 | Bool glXIsDirect 23 | Display * dpy 24 | GLXContext ctx 25 | 26 | 27 | 28 | 29 | Parameters 30 | 31 | 32 | dpy 33 | 34 | 35 | Specifies the connection to the X server. 36 | 37 | 38 | 39 | 40 | ctx 41 | 42 | 43 | Specifies the GLX context that is being queried. 44 | 45 | 46 | 47 | 48 | 49 | Description 50 | 51 | glXIsDirect returns True if ctx is a direct rendering context, 52 | False otherwise. 53 | Direct rendering contexts pass rendering commands directly from the calling 54 | process's address space to the rendering system, 55 | bypassing the X server. 56 | Nondirect rendering contexts pass all rendering commands to the X server. 57 | 58 | 59 | Errors 60 | 61 | GLXBadContext is generated if ctx is not a valid GLX context. 62 | 63 | 64 | See Also 65 | 66 | glXCreateContext, 67 | glXCreateNewContext 68 | 69 | 70 | Copyright 71 | 72 | Copyright 1991-2006 73 | Silicon Graphics, Inc. This document is licensed under the SGI 74 | Free Software B License. For details, see 75 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /xml/doc/glListBase.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glListBase 13 | 3G 14 | 15 | 16 | glListBase 17 | set the display-list base for glCallLists 18 | 19 | C Specification 20 | 21 | 22 | void glListBase 23 | GLuint base 24 | 25 | 26 | 27 | Parameters 28 | 29 | 30 | base 31 | 32 | 33 | Specifies an integer offset that will be added to glCallLists 34 | offsets to generate display-list names. 35 | The initial value is 0. 36 | 37 | 38 | 39 | 40 | 41 | Description 42 | 43 | glCallLists specifies an array of offsets. 44 | Display-list names are generated by adding base to each offset. 45 | Names that reference valid display lists are executed; 46 | the others are ignored. 47 | 48 | 49 | Errors 50 | 51 | GL_INVALID_OPERATION is generated if glListBase 52 | is executed between the execution of glBegin 53 | and the corresponding execution of glEnd. 54 | 55 | 56 | Associated Gets 57 | 58 | glGet with argument GL_LIST_BASE 59 | 60 | 61 | See Also 62 | 63 | glCallLists 64 | 65 | 66 | Copyright 67 | 68 | Copyright 1991-2006 69 | Silicon Graphics, Inc. This document is licensed under the SGI 70 | Free Software B License. For details, see 71 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /xml/doc/glXDestroyContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glXDestroyContext 13 | 3G 14 | 15 | 16 | glXDestroyContext 17 | destroy a GLX context 18 | 19 | C Specification 20 | 21 | 22 | void glXDestroyContext 23 | Display * dpy 24 | GLXContext ctx 25 | 26 | 27 | 28 | 29 | Parameters 30 | 31 | 32 | dpy 33 | 34 | 35 | Specifies the connection to the X server. 36 | 37 | 38 | 39 | 40 | ctx 41 | 42 | 43 | Specifies the GLX context to be destroyed. 44 | 45 | 46 | 47 | 48 | 49 | Description 50 | 51 | If the GLX rendering context ctx is not current to any thread, 52 | glXDestroyContext 53 | destroys it immediately. 54 | Otherwise, 55 | ctx is destroyed when it becomes not current to any thread. 56 | In either case, the resource ID 57 | referenced by ctx is freed immediately. 58 | 59 | 60 | Errors 61 | 62 | GLXBadContext is generated if ctx is not a valid GLX context. 63 | 64 | 65 | See Also 66 | 67 | glXCreateContext, 68 | glXCreateNewContext, 69 | glXMakeCurrent 70 | 71 | 72 | Copyright 73 | 74 | Copyright 1991-2006 75 | Silicon Graphics, Inc. This document is licensed under the SGI 76 | Free Software B License. For details, see 77 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /xml/doc/glInitNames.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glInitNames 13 | 3G 14 | 15 | 16 | glInitNames 17 | initialize the name stack 18 | 19 | C Specification 20 | 21 | 22 | void glInitNames 23 | void 24 | 25 | 26 | 27 | Description 28 | 29 | The name stack is used during selection mode to allow sets of rendering 30 | commands to be uniquely identified. 31 | It consists of an ordered set of unsigned integers. 32 | glInitNames causes the name stack to be initialized to its default empty state. 33 | 34 | 35 | The name stack is always empty while the render mode is not GL_SELECT. 36 | Calls to glInitNames while the render mode is not GL_SELECT are ignored. 37 | 38 | 39 | Errors 40 | 41 | GL_INVALID_OPERATION is generated if glInitNames 42 | is executed between the execution of glBegin and the corresponding execution of 43 | glEnd. 44 | 45 | 46 | Associated Gets 47 | 48 | glGet with argument GL_NAME_STACK_DEPTH 49 | 50 | 51 | glGet with argument GL_MAX_NAME_STACK_DEPTH 52 | 53 | 54 | See Also 55 | 56 | glLoadName, 57 | glPushName, 58 | glRenderMode, 59 | glSelectBuffer 60 | 61 | 62 | Copyright 63 | 64 | Copyright 1991-2006 65 | Silicon Graphics, Inc. This document is licensed under the SGI 66 | Free Software B License. For details, see 67 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /xml/doc/glCurrentPaletteMatrix.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 2003-2004 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glCurrentPaletteMatrix 13 | 3G 14 | 15 | 16 | 17 | glCurrentPaletteMatrix 18 | glCurrentPaletteMatrixOES 19 | 20 | defines which of the palette's matrices is affected by 21 | subsequent matrix operations 22 | 23 | 24 | 25 | 26 | C Specification 27 | 28 | 29 | 30 | void glCurrentPaletteMatrixOES 31 | GLuint index 32 | 33 | 34 | 35 | 36 | Parameters 37 | 38 | 39 | 40 | 41 | 42 | index 43 | 44 | 45 | 46 | specifies the index into the palette's matrices. 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | Description 55 | 56 | 57 | glCurrentPaletteMatrixOES 58 | defines which of the palette's matrices is affected by 59 | subsequent matrix operations when the current matrix mode is 60 | GL_MATRIX_PALETTE_OES. 61 | 62 | 63 | 64 | 65 | Errors 66 | 67 | 68 | GL_INVALID_VALUE is generated if 69 | index is not between 70 | 0 and 71 | GL_MAX_PALETTE_MATRICES_OES - 1. 72 | 73 | 74 | 75 | See Also 76 | 77 | 78 | glLoadPaletteFromModelViewMatrix, 79 | glMatrixIndexPointer, 80 | glMatrixMode, 81 | glWeightPointer 82 | 83 | 84 | Copyright 85 | 86 | Copyright 2003-2004 87 | Silicon Graphics, Inc. This document is licensed under the SGI 88 | Free Software B License. For details, see 89 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /xml/doc/glTextureBarrier.xml: -------------------------------------------------------------------------------- 1 | %mathent; ]> 2 | 3 | 4 | 5 | 6 | 2014 7 | Khronos Group 8 | 9 | 10 | 11 | glTextureBarrier 12 | 3G 13 | 14 | 15 | glTextureBarrier 16 | controls the ordering of reads and writes to rendered fragments across drawing commands 17 | 18 | C Specification 19 | 20 | 21 | void glTextureBarrier 22 | void 23 | 24 | 25 | 26 | Description 27 | 28 | The values of rendered fragments are undefined when a shader 29 | stage fetches texels and the same texels are written via 30 | fragment shader outputs, even if the reads and writes are not in 31 | the same drawing command. To safely read the result of a written 32 | texel via a texel fetch in a subsequent drawing command, call 33 | glTextureBarrier between the two drawing 34 | commands to guarantee that writes have completed and caches have 35 | been invalidated before subsequent drawing commands are 36 | executed. 37 | 38 | 39 | Notes 40 | 41 | The situation described above is referred to as a 42 | rendering feedback loop and is discussed in 43 | more detail in section 9.3 of the OpenGL 4.5 Specification. 44 | 45 | 46 | Errors 47 | 48 | None. 49 | 50 | 51 | Version Support 52 | 53 | 54 | 55 | 56 | 57 | glTextureBarrier 58 | 59 | 60 | 61 | 62 | 63 | 64 | See Also 65 | 66 | glMemoryBarrier 67 | 68 | 69 | Copyright 70 | 71 | Copyright 2014 Khronos Group. 72 | This material may be distributed subject to the terms and conditions set forth in 73 | the Open Publication License, v 1.0, 8 June 1999. 74 | http://opencontent.org/openpub/. 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /xml/doc/glResetMinmax.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glResetMinmax 13 | 3G 14 | 15 | 16 | glResetMinmax 17 | reset minmax table entries to initial values 18 | 19 | C Specification 20 | 21 | 22 | void glResetMinmax 23 | GLenum target 24 | 25 | 26 | 27 | Parameters 28 | 29 | 30 | target 31 | 32 | 33 | Must be 34 | GL_MINMAX. 35 | 36 | 37 | 38 | 39 | 40 | Description 41 | 42 | glResetMinmax resets the elements of the current minmax table to their 43 | initial values: the ``maximum'' element receives the minimum possible 44 | component values, and the ``minimum'' element receives the maximum 45 | possible component values. 46 | 47 | 48 | Notes 49 | 50 | glResetMinmax is present only if ARB_imaging is returned when glGetString 51 | is called with an argument of GL_EXTENSIONS. 52 | 53 | 54 | Errors 55 | 56 | GL_INVALID_ENUM is generated if target is not GL_MINMAX. 57 | 58 | 59 | GL_INVALID_OPERATION is generated if glResetMinmax is executed 60 | between the execution of glBegin and the corresponding 61 | execution of glEnd. 62 | 63 | 64 | See Also 65 | 66 | glMinmax 67 | 68 | 69 | Copyright 70 | 71 | Copyright 1991-2006 72 | Silicon Graphics, Inc. This document is licensed under the SGI 73 | Free Software B License. For details, see 74 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /xml/doc/glIsList.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glIsList 13 | 3G 14 | 15 | 16 | glIsList 17 | determine if a name corresponds to a display list 18 | 19 | C Specification 20 | 21 | 22 | GLboolean glIsList 23 | GLuint list 24 | 25 | 26 | 27 | Parameters 28 | 29 | 30 | list 31 | 32 | 33 | Specifies a potential display list name. 34 | 35 | 36 | 37 | 38 | 39 | Description 40 | 41 | glIsList returns GL_TRUE if list is the name 42 | of a display list and returns GL_FALSE if it is not, or if an error occurs. 43 | 44 | 45 | A name returned by glGenLists, but not yet associated with a display list 46 | by calling glNewList, is not the name of a display list. 47 | 48 | 49 | Errors 50 | 51 | GL_INVALID_OPERATION is generated if glIsList 52 | is executed between the execution of 53 | glBegin 54 | and the corresponding execution of glEnd. 55 | 56 | 57 | See Also 58 | 59 | glCallList, 60 | glCallLists, 61 | glDeleteLists, 62 | glGenLists, 63 | glNewList 64 | 65 | 66 | Copyright 67 | 68 | Copyright 1991-2006 69 | Silicon Graphics, Inc. This document is licensed under the SGI 70 | Free Software B License. For details, see 71 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /xml/doc/glXGetContextIDEXT.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glXGetContextIDEXT 13 | 3G 14 | 15 | 16 | glXGetContextIDEXT 17 | get the XID for a context. 18 | 19 | C Specification 20 | 21 | 22 | GLXContextID glXGetContextIDEXT 23 | const GLXContext ctx 24 | 25 | 26 | 27 | 28 | Parameters 29 | 30 | 31 | ctx 32 | 33 | 34 | Specifies a GLX rendering context. 35 | 36 | 37 | 38 | 39 | 40 | Description 41 | 42 | glXGetContextIDEXT returns the XID associated with a GLXContext. 43 | 44 | 45 | No round trip is forced to the server; unlike most X calls that 46 | return a value, glXGetContextIDEXT does not flush any pending events. 47 | 48 | 49 | glXGetContextIDEXT is part of the 50 | GLX_EXT_import_context extension, not part of 51 | the core GLX command set. If 52 | GLX_EXT_import_context is included in the 53 | string returned by 54 | glXQueryExtensionsString, 55 | the extension is supported. 56 | 57 | 58 | Errors 59 | 60 | None is returned if 61 | ctx is NULL. 62 | Otherwise, if ctx does not refer to a 63 | valid context, undefined behavior results. 64 | 65 | 66 | See Also 67 | 68 | glXCreateContext, 69 | glXQueryVersion, 70 | glXQueryExtensionsString 71 | 72 | 73 | Copyright 74 | 75 | Copyright 1991-2006 76 | Silicon Graphics, Inc. This document is licensed under the SGI 77 | Free Software B License. For details, see 78 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /xml/doc/glPauseTransformFeedback.xml: -------------------------------------------------------------------------------- 1 | %mathent; ]> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 2010-2014 9 | Khronos Group 10 | 11 | 12 | 13 | glPauseTransformFeedback 14 | 3G 15 | 16 | 17 | glPauseTransformFeedback 18 | pause transform feedback operations 19 | 20 | C Specification 21 | 22 | 23 | void glPauseTransformFeedback 24 | void 25 | 26 | 27 | 28 | Description 29 | 30 | glPauseTransformFeedback pauses transform feedback operations on the currently active transform feedback 31 | object. When transform feedback operations are paused, transform feedback is still considered active and changing most 32 | transform feedback state related to the object results in an error. However, a new transform feedback object may be bound 33 | while transform feedback is paused. 34 | 35 | 36 | Errors 37 | 38 | GL_INVALID_OPERATION is generated if the currently bound transform feedback object is not active or is paused. 39 | 40 | 41 | Version Support 42 | 43 | 44 | 45 | 46 | 47 | glPauseTransformFeedback 48 | 49 | 50 | 51 | 52 | 53 | 54 | See Also 55 | 56 | glGenTransformFeedbacks, 57 | glBindTransformFeedback, 58 | glBeginTransformFeedback, 59 | glResumeTransformFeedback, 60 | glEndTransformFeedback, 61 | glDeleteTransformFeedbacks 62 | 63 | 64 | Copyright 65 | 66 | Copyright 2010-2014 Khronos Group. 67 | This material may be distributed subject to the terms and conditions set forth in 68 | the Open Publication License, v 1.0, 8 June 1999. 69 | http://opencontent.org/openpub/. 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /xml/doc/glResumeTransformFeedback.xml: -------------------------------------------------------------------------------- 1 | %mathent; ]> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 2010-2014 9 | Khronos Group 10 | 11 | 12 | 13 | glResumeTransformFeedback 14 | 3G 15 | 16 | 17 | glResumeTransformFeedback 18 | resume transform feedback operations 19 | 20 | C Specification 21 | 22 | 23 | void glResumeTransformFeedback 24 | void 25 | 26 | 27 | 28 | Description 29 | 30 | glResumeTransformFeedback resumes transform feedback operations on the currently active transform feedback 31 | object. When transform feedback operations are paused, transform feedback is still considered active and changing most 32 | transform feedback state related to the object results in an error. However, a new transform feedback object may be bound 33 | while transform feedback is paused. 34 | 35 | 36 | Errors 37 | 38 | GL_INVALID_OPERATION is generated if the currently bound transform feedback object is not active or is not paused. 39 | 40 | 41 | Version Support 42 | 43 | 44 | 45 | 46 | 47 | glResumeTransformFeedback 48 | 49 | 50 | 51 | 52 | 53 | 54 | See Also 55 | 56 | glGenTransformFeedbacks, 57 | glBindTransformFeedback, 58 | glBeginTransformFeedback, 59 | glPauseTransformFeedback, 60 | glEndTransformFeedback, 61 | glDeleteTransformFeedbacks 62 | 63 | 64 | Copyright 65 | 66 | Copyright 2010-2014 Khronos Group. 67 | This material may be distributed subject to the terms and conditions set forth in 68 | the Open Publication License, v 1.0, 8 June 1999. 69 | http://opencontent.org/openpub/. 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /xml/doc/glIsSync.xml: -------------------------------------------------------------------------------- 1 | %mathent; ]> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 2010-2014 9 | Khronos Group 10 | 11 | 12 | 13 | glIsSync 14 | 3G 15 | 16 | 17 | glIsSync 18 | determine if a name corresponds to a sync object 19 | 20 | C Specification 21 | 22 | 23 | GLboolean glIsSync 24 | GLsync sync 25 | 26 | 27 | 28 | Parameters 29 | 30 | 31 | sync 32 | 33 | 34 | Specifies a value that may be the name of a sync object. 35 | 36 | 37 | 38 | 39 | 40 | Description 41 | 42 | glIsSync returns GL_TRUE if sync is currently the name of a sync object. 43 | If sync is not the name of a sync object, or if an error occurs, glIsSync returns 44 | GL_FALSE. Note that zero is not the name of a sync object. 45 | 46 | 47 | Notes 48 | 49 | glIsSync is available only if the GL version is 3.2 or greater. 50 | 51 | 52 | Version Support 53 | 54 | 55 | 56 | 57 | 58 | glIsSync 59 | 60 | 61 | 62 | 63 | 64 | 65 | See Also 66 | 67 | glFenceSync, 68 | glWaitSync, 69 | glClientWaitSync, 70 | glDeleteSync 71 | 72 | 73 | Copyright 74 | 75 | Copyright 2010-2014 Khronos Group. 76 | This material may be distributed subject to the terms and conditions set forth in 77 | the Open Publication License, v 1.0, 8 June 1999. 78 | http://opencontent.org/openpub/. 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /xml/doc/glXDestroyWindow.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glXDestroyWindow 13 | 3G 14 | 15 | 16 | glXDestroyWindow 17 | destroy an on-screen rendering area 18 | 19 | C Specification 20 | 21 | 22 | void glXDestroyWindow 23 | Display * dpy 24 | GLXWindow win 25 | 26 | 27 | 28 | 29 | Parameters 30 | 31 | 32 | dpy 33 | 34 | 35 | Specifies the connection to the X server. 36 | 37 | 38 | 39 | 40 | win 41 | 42 | 43 | Specifies the GLXWindow to be destroyed. 44 | 45 | 46 | 47 | 48 | 49 | Description 50 | 51 | glXDestroyWindow destroys a GLXWindow created by glXCreateWindow. 52 | 53 | 54 | Notes 55 | 56 | glXDestroyWindow is available only if the GLX version is 1.3 or greater. 57 | 58 | 59 | If the GLX version is 1.1 or 1.0, the GL version must be 1.0. 60 | If the GLX version is 1.2, then the GL version must be 1.1. 61 | If the GLX version is 1.3, then the GL version must be 1.2. 62 | 63 | 64 | Errors 65 | 66 | GLXBadWindow is generated if win is not a valid 67 | GLXPixmap. 68 | 69 | 70 | See Also 71 | 72 | glXChooseFBConfig, 73 | glXCreateWindow, 74 | glXMakeContextCurrent 75 | 76 | 77 | Copyright 78 | 79 | Copyright 1991-2006 80 | Silicon Graphics, Inc. This document is licensed under the SGI 81 | Free Software B License. For details, see 82 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /xml/doc/glXDestroyPbuffer.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glXDestroyPbuffer 13 | 3G 14 | 15 | 16 | glXDestroyPbuffer 17 | destroy an off-screen rendering area 18 | 19 | C Specification 20 | 21 | 22 | void glXDestroyPbuffer 23 | Display * dpy 24 | GLXPbuffer pbuf 25 | 26 | 27 | 28 | 29 | Parameters 30 | 31 | 32 | dpy 33 | 34 | 35 | Specifies the connection to the X server. 36 | 37 | 38 | 39 | 40 | pbuf 41 | 42 | 43 | Specifies the GLXPbuffer to be destroyed. 44 | 45 | 46 | 47 | 48 | 49 | Description 50 | 51 | glXDestroyPbuffer destroys a GLXPbuffer created by glXCreatePbuffer. 52 | 53 | 54 | Notes 55 | 56 | glXDestroyPbuffer is available only if the GLX version is 1.3 or greater. 57 | 58 | 59 | If the GLX version is 1.1 or 1.0, the GL version must be 1.0. 60 | If the GLX version is 1.2, then the GL version must be 1.1. 61 | If the GLX version is 1.3, then the GL version must be 1.2. 62 | 63 | 64 | Errors 65 | 66 | GLXBadPbuffer is generated if pbuf is not a valid 67 | GLXPbuffer. 68 | 69 | 70 | See Also 71 | 72 | glXChooseFBConfig, 73 | glXCreatePbuffer, 74 | glXMakeContextCurrent 75 | 76 | 77 | Copyright 78 | 79 | Copyright 1991-2006 80 | Silicon Graphics, Inc. This document is licensed under the SGI 81 | Free Software B License. For details, see 82 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /xml/doc/glXDestroyPixmap.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glXDestroyPixmap 13 | 3G 14 | 15 | 16 | glXDestroyPixmap 17 | destroy an off-screen rendering area 18 | 19 | C Specification 20 | 21 | 22 | void glXDestroyPixmap 23 | Display * dpy 24 | GLXPixmap pixmap 25 | 26 | 27 | 28 | 29 | Parameters 30 | 31 | 32 | dpy 33 | 34 | 35 | Specifies the connection to the X server. 36 | 37 | 38 | 39 | 40 | pixmap 41 | 42 | 43 | Specifies the GLXPixmap to be destroyed. 44 | 45 | 46 | 47 | 48 | 49 | Description 50 | 51 | glXDestroyPixmap destroys a GLXPixmap created by glXCreatePixmap. 52 | 53 | 54 | Notes 55 | 56 | glXDestroyPixmap is available only if the GLX version is 1.3 or greater. 57 | 58 | 59 | If the GLX version is 1.1 or 1.0, the GL version must be 1.0. 60 | If the GLX version is 1.2, then the GL version must be 1.1. 61 | If the GLX version is 1.3, then the GL version must be 1.2. 62 | 63 | 64 | Errors 65 | 66 | GLXBadPixmap is generated if pixmap is not a valid 67 | GLXPixmap. 68 | 69 | 70 | See Also 71 | 72 | glXChooseFBConfig, 73 | glXCreatePixmap, 74 | glXDestroyGLXPixmap, 75 | glXMakeContextCurrent 76 | 77 | 78 | Copyright 79 | 80 | Copyright 1991-2006 81 | Silicon Graphics, Inc. This document is licensed under the SGI 82 | Free Software B License. For details, see 83 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /xml/doc/glIsSampler.xml: -------------------------------------------------------------------------------- 1 | %mathent; ]> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 2010-2014 9 | Khronos Group 10 | 11 | 12 | 13 | glIsSampler 14 | 3G 15 | 16 | 17 | glIsSampler 18 | determine if a name corresponds to a sampler object 19 | 20 | C Specification 21 | 22 | 23 | GLboolean glIsSampler 24 | GLuint id 25 | 26 | 27 | 28 | Parameters 29 | 30 | 31 | id 32 | 33 | 34 | Specifies a value that may be the name of a sampler object. 35 | 36 | 37 | 38 | 39 | 40 | Description 41 | 42 | glIsSampler returns GL_TRUE if id is currently the name of a sampler object. 43 | If id is zero, or is a non-zero value that is not currently the 44 | name of a sampler object, or if an error occurs, glIsSampler returns GL_FALSE. 45 | 46 | 47 | A name returned by glGenSamplers, is the name of a sampler object. 48 | 49 | 50 | Notes 51 | 52 | glIsSampler is available only if the GL version is 3.3 or higher. 53 | 54 | 55 | Version Support 56 | 57 | 58 | 59 | 60 | 61 | glIsSampler 62 | 63 | 64 | 65 | 66 | 67 | 68 | See Also 69 | 70 | glGenSamplers, 71 | glBindSampler, 72 | glDeleteSamplers 73 | 74 | 75 | Copyright 76 | 77 | Copyright 2010-2014 Khronos Group. 78 | This material may be distributed subject to the terms and conditions set forth in 79 | the Open Publication License, v 1.0, 8 June 1999. 80 | http://opencontent.org/openpub/. 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /xml/doc/glXQueryExtensionsString.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glXQueryExtensionsString 13 | 3G 14 | 15 | 16 | glXQueryExtensionsString 17 | return list of supported extensions 18 | 19 | C Specification 20 | 21 | 22 | const char * glXQueryExtensionsString 23 | Display * dpy 24 | int screen 25 | 26 | 27 | 28 | 29 | Parameters 30 | 31 | 32 | dpy 33 | 34 | 35 | Specifies the connection to the X server. 36 | 37 | 38 | 39 | 40 | screen 41 | 42 | 43 | Specifies the screen number. 44 | 45 | 46 | 47 | 48 | 49 | Description 50 | 51 | glXQueryExtensionsString returns a pointer to a string describing 52 | which GLX extensions are supported on the connection. The string 53 | is null-terminated and contains a space-separated list of 54 | extension names. (The extension names themselves never contain 55 | spaces.) If there are no extensions to GLX, then the empty string is 56 | returned. 57 | 58 | 59 | Notes 60 | 61 | glXQueryExtensionsString is available only if the GLX version is 1.1 or greater. 62 | 63 | 64 | glXQueryExtensionsString only returns information about GLX extensions. Call 65 | glGetString to get a list of GL extensions. 66 | 67 | 68 | See Also 69 | 70 | glGetString, 71 | glXQueryVersion, 72 | glXQueryServerString, 73 | glXGetClientString 74 | 75 | 76 | Copyright 77 | 78 | Copyright 1991-2006 79 | Silicon Graphics, Inc. This document is licensed under the SGI 80 | Free Software B License. For details, see 81 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /xml/doc/glIsVertexArray.xml: -------------------------------------------------------------------------------- 1 | %mathent; ]> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 2010-2014 9 | Khronos Group 10 | 11 | 12 | 13 | glIsVertexArray 14 | 3G 15 | 16 | 17 | glIsVertexArray 18 | determine if a name corresponds to a vertex array object 19 | 20 | C Specification 21 | 22 | 23 | GLboolean glIsVertexArray 24 | GLuint array 25 | 26 | 27 | 28 | Parameters 29 | 30 | 31 | array 32 | 33 | 34 | Specifies a value that may be the name of a vertex array object. 35 | 36 | 37 | 38 | 39 | 40 | Description 41 | 42 | glIsVertexArray returns GL_TRUE if array is currently the name of a vertex array 43 | object. If array is zero, or if array is not the name of a vertex array object, or if an error 44 | occurs, glIsVertexArray returns GL_FALSE. If array is a name returned by 45 | glGenVertexArrays, by that has not yet been bound through a call to 46 | glBindVertexArray, then the name is not a vertex array object and 47 | glIsVertexArray returns GL_FALSE. 48 | 49 | 50 | Version Support 51 | 52 | 53 | 54 | 55 | 56 | glIsVertexArray 57 | 58 | 59 | 60 | 61 | 62 | 63 | See Also 64 | 65 | glGenVertexArrays, 66 | glBindVertexArray, 67 | glDeleteVertexArrays 68 | 69 | 70 | Copyright 71 | 72 | Copyright 2010-2014 Khronos Group. 73 | This material may be distributed subject to the terms and conditions set forth in 74 | the Open Publication License, v 1.0, 8 June 1999. 75 | http://opencontent.org/openpub/. 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /xml/doc/glIsFramebuffer.xml: -------------------------------------------------------------------------------- 1 | %mathent; ]> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 2010-2014 9 | Khronos Group 10 | 11 | 12 | 13 | glIsFramebuffer 14 | 3G 15 | 16 | 17 | glIsFramebuffer 18 | determine if a name corresponds to a framebuffer object 19 | 20 | C Specification 21 | 22 | 23 | GLboolean glIsFramebuffer 24 | GLuint framebuffer 25 | 26 | 27 | 28 | Parameters 29 | 30 | 31 | framebuffer 32 | 33 | 34 | Specifies a value that may be the name of a framebuffer object. 35 | 36 | 37 | 38 | 39 | 40 | Description 41 | 42 | glIsFramebuffer returns GL_TRUE if framebuffer is currently the name of a framebuffer 43 | object. If framebuffer is zero, or if framebuffer is not the name of a framebuffer object, or if an error 44 | occurs, glIsFramebuffer returns GL_FALSE. If framebuffer is a name returned by 45 | glGenFramebuffers, by that has not yet been bound through a call to 46 | glBindFramebuffer, then the name is not a framebuffer object and glIsFramebuffer 47 | returns GL_FALSE. 48 | 49 | 50 | Version Support 51 | 52 | 53 | 54 | 55 | 56 | glIsFramebuffer 57 | 58 | 59 | 60 | 61 | 62 | 63 | See Also 64 | 65 | glGenFramebuffers, 66 | glBindFramebuffer, 67 | glDeleteFramebuffers 68 | 69 | 70 | Copyright 71 | 72 | Copyright 2010-2014 Khronos Group. 73 | This material may be distributed subject to the terms and conditions set forth in 74 | the Open Publication License, v 1.0, 8 June 1999. 75 | http://opencontent.org/openpub/. 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /xml/doc/glXQueryExtension.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glXQueryExtension 13 | 3G 14 | 15 | 16 | glXQueryExtension 17 | indicate whether the GLX extension is supported 18 | 19 | C Specification 20 | 21 | 22 | Bool glXQueryExtension 23 | Display * dpy 24 | int * errorBase 25 | int * eventBase 26 | 27 | 28 | 29 | 30 | Parameters 31 | 32 | 33 | dpy 34 | 35 | 36 | Specifies the connection to the X server. 37 | 38 | 39 | 40 | 41 | errorBase 42 | 43 | 44 | Returns the base error code of the GLX server extension. 45 | 46 | 47 | 48 | 49 | eventBase 50 | 51 | 52 | Returns the base event code of the GLX server extension. 53 | 54 | 55 | 56 | 57 | 58 | Description 59 | 60 | glXQueryExtension returns True if the X server of 61 | connection dpy supports the GLX extension, 62 | False otherwise. 63 | If True is returned, 64 | then errorBase and eventBase return the error base and event base of 65 | the GLX extension. These values should be added to the constant 66 | error and event values to determine the actual event or error values. 67 | Otherwise, errorBase and eventBase are unchanged. 68 | 69 | 70 | errorBase and eventBase do not return values if they are specified 71 | as NULL. 72 | 73 | 74 | See Also 75 | 76 | glXQueryVersion 77 | 78 | 79 | Copyright 80 | 81 | Copyright 1991-2006 82 | Silicon Graphics, Inc. This document is licensed under the SGI 83 | Free Software B License. For details, see 84 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /xml/doc/glFlush.xml: -------------------------------------------------------------------------------- 1 | %mathent; ]> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | 2010-2014 13 | Khronos Group 14 | 15 | 16 | 17 | glFlush 18 | 3G 19 | 20 | 21 | glFlush 22 | force execution of GL commands in finite time 23 | 24 | C Specification 25 | 26 | 27 | void glFlush 28 | void 29 | 30 | 31 | 32 | Description 33 | 34 | Different GL implementations buffer commands in several different locations, 35 | including network buffers and the graphics accelerator itself. 36 | glFlush empties all of these buffers, 37 | causing all issued commands to be executed as quickly as 38 | they are accepted by the actual rendering engine. 39 | Though this execution may not be completed in any particular 40 | time period, 41 | it does complete in finite time. 42 | 43 | 44 | Because any GL program might be executed over a network, 45 | or on an accelerator that buffers commands, 46 | all programs should call glFlush whenever they count on having 47 | all of their previously issued commands completed. 48 | For example, 49 | call glFlush before waiting for user input that depends on 50 | the generated image. 51 | 52 | 53 | Notes 54 | 55 | glFlush can return at any time. 56 | It does not wait until the execution of all previously 57 | issued GL commands is complete. 58 | 59 | 60 | Version Support 61 | 62 | 63 | 64 | 65 | 66 | glFlush 67 | 68 | 69 | 70 | 71 | 72 | 73 | See Also 74 | 75 | glFinish 76 | 77 | 78 | Copyright 79 | 80 | Copyright 1991-2006 Silicon Graphics, Inc. 81 | Copyright 2010-2014 Khronos Group. 82 | This document is licensed under the SGI Free Software B License. 83 | For details, see 84 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /xml/doc/glIsQuery.xml: -------------------------------------------------------------------------------- 1 | %mathent; ]> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 2005 9 | Sams Publishing 10 | 11 | 12 | 2010-2014 13 | Khronos Group 14 | 15 | 16 | 17 | glIsQuery 18 | 3G 19 | 20 | 21 | glIsQuery 22 | determine if a name corresponds to a query object 23 | 24 | C Specification 25 | 26 | 27 | GLboolean glIsQuery 28 | GLuint id 29 | 30 | 31 | 32 | Parameters 33 | 34 | 35 | id 36 | 37 | 38 | Specifies a value that may be the name of a query object. 39 | 40 | 41 | 42 | 43 | 44 | Description 45 | 46 | glIsQuery returns GL_TRUE if id is currently the name of a query object. 47 | If id is zero, or is a non-zero value that is not currently the 48 | name of a query object, or if an error occurs, glIsQuery returns GL_FALSE. 49 | 50 | 51 | A name returned by glGenQueries, but not yet associated with a query object 52 | by calling glBeginQuery, is not the name of a query object. 53 | 54 | 55 | Version Support 56 | 57 | 58 | 59 | 60 | 61 | glIsQuery 62 | 63 | 64 | 65 | 66 | 67 | 68 | See Also 69 | 70 | glBeginQuery, 71 | glDeleteQueries, 72 | glEndQuery, 73 | glGenQueries 74 | 75 | 76 | Copyright 77 | 78 | Copyright 2005 Addison-Wesley. 79 | Copyright 2010-2014 Khronos Group. 80 | This material may be distributed subject to the terms and conditions set forth in 81 | the Open Publication License, v 1.0, 8 June 1999. 82 | http://opencontent.org/openpub/. 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /xml/doc/glIsTransformFeedback.xml: -------------------------------------------------------------------------------- 1 | %mathent; ]> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 2010-2014 9 | Khronos Group 10 | 11 | 12 | 13 | glIsTransformFeedback 14 | 3G 15 | 16 | 17 | glIsTransformFeedback 18 | determine if a name corresponds to a transform feedback object 19 | 20 | C Specification 21 | 22 | 23 | GLboolean glIsTransformFeedback 24 | GLuint id 25 | 26 | 27 | 28 | Parameters 29 | 30 | 31 | id 32 | 33 | 34 | Specifies a value that may be the name of a transform feedback object. 35 | 36 | 37 | 38 | 39 | 40 | Description 41 | 42 | glIsTransformFeedback returns GL_TRUE if id is currently the name of a transform feedback 43 | object. If id is zero, or if id is not the name of a transform feedback object, or if an error 44 | occurs, glIsTransformFeedback returns GL_FALSE. If id is a name returned by 45 | glGenTransformFeedbacks, but that has not yet been bound through a call to 46 | glBindTransformFeedback, then the name is not a transform feedback object and glIsTransformFeedback 47 | returns GL_FALSE. 48 | 49 | 50 | Version Support 51 | 52 | 53 | 54 | 55 | 56 | glIsTransformFeedback 57 | 58 | 59 | 60 | 61 | 62 | 63 | See Also 64 | 65 | glGenTransformFeedbacks, 66 | glBindTransformFeedback, 67 | glDeleteTransformFeedbacks 68 | 69 | 70 | Copyright 71 | 72 | Copyright 2010-2014 Khronos Group. 73 | This material may be distributed subject to the terms and conditions set forth in 74 | the Open Publication License, v 1.0, 8 June 1999. 75 | http://opencontent.org/openpub/. 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /xml/doc/glXGetFBConfigs.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glXGetFBConfigs 13 | 3G 14 | 15 | 16 | glXGetFBConfigs 17 | list all GLX frame buffer configurations for a given screen 18 | 19 | C Specification 20 | 21 | 22 | GLXFBConfig * glXGetFBConfigs 23 | Display * dpy 24 | int screen 25 | int * nelements 26 | 27 | 28 | 29 | 30 | Parameters 31 | 32 | 33 | dpy 34 | 35 | 36 | Specifies the connection to the X server. 37 | 38 | 39 | 40 | 41 | screen 42 | 43 | 44 | Specifies the screen number. 45 | 46 | 47 | 48 | 49 | nelements 50 | 51 | 52 | Returns the number of GLXFBConfigs returned. 53 | 54 | 55 | 56 | 57 | 58 | Description 59 | 60 | glXGetFBConfigs returns a list of all GLXFBConfigs available on the screen 61 | specified by screen. Use glXGetFBConfigAttrib to obtain attribute 62 | values from a specific GLXFBConfig. 63 | 64 | 65 | Notes 66 | 67 | glXGetFBConfigs is available only if the GLX version is 1.3 or greater. 68 | 69 | 70 | If the GLX version is 1.1 or 1.0, the GL version must be 1.0. 71 | If the GLX version is 1.2, then the GL version must be 1.1. 72 | If the GLX version is 1.3, then the GL version must be 1.2. 73 | 74 | 75 | See Also 76 | 77 | glXGetFBConfigAttrib, 78 | glXGetVisualFromFBConfig 79 | glXChooseFBConfig 80 | 81 | 82 | Copyright 83 | 84 | Copyright 1991-2006 85 | Silicon Graphics, Inc. This document is licensed under the SGI 86 | Free Software B License. For details, see 87 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /xml/doc/glXFreeContextEXT.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glXFreeContextEXT 13 | 3G 14 | 15 | 16 | glXFreeContextEXT 17 | free client-side memory for imported context 18 | 19 | C Specification 20 | 21 | 22 | void glXFreeContextEXT 23 | Display * dpy 24 | GLXContext ctx 25 | 26 | 27 | 28 | 29 | Parameters 30 | 31 | 32 | dpy 33 | 34 | 35 | Specifies the connection to the X server. 36 | 37 | 38 | 39 | 40 | ctx 41 | 42 | 43 | Specifies a GLX rendering context. 44 | 45 | 46 | 47 | 48 | 49 | Description 50 | 51 | glXFreeContextEXT frees the client-side part of a GLXContext that 52 | was created with glXImportContextEXT. glXFreeContextEXT does not 53 | free the server-side context information or the XID 54 | associated with the server-side context. 55 | 56 | 57 | glXFreeContextEXT is part of the 58 | GLX_EXT_import_context extension, not part of 59 | the core GLX command set. If 60 | GLX_EXT_import_context is included in the 61 | string returned by 62 | glXQueryExtensionsString, 63 | the extension is supported. 64 | 65 | 66 | Errors 67 | 68 | GLXBadContext is generated if ctx does not 69 | refer to a valid context. 70 | 71 | 72 | See Also 73 | 74 | glXCreateContext, 75 | glXQueryVersion, 76 | glXQueryExtensionsString, 77 | glXImportContextEXT 78 | 79 | 80 | Copyright 81 | 82 | Copyright 1991-2006 83 | Silicon Graphics, Inc. This document is licensed under the SGI 84 | Free Software B License. For details, see 85 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /xml/doc/glIsBuffer.xml: -------------------------------------------------------------------------------- 1 | %mathent; ]> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 2005 9 | Sams Publishing 10 | 11 | 12 | 2010-2014 13 | Khronos Group 14 | 15 | 16 | 17 | glIsBuffer 18 | 3G 19 | 20 | 21 | glIsBuffer 22 | determine if a name corresponds to a buffer object 23 | 24 | C Specification 25 | 26 | 27 | GLboolean glIsBuffer 28 | GLuint buffer 29 | 30 | 31 | 32 | Parameters 33 | 34 | 35 | buffer 36 | 37 | 38 | Specifies a value that may be the name of a buffer object. 39 | 40 | 41 | 42 | 43 | 44 | Description 45 | 46 | glIsBuffer returns GL_TRUE if buffer is currently the name of a buffer object. 47 | If buffer is zero, or is a non-zero value that is not currently the 48 | name of a buffer object, or if an error occurs, glIsBuffer returns GL_FALSE. 49 | 50 | 51 | A name returned by glGenBuffers, but not yet associated with a buffer object 52 | by calling glBindBuffer, is not the name of a buffer object. 53 | 54 | 55 | Version Support 56 | 57 | 58 | 59 | 60 | 61 | glIsBuffer 62 | 63 | 64 | 65 | 66 | 67 | 68 | See Also 69 | 70 | glBindBuffer, 71 | glDeleteBuffers, 72 | glGenBuffers, 73 | glGet 74 | 75 | 76 | Copyright 77 | 78 | Copyright 2005 Addison-Wesley. 79 | Copyright 2010-2014 Khronos Group. 80 | This material may be distributed subject to the terms and conditions set forth in 81 | the Open Publication License, v 1.0, 8 June 1999. 82 | http://opencontent.org/openpub/. 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /xml/doc/glIsProgramPipeline.xml: -------------------------------------------------------------------------------- 1 | %mathent; ]> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 2010-2014 9 | Khronos Group 10 | 11 | 12 | 13 | glIsProgramPipeline 14 | 3G 15 | 16 | 17 | glIsProgramPipeline 18 | determine if a name corresponds to a program pipeline object 19 | 20 | C Specification 21 | 22 | 23 | GLboolean glIsProgramPipeline 24 | GLuint pipeline 25 | 26 | 27 | 28 | Parameters 29 | 30 | 31 | pipeline 32 | 33 | 34 | Specifies a value that may be the name of a program pipeline object. 35 | 36 | 37 | 38 | 39 | 40 | Description 41 | 42 | glIsProgramPipeline returns GL_TRUE if 43 | pipeline is currently the name of a program pipeline object. 44 | If pipeline is zero, or if pipeline is not the 45 | name of a program pipeline object, or if an error occurs, glIsProgramPipeline 46 | returns GL_FALSE. If pipeline is a name returned by 47 | glGenProgramPipelines, but that 48 | has not yet been bound through a call to glBindProgramPipeline, 49 | then the name is not a program pipeline object and glIsProgramPipeline 50 | returns GL_FALSE. 51 | 52 | 53 | Version Support 54 | 55 | 56 | 57 | 58 | 59 | glIsProgramPipeline 60 | 61 | 62 | 63 | 64 | 65 | 66 | See Also 67 | 68 | glGenProgramPipelines, 69 | glBindProgramPipeline, 70 | glDeleteProgramPipelines 71 | 72 | 73 | Copyright 74 | 75 | Copyright 2010-2014 Khronos Group. 76 | This material may be distributed subject to the terms and conditions set forth in 77 | the Open Publication License, v 1.0, 8 June 1999. 78 | http://opencontent.org/openpub/. 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /xml/doc/glXGetSelectedEvent.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glXGetSelectedEvent 13 | 3G 14 | 15 | 16 | glXGetSelectedEvent 17 | returns GLX events that are selected for a window or a GLX pixel buffer 18 | 19 | C Specification 20 | 21 | 22 | void glXGetSelectedEvent 23 | Display * dpy 24 | GLXDrawable draw 25 | unsigned long * event_mask 26 | 27 | 28 | 29 | Parameters 30 | 31 | 32 | dpy 33 | 34 | 35 | Specifies the connection to the X server. 36 | 37 | 38 | 39 | 40 | draw 41 | 42 | 43 | Specifies a GLX drawable. Must be a GLX pixel buffer or a window. 44 | 45 | 46 | 47 | 48 | event_mask 49 | 50 | 51 | Returns the events that are selected for draw. 52 | 53 | 54 | 55 | 56 | 57 | Description 58 | 59 | glXGetSelectedEvent returns in event_mask the events selected for draw. 60 | 61 | 62 | Notes 63 | 64 | glXGetSelectedEvent is available only if the GLX version is 1.3 or greater. 65 | 66 | 67 | If the GLX version is 1.1 or 1.0, the GL version must be 1.0. 68 | If the GLX version is 1.2, then the GL version must be 1.1. 69 | If the GLX version is 1.3, then the GL version must be 1.2. 70 | 71 | 72 | Errors 73 | 74 | GLXBadDrawable is generated if draw is not a valid window 75 | or a valid GLX pixel buffer. 76 | 77 | 78 | See Also 79 | 80 | glXSelectEvent, 81 | glXCreatePbuffer 82 | 83 | 84 | Copyright 85 | 86 | Copyright 1991-2006 87 | Silicon Graphics, Inc. This document is licensed under the SGI 88 | Free Software B License. For details, see 89 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /xml/doc/glPopDebugGroup.xml: -------------------------------------------------------------------------------- 1 | %mathent; ]> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 2013-2014 9 | Khronos Group 10 | 11 | 12 | 13 | glPopDebugGroup 14 | 3G 15 | 16 | 17 | glPopDebugGroup 18 | pop the active debug group 19 | 20 | C Specification 21 | 22 | 23 | void glPopDebugGroup 24 | void 25 | 26 | 27 | 28 | Description 29 | 30 | glPopDebugGroup pops the active debug group. 31 | After popping a debug group, the GL will also generate a debug 32 | output message describing its cause based on the message 33 | string, the source source, and an ID id 34 | submitted to the corresponding glPushDebugGroup 35 | command. GL_DEBUG_TYPE_PUSH_GROUP and GL_DEBUG_TYPE_POP_GROUP 36 | share a single namespace for message id. 37 | severity has the value GL_DEBUG_SEVERITY_NOTIFICATION. The type 38 | has the value GL_DEBUG_TYPE_POP_GROUP. Popping a debug group restores 39 | the debug output volume control of the parent debug group. 40 | 41 | 42 | Errors 43 | 44 | GL_STACK_UNDERFLOW is generated if an attempt is made to pop the default debug 45 | group from the stack. 46 | 47 | 48 | Associated Gets 49 | 50 | glGet with argument GL_MAX_DEBUG_MESSAGE_LENGTH. 51 | 52 | 53 | Version Support 54 | 55 | 56 | 57 | 58 | 59 | glPopDebugGroup 60 | 61 | 62 | 63 | 64 | 65 | 66 | See Also 67 | 68 | glPushDebugGroup, 69 | glObjectLabel, 70 | glObjectPtrLabel. 71 | 72 | 73 | Copyright 74 | 75 | Copyright 2013-2014 Khronos Group. 76 | This material may be distributed subject to the terms and conditions set forth in 77 | the Open Publication License, v 1.0, 8 June 1999. 78 | http://opencontent.org/openpub/. 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /xml/doc/glXQueryVersion.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glXQueryVersion 13 | 3G 14 | 15 | 16 | glXQueryVersion 17 | return the version numbers of the GLX extension 18 | 19 | C Specification 20 | 21 | 22 | Bool glXQueryVersion 23 | Display * dpy 24 | int * major 25 | int * minor 26 | 27 | 28 | 29 | 30 | Parameters 31 | 32 | 33 | dpy 34 | 35 | 36 | Specifies the connection to the X server. 37 | 38 | 39 | 40 | 41 | major 42 | 43 | 44 | Returns the major version number of the GLX server extension. 45 | 46 | 47 | 48 | 49 | minor 50 | 51 | 52 | Returns the minor version number of the GLX server extension. 53 | 54 | 55 | 56 | 57 | 58 | Description 59 | 60 | glXQueryVersion returns the major and minor version numbers of the GLX extension 61 | implemented by the server associated with connection dpy. 62 | Implementations with the same major version number are upward compatible, 63 | meaning that the implementation with the higher minor number is a superset 64 | of the version with the lower minor number. 65 | 66 | 67 | major and minor do not return values if they are specified as 68 | NULL. 69 | 70 | 71 | Errors 72 | 73 | glXQueryVersion returns False if it fails, 74 | True otherwise. 75 | 76 | 77 | major and minor are not updated when False is returned. 78 | 79 | 80 | See Also 81 | 82 | glXQueryExtension 83 | 84 | 85 | Copyright 86 | 87 | Copyright 1991-2006 88 | Silicon Graphics, Inc. This document is licensed under the SGI 89 | Free Software B License. For details, see 90 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /xml/doc/glIsRenderbuffer.xml: -------------------------------------------------------------------------------- 1 | %mathent; ]> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 2010-2014 9 | Khronos Group 10 | 11 | 12 | 13 | glIsRenderbuffer 14 | 3G 15 | 16 | 17 | glIsRenderbuffer 18 | determine if a name corresponds to a renderbuffer object 19 | 20 | C Specification 21 | 22 | 23 | GLboolean glIsRenderbuffer 24 | GLuint renderbuffer 25 | 26 | 27 | 28 | Parameters 29 | 30 | 31 | renderbuffer 32 | 33 | 34 | Specifies a value that may be the name of a renderbuffer object. 35 | 36 | 37 | 38 | 39 | 40 | Description 41 | 42 | glIsRenderbuffer returns GL_TRUE if renderbuffer is currently the name of a renderbuffer 43 | object. If renderbuffer is zero, or if renderbuffer is not the name of a renderbuffer object, or if an error 44 | occurs, glIsRenderbuffer returns GL_FALSE. If renderbuffer is a name returned by 45 | glGenRenderbuffers, by that has not yet been bound through a call to 46 | glBindRenderbuffer or glFramebufferRenderbuffer, 47 | then the name is not a renderbuffer object and glIsRenderbuffer returns GL_FALSE. 48 | 49 | 50 | Version Support 51 | 52 | 53 | 54 | 55 | 56 | glIsRenderbuffer 57 | 58 | 59 | 60 | 61 | 62 | 63 | See Also 64 | 65 | glGenRenderbuffers, 66 | glBindRenderbuffer, 67 | glFramebufferRenderbuffer, 68 | glDeleteRenderbuffers 69 | 70 | 71 | Copyright 72 | 73 | Copyright 2010-2014 Khronos Group. 74 | This material may be distributed subject to the terms and conditions set forth in 75 | the Open Publication License, v 1.0, 8 June 1999. 76 | http://opencontent.org/openpub/. 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /xml/doc/glClearAccum.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glClearAccum 13 | 3G 14 | 15 | 16 | glClearAccum 17 | specify clear values for the accumulation buffer 18 | 19 | C Specification 20 | 21 | 22 | void glClearAccum 23 | GLfloat red 24 | GLfloat green 25 | GLfloat blue 26 | GLfloat alpha 27 | 28 | 29 | 30 | Parameters 31 | 32 | 33 | red 34 | green 35 | blue 36 | alpha 37 | 38 | 39 | Specify the red, green, blue, and alpha values used when the 40 | accumulation buffer is cleared. 41 | The initial values are all 0. 42 | 43 | 44 | 45 | 46 | 47 | Description 48 | 49 | glClearAccum specifies the red, green, blue, and alpha values used by glClear 50 | to clear the accumulation buffer. 51 | 52 | 53 | Values specified by glClearAccum are clamped to the 54 | range 55 | 56 | 57 | 58 | -1 59 | 1 60 | 61 | . 62 | 63 | 64 | Errors 65 | 66 | GL_INVALID_OPERATION is generated if glClearAccum 67 | is executed between the execution of glBegin 68 | and the corresponding execution of glEnd. 69 | 70 | 71 | Associated Gets 72 | 73 | glGet with argument GL_ACCUM_CLEAR_VALUE 74 | 75 | 76 | See Also 77 | 78 | glAccum, 79 | glClear 80 | 81 | 82 | Copyright 83 | 84 | Copyright 1991-2006 85 | Silicon Graphics, Inc. This document is licensed under the SGI 86 | Free Software B License. For details, see 87 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /xml/doc/glLoadName.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glLoadName 13 | 3G 14 | 15 | 16 | glLoadName 17 | load a name onto the name stack 18 | 19 | C Specification 20 | 21 | 22 | void glLoadName 23 | GLuint name 24 | 25 | 26 | 27 | Parameters 28 | 29 | 30 | name 31 | 32 | 33 | Specifies a name that will replace the top value on the name stack. 34 | 35 | 36 | 37 | 38 | 39 | Description 40 | 41 | The name stack is used during selection mode to allow sets of rendering 42 | commands to be uniquely identified. 43 | It consists of an ordered set of unsigned integers and is initially empty. 44 | 45 | 46 | glLoadName causes name to replace the value on the top of the name stack. 47 | 48 | 49 | The name stack is always empty while the render mode is not GL_SELECT. 50 | Calls to glLoadName while the render mode is not GL_SELECT are ignored. 51 | 52 | 53 | Errors 54 | 55 | GL_INVALID_OPERATION is generated if glLoadName is called while the 56 | name stack is empty. 57 | 58 | 59 | GL_INVALID_OPERATION is generated if glLoadName is executed between 60 | the execution of glBegin and the corresponding execution of glEnd. 61 | 62 | 63 | Associated Gets 64 | 65 | glGet with argument GL_NAME_STACK_DEPTH 66 | 67 | 68 | glGet with argument GL_MAX_NAME_STACK_DEPTH 69 | 70 | 71 | See Also 72 | 73 | glInitNames, 74 | glPushName, 75 | glRenderMode, 76 | glSelectBuffer 77 | 78 | 79 | Copyright 80 | 81 | Copyright 1991-2006 82 | Silicon Graphics, Inc. This document is licensed under the SGI 83 | Free Software B License. For details, see 84 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /xml/doc/glClearDepthf.xml: -------------------------------------------------------------------------------- 1 | %mathent; ]> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | 2010-2015 13 | Khronos Group 14 | 15 | 16 | 17 | glClearDepthf 18 | 3G 19 | 20 | 21 | glClearDepthf 22 | specify the clear value for the depth buffer 23 | 24 | 25 | C Specification 26 | 27 | 28 | void glClearDepthf 29 | GLfloat depth 30 | 31 | 32 | 33 | Parameters 34 | 35 | 36 | depth 37 | 38 | 39 | Specifies the depth value used when the depth buffer is cleared. The 40 | initial value is 1. 41 | 42 | 43 | 44 | 45 | 46 | Description 47 | 48 | glClearDepthf specifies the depth value used by glClear to clear the depth buffer. 49 | When clearing a fixed-point depth buffer, values specified by glClearDepthf are clamped to the range 50 | 51 | 52 | 53 | 0 54 | 1 55 | 56 | , 57 | and converted to fixed-point. No clamping or conversion is applied when clearing a floating-point depth buffer. 58 | 59 | 60 | Associated Gets 61 | 62 | glGet with argument GL_DEPTH_CLEAR_VALUE 63 | 64 | 65 | 66 | API Version Support 67 | 68 | 69 | 70 | 71 | 72 | glClearDepthf 73 | 74 | 75 | 76 | 77 | 78 | 79 | See Also 80 | 81 | glClear 82 | 83 | 84 | Copyright 85 | 86 | Copyright 1991-2006 Silicon Graphics, Inc. 87 | Copyright 2010-2015 Khronos Group. 88 | This document is licensed under the SGI Free Software B License. 89 | For details, see 90 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /xml/doc/glGetFragDataLocation.xml: -------------------------------------------------------------------------------- 1 | %mathent; ]> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 2010-2014 9 | Khronos Group 10 | 11 | 12 | 13 | glGetFragDataLocation 14 | 3G 15 | 16 | 17 | glGetFragDataLocation 18 | query the bindings of color numbers to user-defined varying out variables 19 | 20 | C Specification 21 | 22 | 23 | GLint glGetFragDataLocation 24 | GLuint program 25 | const char * name 26 | 27 | 28 | 29 | Parameters 30 | 31 | 32 | program 33 | 34 | 35 | The name of the program containing varying out variable whose binding to query 36 | 37 | 38 | 39 | 40 | name 41 | 42 | 43 | The name of the user-defined varying out variable whose binding to query 44 | 45 | 46 | 47 | 48 | 49 | Description 50 | 51 | glGetFragDataLocation retrieves the assigned color number binding for the user-defined 52 | varying out variable name for program program. program 53 | must have previously been linked. name must be a null-terminated string. If name 54 | is not the name of an active user-defined varying out fragment shader variable within program, -1 will 55 | be returned. 56 | 57 | 58 | Errors 59 | 60 | GL_INVALID_OPERATION is generated if program is not the name of a program object. 61 | 62 | 63 | Version Support 64 | 65 | 66 | 67 | 68 | 69 | glGetFragDataLocation 70 | 71 | 72 | 73 | 74 | 75 | 76 | See Also 77 | 78 | glCreateProgram, 79 | glBindFragDataLocation 80 | 81 | 82 | Copyright 83 | 84 | Copyright 2010-2014 Khronos Group. 85 | This material may be distributed subject to the terms and conditions set forth in 86 | the Open Publication License, v 1.0, 8 June 1999. 87 | http://opencontent.org/openpub/. 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /xml/doc/glDeleteVertexArrays.xml: -------------------------------------------------------------------------------- 1 | %mathent; ]> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 2010-2014 9 | Khronos Group 10 | 11 | 12 | 13 | glDeleteVertexArrays 14 | 3G 15 | 16 | 17 | glDeleteVertexArrays 18 | delete vertex array objects 19 | 20 | C Specification 21 | 22 | 23 | void glDeleteVertexArrays 24 | GLsizei n 25 | const GLuint *arrays 26 | 27 | 28 | 29 | Parameters 30 | 31 | 32 | n 33 | 34 | 35 | Specifies the number of vertex array objects to be deleted. 36 | 37 | 38 | 39 | 40 | arrays 41 | 42 | 43 | Specifies the address of an array containing the n names of the objects to be deleted. 44 | 45 | 46 | 47 | 48 | 49 | Description 50 | 51 | glDeleteVertexArrays deletes n vertex array objects whose names are stored in the 52 | array addressed by arrays. Once a vertex array object is deleted it has no contents and its name is 53 | again unused. If a vertex array object that is currently bound is deleted, the binding for that object reverts to zero 54 | and the default vertex array becomes current. Unused names in arrays are silently ignored, as is the value zero. 55 | 56 | 57 | Errors 58 | 59 | GL_INVALID_VALUE is generated if n is negative. 60 | 61 | 62 | Version Support 63 | 64 | 65 | 66 | 67 | 68 | glDeleteVertexArrays 69 | 70 | 71 | 72 | 73 | 74 | 75 | See Also 76 | 77 | glGenVertexArrays, 78 | glIsVertexArray, 79 | glBindVertexArray 80 | 81 | 82 | Copyright 83 | 84 | Copyright 2010-2014 Khronos Group. 85 | This material may be distributed subject to the terms and conditions set forth in 86 | the Open Publication License, v 1.0, 8 June 1999. 87 | http://opencontent.org/openpub/. 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /xml/doc/glCreateVertexArrays.xml: -------------------------------------------------------------------------------- 1 | %mathent; ]> 2 | 3 | 4 | 5 | 6 | 2014 7 | Khronos Group 8 | 9 | 10 | 11 | glCreateVertexArrays 12 | 3G 13 | 14 | 15 | glCreateVertexArrays 16 | create vertex array objects 17 | 18 | C Specification 19 | 20 | 21 | void glCreateVertexArrays 22 | GLsizei n 23 | GLuint *arrays 24 | 25 | 26 | 27 | Parameters 28 | 29 | 30 | n 31 | 32 | 33 | Number of vertex array objects to create. 34 | 35 | 36 | 37 | 38 | arrays 39 | 40 | 41 | Specifies an array in which names of the new vertex array 42 | objects are stored. 43 | 44 | 45 | 46 | 47 | 48 | Description 49 | 50 | glCreateVertexArrays 51 | returns n previously unused vertex array 52 | object names in arrays, each representing 53 | a new vertex array object initialized to the default state. 54 | 55 | 56 | Errors 57 | 58 | GL_INVALID_VALUE is generated if 59 | n is negative. 60 | 61 | 62 | Version Support 63 | 64 | 65 | 66 | 67 | 68 | glCreateVertexArrays 69 | 70 | 71 | 72 | 73 | 74 | 75 | See Also 76 | 77 | glBindVertexArray, 78 | glDeleteVertexArrays 79 | glEnableVertexAttribArray 80 | glGenVertexArrays, 81 | glIsVertexArray, 82 | glVertexAttribPointer 83 | 84 | 85 | Copyright 86 | 87 | Copyright 2014 Khronos Group. 88 | This material may be distributed subject to the terms and conditions set forth in 89 | the Open Publication License, v 1.0, 8 June 1999. 90 | http://opencontent.org/openpub/. 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /xml/doc/glInvalidateBufferData.xml: -------------------------------------------------------------------------------- 1 | %mathent; ]> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 2013-2014 9 | Khronos Group 10 | 11 | 12 | 13 | glInvalidateBufferData 14 | 3G 15 | 16 | 17 | glInvalidateBufferData 18 | invalidate the content of a buffer object's data store 19 | 20 | C Specification 21 | 22 | 23 | void glInvalidateBufferData 24 | GLuint buffer 25 | 26 | 27 | 28 | Parameters 29 | 30 | 31 | buffer 32 | 33 | 34 | The name of a buffer object whose data store to invalidate. 35 | 36 | 37 | 38 | 39 | 40 | Description 41 | 42 | glInvalidateBufferData invalidates all of the 43 | content of the data store of a buffer object. After invalidation, the content 44 | of the buffer's data store becomes undefined. 45 | 46 | 47 | Errors 48 | 49 | GL_INVALID_VALUE is generated if buffer is not the 50 | name of an existing buffer object. 51 | 52 | 53 | GL_INVALID_OPERATION is generated if any part of buffer 54 | is currently mapped. 55 | 56 | 57 | Associated Gets 58 | 59 | glGetBufferParameter with argument GL_BUFFER_SIZE 60 | 61 | 62 | Version Support 63 | 64 | 65 | 66 | 67 | 68 | glInvalidateBufferData 69 | 70 | 71 | 72 | 73 | 74 | 75 | See Also 76 | 77 | glInvalidateTexSubImage,, 78 | glInvalidateTexImage, 79 | glInvalidateBufferSubData, 80 | glInvalidateFramebuffer, 81 | glInvalidateSubFramebuffer. 82 | 83 | 84 | Copyright 85 | 86 | Copyright 2013-2014 Khronos Group. 87 | This material may be distributed subject to the terms and conditions set forth in 88 | the Open Publication License, v 1.0, 8 June 1999. 89 | http://opencontent.org/openpub/. 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /xml/doc/glXGetVisualFromFBConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 1991-2006 9 | Silicon Graphics, Inc. 10 | 11 | 12 | glXGetVisualFromFBConfig 13 | 3G 14 | 15 | 16 | glXGetVisualFromFBConfig 17 | return visual that is associated with the frame buffer configuration 18 | 19 | C Specification 20 | 21 | 22 | XVisualInfo * glXGetVisualFromFBConfig 23 | Display * dpy 24 | GLXFBConfig config 25 | 26 | 27 | 28 | Parameters 29 | 30 | 31 | dpy 32 | 33 | 34 | Specifies the connection to the X server. 35 | 36 | 37 | 38 | 39 | config 40 | 41 | 42 | Specifies the GLX frame buffer configuration. 43 | 44 | 45 | 46 | 47 | 48 | Description 49 | 50 | If config is a valid GLX frame buffer configuration 51 | and it has an associated X Visual, then 52 | information describing that visual is returned; otherwise NULL 53 | is returned. Use XFree to free the data returned. 54 | 55 | 56 | Notes 57 | 58 | glXGetVisualFromFBConfig is available only if the GLX version is 1.3 or greater. 59 | 60 | 61 | If the GLX version is 1.1 or 1.0, the GL version must be 1.0. 62 | If the GLX version is 1.2, then the GL version must be 1.1. 63 | If the GLX version is 1.3, then the GL version must be 1.2. 64 | 65 | 66 | XVisualInfo is defined in Xutil.h. 67 | It is a structure that includes visual, visualID, 68 | screen, and depth elements. 69 | 70 | 71 | Errors 72 | 73 | Returns NULL if config is not a valid GLXFBConfig. 74 | 75 | 76 | See Also 77 | 78 | glXGetFBConfigAttrib, 79 | glXChooseFBConfig, 80 | glXChooseVisual, 81 | glXGetConfig 82 | 83 | 84 | Copyright 85 | 86 | Copyright 1991-2006 87 | Silicon Graphics, Inc. This document is licensed under the SGI 88 | Free Software B License. For details, see 89 | https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt. 90 | 91 | 92 | 93 | --------------------------------------------------------------------------------