{"id":28997818,"url":"https://github.com/n1ghtthef0x/agll","last_synced_at":"2026-04-15T10:36:47.824Z","repository":{"id":300648909,"uuid":"954072881","full_name":"N1ghtTheF0x/agll","owner":"N1ghtTheF0x","description":"Another OpenGL Loading Library","archived":false,"fork":false,"pushed_at":"2025-06-22T21:38:52.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-22T22:28:58.691Z","etag":null,"topics":["c","cmake","cpp","library","linux","opengl","windows"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/N1ghtTheF0x.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-24T14:19:46.000Z","updated_at":"2025-06-22T21:38:56.000Z","dependencies_parsed_at":"2025-06-22T22:39:37.530Z","dependency_job_id":null,"html_url":"https://github.com/N1ghtTheF0x/agll","commit_stats":null,"previous_names":["n1ghtthef0x/agll"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/N1ghtTheF0x/agll","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N1ghtTheF0x%2Fagll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N1ghtTheF0x%2Fagll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N1ghtTheF0x%2Fagll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N1ghtTheF0x%2Fagll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/N1ghtTheF0x","download_url":"https://codeload.github.com/N1ghtTheF0x/agll/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N1ghtTheF0x%2Fagll/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261819116,"owners_count":23214430,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","cmake","cpp","library","linux","opengl","windows"],"created_at":"2025-06-25T06:31:00.326Z","updated_at":"2026-04-15T10:36:47.776Z","avatar_url":"https://github.com/N1ghtTheF0x.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Another OpenGL Loading Library\r\n\r\nA basic OpenGL loading library for my own usage\r\n\r\n## Usage\r\n\r\nUse CMake to build and link\r\n\r\n```cmake\r\n\r\nadd_subdirectory(agll)\r\n\r\ntarget_link_libraries(\u003ctarget\u003e PRIVATE agll)\r\ntarget_include_libraries(\u003ctarget\u003e PRIVATE agll/include)\r\n\r\n```\r\n\r\nNow use `agllLoad` and `agllUnload` to load/unload OpenGL:\r\n\r\n```c\r\n// for some systems you need a OpenGL context and \"make it current\"\r\n// 0 for ok, 1 is failed and 2 failed to load os opengl library (libGL.so, opengl32.dll)\r\nint result = agllLoad();\r\nif(result == AGLL_RESULT_OK)\r\n{\r\n    // do OpenGL stuff here\r\n    // (glClear, etc.)\r\n}\r\n// destroy opengl context here\r\n// at end of runtime\r\nagllUnload();\r\n```\r\n\r\nYou can use `agllLoad2` to load OpenGL with a custom function loader callback thingy\r\n\r\n```c\r\nint result = agllLoad2(myOwnLoaderFunction);\r\n// ...\r\n```\r\n\r\n## Building\r\n\r\nYou need:\r\n\r\n- CMake\r\n- NodeJS\r\n\r\nCMake will run `./tools/gen_agll.mjs` and it does the following:\r\n\r\n- fetch the OpenGL specification from Khronos\r\n- generate function typedefs and declare enums of the OpenGL specification\r\n- write to file `agll.gen.c`, `agll.gen.h`, `khrplatform.gen.h`\r\n\r\nThen you can use it like any CMake library\r\n\r\n### `gen_agll.mjs` usages\r\n\r\nThis script is a cli, following command line arguments are available:\r\n\r\n- `force` - force to download the specification again\r\n- `wgl` - include WGL specification (BROKEN RN)\r\n- `glx` - include GLX specification (BROKEN RN)\r\n- `windows` - alias for `wgl`\r\n- `linux` - alias for `glx`\r\n\r\nJust use it like this: `node ./tools/gen_agll.mjs force wgl ...`\r\n\r\n## Licenses\r\n\r\nThis project is licensed under the [Nightly License](./LICENSE)\r\n\r\nThe Khronos specification is licensed under their [own license found online](https://www.khronos.org/legal/Khronos_Specification_Copyright_License_Header):\r\n\r\n```LICENSE\r\nCopyright 2025 The Khronos Group. \r\n\r\nThis specification is protected by copyright laws and contains material proprietary \r\nto the Khronos Group, Inc. Except as described by these terms, it or any components \r\nmay not be reproduced, republished, distributed, transmitted, displayed, broadcast \r\nor otherwise exploited in any manner without the express prior written permission \r\nof Khronos Group. \r\n\r\nKhronos Group grants a conditional copyright license to use and reproduce the \r\nunmodified specification for any purpose, without fee or royalty, EXCEPT no licenses \r\nto any patent, trademark or other intellectual property rights are granted under \r\nthese terms. Parties desiring to implement the specification and make use of \r\nKhronos trademarks in relation to that implementation, and receive reciprocal patent \r\nlicense protection under the Khronos IP Policy must become Adopters and confirm the \r\nimplementation as conformant under the process defined by Khronos for this \r\nspecification; see https://www.khronos.org/adopters.\r\n\r\nKhronos Group makes no, and expressly disclaims any, representations or warranties, \r\nexpress or implied, regarding this specification, including, without limitation: \r\nmerchantability, fitness for a particular purpose, non-infringement of any \r\nintellectual property, correctness, accuracy, completeness, timeliness, and \r\nreliability. Under no circumstances will the Khronos Group, or any of its Promoters, \r\nContributors or Members, or their respective partners, officers, directors, \r\nemployees, agents or representatives be liable for any damages, whether direct, \r\nindirect, special or consequential damages for lost revenues, lost profits, or \r\notherwise, arising from or in connection with these materials.\r\n\r\nVulkan is a registered trademark and Khronos, OpenXR, SPIR, SPIR-V, SYCL, WebGL, \r\nWebCL, OpenVX, OpenVG, EGL, COLLADA, glTF, NNEF, OpenKODE, OpenKCAM, StreamInput, \r\nOpenWF, OpenSL ES, OpenMAX, OpenMAX AL, OpenMAX IL, OpenMAX DL, OpenML and DevU are \r\ntrademarks of the Khronos Group Inc. ASTC is a trademark of ARM Holdings PLC, \r\nOpenCL is a trademark of Apple Inc. and OpenGL and OpenML are registered trademarks \r\nand the OpenGL ES and OpenGL SC logos are trademarks of Hewlett Packard Enterprise \r\nused under license by Khronos. All other product names, trademarks, \r\nand/or company names are used solely for identification and belong to their \r\nrespective owners.\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn1ghtthef0x%2Fagll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fn1ghtthef0x%2Fagll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn1ghtthef0x%2Fagll/lists"}