{"id":42733893,"url":"https://github.com/husker-dev/grapl","last_synced_at":"2026-01-29T17:49:39.298Z","repository":{"id":132132080,"uuid":"497601112","full_name":"husker-dev/grapl","owner":"husker-dev","description":"Java\\Kotlin tool for managing OpenGL contexts and windows","archived":false,"fork":false,"pushed_at":"2026-01-10T11:30:56.000Z","size":1143,"stargazers_count":8,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-11T03:34:25.348Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/husker-dev.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-05-29T13:36:52.000Z","updated_at":"2026-01-10T11:11:26.000Z","dependencies_parsed_at":"2024-04-12T20:23:43.561Z","dependency_job_id":"70269911-2ff8-4226-8766-ebe6776c31c1","html_url":"https://github.com/husker-dev/grapl","commit_stats":null,"previous_names":["husker-dev/grapl"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/husker-dev/grapl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/husker-dev%2Fgrapl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/husker-dev%2Fgrapl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/husker-dev%2Fgrapl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/husker-dev%2Fgrapl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/husker-dev","download_url":"https://codeload.github.com/husker-dev/grapl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/husker-dev%2Fgrapl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28881982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T16:41:59.663Z","status":"ssl_error","status_checked_at":"2026-01-29T16:39:39.641Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-29T17:49:36.316Z","updated_at":"2026-01-29T17:49:39.293Z","avatar_url":"https://github.com/husker-dev.png","language":"Kotlin","readme":"\n\n\u003cimg src=\"./.github/resources/logo.png\" alt=\"boosty\"\u003e\n\n\u003ca href=\"https://boosty.to/husker-dev/donate\"\u003e\n    \u003cimg width=\"145\" src=\"./.github/resources/boosty.svg\" alt=\"boosty\"\u003e\n\u003c/a\u003e\n\n\u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/husker-dev/offscreen-jgl?style=flat-square\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/husker-dev/offscreen-jgl/releases/latest\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/husker-dev/offscreen-jgl?style=flat-square\"\u003e\u003c/a\u003e\n\n# About\n\nJava\\Kotlin tool for managing OpenGL contexts and windows.\n\n- [Dependency](#dependency)\n- [Usage](#usage)\n  - [Contexts](#contexts)\n  - [Windows](#windows)\n\n# Dependency\n```groovy\ndependencies {\n    implementation 'com.huskerdev:grapl-gl:2.3.14'\n}\n```\n\nAvailable modules:\n  - ```grapl``` - core library\n    - grapl-native-core-win\n    - grapl-native-core-macos\n    - grapl-native-core-linux\n  - ```grapl-gl``` - OpenGL module\n    - grapl-native-gl-win\n    - grapl-native-gl-macos\n    - grapl-native-gl-linux\n  - ```grapl-ext-display``` - Display extension\n\n# Usage\n\nGrapl can oparate OpenGL contexts separatly from window\n\n## Contexts\n\n- ```kotlin\n  val context = GLContext.create(..)\n  ```\n  Creates new opengl context with requesterd parameters (doesn't make current)\n\n  - ```shareWith``` - Shared context handle\n      - ***type***: GLContext/Long\n      - **default**: 0L\n  - ```coreProfile``` - Core/Compatibility profile\n      - ***type***: GLProfile\n      - **default**: GLProfile.CORE\n  - ```majorVersion``` - Requested major version\n      - ***type***: Int\n      - **default**: -1\n  - ```minorVersion``` - Requested minor version\n      - ***type***: Int\n      - **default**: -1\n\n\n- ```kotlin\n  context.makeCurrent()\n  ```\n  Makes context current in running thread\n\n\n- ```kotlin\n  context.delete()\n  ```\n  Deletes context (does not require to be current)\n\n## Windows\n\nExample usage:\n```kotlin\nGLWindow().apply {\n    title = \"My application\"\n    size = 100 x 100\n    alignToCenter()\n\n    eventConsumer = windowEventConsumer {\n        onInit {\n            swapInterval = 1\n            GL.createCapabilities()\n            glClearColor(1f, 0f, 1f, 1f)\n        }\n        onUpdate {\n            glClear(GL_COLOR_BUFFER_BIT)\n            swapBuffers()\n        }\n    }\n\n    keyTypedListeners += { e -\u003e\n        println(\"key typed: ${e.key.char}\")\n    }\n\n    visible = true\n}\n```\n\nTo take control of window event handling:\n```kotlin\n// Disable built-in message handling\nBackgroundMessageHandler.useHandler = false\n\nval window = GLWindow().apply {\n    size = 100 x 100\n    alignToCenter()\n    visible = true\n}\n\n// Handle events\nwhile(!window.shouldClose)\n    Window.waitMessages() // or peekMessages\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhusker-dev%2Fgrapl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhusker-dev%2Fgrapl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhusker-dev%2Fgrapl/lists"}