{"id":22293922,"url":"https://github.com/rtbo/gldgen","last_synced_at":"2026-01-06T11:38:50.144Z","repository":{"id":71972717,"uuid":"163658016","full_name":"rtbo/gldgen","owner":"rtbo","description":"OpenGL D bindings generation","archived":false,"fork":false,"pushed_at":"2019-09-15T22:33:07.000Z","size":440,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-30T19:27:02.812Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"D","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rtbo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2018-12-31T09:56:12.000Z","updated_at":"2019-09-15T22:33:09.000Z","dependencies_parsed_at":"2023-07-10T10:32:46.491Z","dependency_job_id":null,"html_url":"https://github.com/rtbo/gldgen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtbo%2Fgldgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtbo%2Fgldgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtbo%2Fgldgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtbo%2Fgldgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rtbo","download_url":"https://codeload.github.com/rtbo/gldgen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245550681,"owners_count":20633883,"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":[],"created_at":"2024-12-03T17:33:25.604Z","updated_at":"2026-01-06T11:38:50.118Z","avatar_url":"https://github.com/rtbo.png","language":"D","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gldgen\n\nOpenGL D binding generation.\n\nThis module has Khronos' OpenGL and EGL registries as submodule. They are used\nto update local registry files and to keep track of the Khronos' commits.\nAs they are pretty heavy (\u003e 120Mb) you may only want to check them out to update\nto a newer version of the API. For basic use, recommendation is to __not__ clone\nrecursively. Everything needed to generate the D files is copied in the\n`registry` folder.\n\nThis is not a Dub package and is not intended to become one. Users can copy\nthe files they need from the `d` folder, or generate their own with\n`gen_d_files.py`:\n```sh\n$ ./gen_d_files.py -h\nusage: gen_d_files.py [-h] [--package PACKAGE] [--dest DEST]\n\nOpenGL D bindings generator\n\noptional arguments:\n  -h, --help         show this help message and exit\n  --package PACKAGE  D package of generated modules [gld]\n  --dest DEST        Destination folder for generated files [(gldgen)/d]\n```\n\nThe generated bindings do not include any global symbol such as `glDrawElements`.\nInstead there is the following definition:\n```d\nfinal class Gl {\n    this (SymbolLoader loader) {\n        // blindly attempt to load all Gl symbols and extensions\n        // ...\n    }\n    // ...\n    public void DrawElements (GLenum mode, GLsizei count, GLenum type, const(void)* indices) const {\n        assert(_DrawElements !is null, \"OpenGL command glDrawElements was not loaded\");\n        return _DrawElements (mode, count, type, indices);\n    }\n    // ...\n    private PFN_glDrawElements _DrawElements;\n    // ...\n}\n```\nClient usage could be as follow\n```d\nvoid fun(Gl gl) {\n    gl.DrawElements(...);\n}\n```\n\nContext creation is not part yet of gldgen. It may be part of it in a near\nfuture. `SymbolLoader` is a `void* delegate (in string name)`. It must forward\nto platform specific loader function such as `glXGetProcAddressARB`\n(obtained during context creation).\n\nThe `Gl` class does not report which version or extensions are actually loaded\nas this is generally known from the context creation and can be queried with\n`Gl.GetString`.\n\nIncluded APIs:\n - Desktop OpenGl (all versions)\n - GlX\n - Wgl\n - Egl\n\nGLES is missing at the moment.\n\nOne can test if everything compiles fine by running\n```sh\n$ dmd @dmd_args.txt\n```\n`dmd_args.txt` is generated by `gen_d_files.py`. It is not checked-in because\nit contains absolute paths to the D files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtbo%2Fgldgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frtbo%2Fgldgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtbo%2Fgldgen/lists"}