{"id":30020074,"url":"https://github.com/ktsu-dev/imguiprovider","last_synced_at":"2026-06-28T14:00:28.514Z","repository":{"id":306150349,"uuid":"1025184566","full_name":"ktsu-dev/ImGuiProvider","owner":"ktsu-dev","description":"A dependency injection abstraction layer over ImGui implementations for .NET.","archived":false,"fork":false,"pushed_at":"2026-06-15T19:48:02.000Z","size":201,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-15T21:24:07.033Z","etag":null,"topics":["abstraction","backend-abstraction","csharp","dear-imgui","dependency-injection","dotnet","hexa-net","imgui-provider","provider-pattern","rendering","windowing"],"latest_commit_sha":null,"homepage":"https://ktsu.dev","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/ktsu-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":"COPYRIGHT.md","agents":null,"dco":null,"cla":null}},"created_at":"2025-07-23T21:32:29.000Z","updated_at":"2026-06-15T19:47:59.000Z","dependencies_parsed_at":"2025-07-24T00:14:31.892Z","dependency_job_id":"60d3591b-aa26-4df6-9915-0ee21745d562","html_url":"https://github.com/ktsu-dev/ImGuiProvider","commit_stats":null,"previous_names":["ktsu-dev/imguiprovider"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/ktsu-dev/ImGuiProvider","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktsu-dev%2FImGuiProvider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktsu-dev%2FImGuiProvider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktsu-dev%2FImGuiProvider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktsu-dev%2FImGuiProvider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ktsu-dev","download_url":"https://codeload.github.com/ktsu-dev/ImGuiProvider/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktsu-dev%2FImGuiProvider/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34890795,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["abstraction","backend-abstraction","csharp","dear-imgui","dependency-injection","dotnet","hexa-net","imgui-provider","provider-pattern","rendering","windowing"],"created_at":"2025-08-06T01:38:28.740Z","updated_at":"2026-06-28T14:00:28.502Z","avatar_url":"https://github.com/ktsu-dev.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ImGuiProvider\n\nA dependency injection abstraction layer over ImGui implementations for .NET, providing clean interfaces and swappable backends.\n\n## Features\n\n- **Dependency Injection** - Clean integration with `Microsoft.Extensions.DependencyInjection`\n- **Provider Abstraction** - `IImGuiProvider` interface wrapping 160+ ImGui methods allows swapping implementations\n- **Backend Support** - Separate `IPlatformBackend` and `IRendererBackend` interfaces for windowing and rendering\n- **Context Management** - `ImGuiContext` handles the full frame lifecycle (initialize, begin frame, end frame, dispose)\n- **Built-in Implementation** - Ships with `HexaNetImGuiProvider` wrapping Hexa.NET.ImGui\n\n## Installation\n\n```bash\ndotnet add package ktsu.ImGuiProvider\n```\n\n## Quick Start\n\n```csharp\nusing ImGuiProvider.Extensions;\nusing ImGuiProvider.Services;\nusing Microsoft.Extensions.DependencyInjection;\n\nvar services = new ServiceCollection();\nservices.AddImGui(); // Registers HexaNetImGuiProvider as singleton\n\nvar serviceProvider = services.BuildServiceProvider();\nvar context = serviceProvider.GetRequiredService\u003cImGuiContext\u003e();\n```\n\n## Usage with Backends\n\n```csharp\nvar services = new ServiceCollection();\nservices.AddImGui();\nservices.AddImGuiBackend\u003cMyPlatformBackend\u003e();\nservices.AddImGuiBackend\u003cMyRendererBackend\u003e();\n\nvar serviceProvider = services.BuildServiceProvider();\nvar context = serviceProvider.GetRequiredService\u003cImGuiContext\u003e();\n\n// Resolve and attach backends\nvar platformBackend = serviceProvider.GetRequiredService\u003cIPlatformBackend\u003e();\nvar rendererBackend = serviceProvider.GetRequiredService\u003cIRendererBackend\u003e();\n\ncontext.Initialize();\ncontext.AddBackend(platformBackend);\ncontext.AddBackend(rendererBackend);\ncontext.InitializeBackends();\n\n// Render loop\nwhile (running)\n{\n    context.BeginFrame();\n\n    // Your ImGui code here\n    var provider = serviceProvider.GetRequiredService\u003cIImGuiProvider\u003e();\n    provider.ShowDemoWindow();\n\n    context.EndFrame();\n}\n\ncontext.Dispose();\n```\n\n## Custom Implementations\n\n### Custom Provider\n\n```csharp\npublic class MyProvider : IImGuiProvider\n{\n    // Implement all IImGuiProvider methods\n}\n\nservices.AddImGui\u003cMyProvider\u003e();\n// Or with a factory:\nservices.AddImGui(sp =\u003e new MyProvider());\n```\n\n### Custom Backend\n\n```csharp\npublic class MyBackend : IRendererBackend\n{\n    public string Name =\u003e \"My Backend\";\n    public bool Initialize() =\u003e true;\n    public void Shutdown() { }\n    public void NewFrame() { }\n    public void RenderDrawData(nint drawData) { }\n    public void SetCurrentContext(nint context) { }\n    public bool CreateDeviceObjects() =\u003e true;\n    public void InvalidateDeviceObjects() { }\n    public void Dispose() { }\n}\n\nservices.AddImGuiBackend\u003cMyBackend\u003e();\n```\n\n## Requirements\n\n- .NET 8.0, 9.0, or 10.0\n- Hexa.NET.ImGui 2.2.8.4\n- Microsoft.Extensions.DependencyInjection.Abstractions 9.0.7\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fktsu-dev%2Fimguiprovider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fktsu-dev%2Fimguiprovider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fktsu-dev%2Fimguiprovider/lists"}