{"id":13731718,"url":"https://github.com/acdemiralp/gl","last_synced_at":"2025-05-08T05:30:35.879Z","repository":{"id":88960884,"uuid":"99337060","full_name":"acdemiralp/gl","owner":"acdemiralp","description":"Header-only C++17 wrapper for OpenGL 4.6 Core Profile.","archived":false,"fork":false,"pushed_at":"2021-12-05T16:49:30.000Z","size":3513,"stargazers_count":158,"open_issues_count":4,"forks_count":11,"subscribers_count":16,"default_branch":"develop","last_synced_at":"2024-11-14T22:35:40.448Z","etag":null,"topics":["cpp11","opengl","wrapper"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/acdemiralp.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":"2017-08-04T11:35:21.000Z","updated_at":"2024-10-25T08:45:27.000Z","dependencies_parsed_at":"2023-06-13T08:15:17.628Z","dependency_job_id":null,"html_url":"https://github.com/acdemiralp/gl","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acdemiralp%2Fgl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acdemiralp%2Fgl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acdemiralp%2Fgl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acdemiralp%2Fgl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acdemiralp","download_url":"https://codeload.github.com/acdemiralp/gl/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253008352,"owners_count":21839635,"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":["cpp11","opengl","wrapper"],"created_at":"2024-08-03T02:01:36.851Z","updated_at":"2025-05-08T05:30:35.870Z","avatar_url":"https://github.com/acdemiralp.png","language":"C++","funding_links":[],"categories":["Graphics"],"sub_categories":[],"readme":"#### GL\nComplete C++17 wrapper for OpenGL 4.6 Core Profile.\n\n---\n\n#### Dependencies\n* OpenGL\n* GLEW\n* CUDA (optional, for interoperation support) \n\n---\n\n#### Building\n* Follow the cmake build process for locating the dependencies.\n* Toggle CUDA_INTEROP_SUPPORT for CUDA interoperation support. Note that the build will ask for the location of Cuda upon enabling this option.\n\n---\n\n#### Getting Started\n\nCreating and uploading data to buffers:\n\n```cpp\n#include \u003cgl/all.hpp\u003e\n\nvoid buffer_example()\n{\n  gl::buffer buffer;\n  \n  std::vector\u003cfloat\u003e vertices(32);\n  buffer.set_data(sizeof(float) * vertices.size(), vertices.data());\n}\n```\n\nCreating and uploading data to textures:\n\n```cpp\n#include \u003cgl/all.hpp\u003e\n\nvoid texture_example()\n{\n  gl::texture_1d texture_1d;\n  texture_1d.set_min_filter(GL_LINEAR);\n  texture_1d.set_mag_filter(GL_LINEAR);\n  texture_1d.set_wrap_s    (GL_CLAMP );\n  \n  std::array\u003cfloat, 32\u003e scalars;\n  texture_1d.set_storage   (0, GL_RGBA, sizeof(float) * scalars.size());\n  texture_1d.set_sub_image (0, 0, scalars.size(), GL_RGBA, GL_FLOAT, scalars.data());\n}\n```\nCreating shaders and attaching them to programs:\n```cpp\n#include \u003cgl/all.hpp\u003e\n\nvoid shader_program_example()\n{\n  gl::shader vert_shader(GL_VERTEX_SHADER);\n  vert_shader.load_source(\"vert_example.glsl\");\n\n  gl::shader frag_shader(GL_FRAGMENT_SHADER);\n  frag_shader.load_source(\"frag_example.glsl\");\n\n  gl::program program;\n  program.attach_shader(vert_shader);\n  program.attach_shader(frag_shader);\n  program.link();\n  program.use();\n  program.set_uniform(program.uniform_location(\"example_uniform\"), 42);\n  program.unuse();\n}\n```\n\n---\n\n#### Extensions\n\nFor adding GLM support to type-inferring uniform variable setters of the shader program, simply `#include \u003cgl/auxiliary/glm_uniforms.hpp\u003e`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facdemiralp%2Fgl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facdemiralp%2Fgl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facdemiralp%2Fgl/lists"}