{"id":13994816,"url":"https://github.com/nilium/opengl-core","last_synced_at":"2025-07-22T20:32:50.119Z","repository":{"id":9060187,"uuid":"10828455","full_name":"nilium/opengl-core","owner":"nilium","description":"OpenGL bindings for Ruby 2.x (Migrated to https://git.sr.ht/~nilium/opengl-core)","archived":true,"fork":false,"pushed_at":"2015-01-22T18:59:08.000Z","size":377,"stargazers_count":15,"open_issues_count":1,"forks_count":3,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-07-14T02:44:26.959Z","etag":null,"topics":["opengl-bindings","ruby"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nilium.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-20T20:08:39.000Z","updated_at":"2024-04-09T21:00:34.000Z","dependencies_parsed_at":"2022-08-26T08:01:58.765Z","dependency_job_id":null,"html_url":"https://github.com/nilium/opengl-core","commit_stats":null,"previous_names":["nilium/ruby-opengl"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/nilium/opengl-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilium%2Fopengl-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilium%2Fopengl-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilium%2Fopengl-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilium%2Fopengl-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nilium","download_url":"https://codeload.github.com/nilium/opengl-core/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilium%2Fopengl-core/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266567519,"owners_count":23949372,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["opengl-bindings","ruby"],"created_at":"2024-08-09T14:03:07.267Z","updated_at":"2025-07-22T20:32:46.026Z","avatar_url":"https://github.com/nilium.png","language":"Ruby","readme":"opengl-core\n===========\n\nOpenGL core profile and extension bindings for Ruby 2.x.\n\n\nInstallation\n------------\n\n### From RubyGems.org\n\n    $ gem install opengl-core\n\nAnd in your script:\n\n    require 'opengl-core'\n\nJob done, have fun. If you're a bad person and don't install your gems per\nuser, you may need to throw a `sudo` in there.\n\n\n### From Source\n\nInstalling from source is a bit involved just because you need to generate the\nOpenGL bindings before using them. To do this, simply clone the repository and\nnavigate to its root directory in a terminal. Once there, run `gen_from_xml.rb`:\n\n    $ ./gen_from_xml.rb\n\nThis will pull down the Khronos GL XML spec files and proceed to generate the\nappropriate OpenGL function bindings for the OpenGL core profile (3.2 and up,\nno deprecated functions). If you'd like to generate bindings for non-core\nfunctions, open `gen_from_xml.rb` in your text editor and change the\n`GEN_GL3_AND_UP` constant's value to `false`. Attempting to use functions that\ndon't exist for a given context will result in errors, so keep that in mind.\n\nOnce the functions have been generated, you can proceed to build and install\nthe gem as per usual:\n\n    $ gem build opengl-core.gemspec\n    $ gem install opengl-core-_._._.gem\n\nAfterward, all GL enums and commands will be under the `Gl` module (note the\nlowercase L). Just `require 'opengl-core'` and you should be on your way. You\ndon't have to statically link to the GL libraries, they will be loaded at\nruntime on first use.\n\n\nSimplified Bindings\n-------------------\n\nIn an effort to make working with OpenGL simpler in Ruby, an additional project,\n[opengl-aux], was started using aux classes/functions previously included in\nopengl-core. opengl-aux provides Ruby-friendlier (still not necessarily\nfriendliest) classes and functions to help people uncomfortable working with\nraw OpenGL bindings.\n\n[opengl-aux]: https://github.com/nilium/opengl-aux\n\n\nNotes\n-----\n\nYour system's GL library and functions are loaded on a first-use basis, so the\nfirst time you call `glClear`, the function will be loaded. This may change in\nthe future, but it's worth being aware of it. Later down the road I'll probably\nadd a function to load all possible GL symbols.\n\nBear in mind, also, that the GL commands are currently all just providing more\nor less the same functionality they would in C or C++. This means that they do\nexpect pointers and such. You can allocate these using `Fiddle::Pointer.malloc`\nand so on. _However_, in addition to this, each GL function is an alias of its\nraw function. So, in the module, you have both `glClear` and `glClear__`, the\nlatter being the raw function and the former being a wrapper around it that\ncan be overridden.\n\n\nContributing\n------------\n\nHave a patch to contribute? Just submit a pull request on [GitHub] and describe\nthe contents of the patch as clearly as possible. Any contributions must be\nlicensed under the same license as the rest of opengl-core.\n\n[GitHub]: https://github.com/nilium/ruby-opengl\n\n\nAcknowledgments\n---------------\n\nopengl-core has received contributions and other help from the following people:\n\n- [Noel Cower](https://github.com/nilium)\n- [Nogbit](https://github.com/Nogbit)\n- [Justin Scott](https://github.com/JScott)\n- [John Woods](https://github.com/mohawkjohn)\n\nFor a complete overview of each contribution, you can clone the repository and\nuse `git shortlog`.\n\nLicense\n-------\n\nThe OpenGL bindings are licensed under a simplified BSD license. This is to\nkeep things simple for the both of us, but if you need it simpler, just contact\nme and we'll work something out.\n\n    Copyright (c) 2013 - 2014, opengl-core project contributors.\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions are met:\n\n    1. Redistributions of source code must retain the above copyright notice, this\n       list of conditions and the following disclaimer. \n    2. Redistributions in binary form must reproduce the above copyright notice,\n       this list of conditions and the following disclaimer in the documentation\n       and/or other materials provided with the distribution. \n\n    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n    ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n    ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnilium%2Fopengl-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnilium%2Fopengl-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnilium%2Fopengl-core/lists"}