{"id":16204573,"url":"https://github.com/samboycoding/opentkavalonia","last_synced_at":"2025-03-19T07:31:23.460Z","repository":{"id":103486360,"uuid":"454745566","full_name":"SamboyCoding/OpenTKAvalonia","owner":"SamboyCoding","description":"Helper control and library to provide OpenTK-based OpenGL rendering in Avalonia apps","archived":false,"fork":false,"pushed_at":"2024-02-26T17:12:07.000Z","size":296,"stargazers_count":49,"open_issues_count":3,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T04:43:16.779Z","etag":null,"topics":["avalonia","opengl","opentk","opentk-library"],"latest_commit_sha":null,"homepage":"","language":"C#","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/SamboyCoding.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}},"created_at":"2022-02-02T11:20:39.000Z","updated_at":"2025-03-09T07:52:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"c0e9faec-f8a2-474a-bd30-ef1646717281","html_url":"https://github.com/SamboyCoding/OpenTKAvalonia","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/SamboyCoding%2FOpenTKAvalonia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamboyCoding%2FOpenTKAvalonia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamboyCoding%2FOpenTKAvalonia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamboyCoding%2FOpenTKAvalonia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamboyCoding","download_url":"https://codeload.github.com/SamboyCoding/OpenTKAvalonia/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244379189,"owners_count":20443413,"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":["avalonia","opengl","opentk","opentk-library"],"created_at":"2024-10-10T09:58:38.693Z","updated_at":"2025-03-19T07:31:23.092Z","avatar_url":"https://github.com/SamboyCoding.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenTKAvalonia\n\nOpenTKAvalonia is a simple wrapper to provide OpenTK OpenGL bindings for Avalonia, and a control which handles some of \nthe heavy lifting for you.\n\nThis includes setting up the OpenGL bindings, setting up the aspect ratio so anything you draw looks as expected,\nproviding events for Initialization, Teardown, and Render, and providing a KeyboardState API for detecting keyboard input.\n\nThe library is somewhat work-in-progress but it currently functions for simple applications, and there is a sample included.\n\nNote that, in order for events to be called on Windows, Avalonia must be able to load the OpenGL bindings, which requires \nswitching the default rendering mode, like so:\n```c#\npublic static AppBuilder BuildAvaloniaApp()\n            =\u003e AppBuilder.Configure\u003cApp\u003e()\n                .UsePlatformDetect()\n                .With(new Win32PlatformOptions { RenderingMode = new Collection\u003cWin32RenderingMode\u003e { Win32RenderingMode.Wgl } }) //This line is the important one.\n                .LogToTrace();\n```\nWithout this, your control simply will never receive any of the OpenTK events (Initialization, Teardown, and Render).\n\nThe library itself is netstandard2.1, because that's what OpenTK requires, and the sample is net7.0.\n\n## Demonstration\n\n![Demonstration image](https://i.imgur.com/mAElUU9.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamboycoding%2Fopentkavalonia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamboycoding%2Fopentkavalonia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamboycoding%2Fopentkavalonia/lists"}