{"id":19430457,"url":"https://github.com/kdab/kdgpu","last_synced_at":"2025-04-04T22:01:52.938Z","repository":{"id":173002787,"uuid":"649731319","full_name":"KDAB/KDGpu","owner":"KDAB","description":"KDGpu is a thin wrapper around Vulkan to make modern graphics easier to learn and use","archived":false,"fork":false,"pushed_at":"2025-03-20T07:05:22.000Z","size":3436,"stargazers_count":134,"open_issues_count":1,"forks_count":17,"subscribers_count":38,"default_branch":"main","last_synced_at":"2025-03-28T21:01:38.359Z","etag":null,"topics":["graphics","vulkan","vulkan-api"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KDAB.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"LICENSES/Apache-2.0.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":"2023-06-05T14:07:43.000Z","updated_at":"2025-03-20T07:05:29.000Z","dependencies_parsed_at":"2023-09-22T20:42:43.506Z","dependency_job_id":"a77ced8f-ac8b-4925-b978-a52f9efab94d","html_url":"https://github.com/KDAB/KDGpu","commit_stats":null,"previous_names":["kdab/kdgpu"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KDAB%2FKDGpu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KDAB%2FKDGpu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KDAB%2FKDGpu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KDAB%2FKDGpu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KDAB","download_url":"https://codeload.github.com/KDAB/KDGpu/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247256101,"owners_count":20909240,"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":["graphics","vulkan","vulkan-api"],"created_at":"2024-11-10T14:25:02.812Z","updated_at":"2025-04-04T22:01:52.919Z","avatar_url":"https://github.com/KDAB.png","language":"C++","readme":"# KDGpu\n\nKDGpu is a thin wrapper around Vulkan to make modern graphics easier to learn and use.\n\n## Introduction\n\n### Is KDGpu for me?\n\nHave you ever wanted to be productive with Vulkan but can't get your head around the verbose\nsyntax, managing object lifetimes, and the intricacies of just getting something working without\ndrowning in synchronization and memory handling?\n\nIf the answer is yes, then KDGpu is the library for you!\n\nKDGpu is a thin wrapper around Vulkan (and perhaps later other modern graphics APIs) with\nthe aim of making modern graphics available to mortals and to massively reduce the amount\nof verbosity involved.\n\nKDGpu also aims to make it easy to teach the concepts of modern graphics programming without\nhaving to be bogged down in the intricacies.\n\nKDGpu is independent of any particular windowing system. You can use it purely with platform\nnative APIs or you can checkout the included KDGpuExample library which makes it trivial to\nuse KDGpu with KDGui::Window from the [KDUtils](https://github.com/KDAB/KDUtils) library.\nCheck out the handy [KDBindings](https://github.com/KDAB/KDBindings) repository too for some\nmore syntactic sugar with Signals and Slots, Properties and reactive Property Bindings.\n\nIn addition to being an enabler for Vulkan, the KDGpu project now also includes a new library,\nKDXr, which aims to be an enabler for OpenXR. Using the combination of KDGpu and KDXr allows\napplication developers to very easily create AR and VR application experiences.\n\nMore information can be found in the [documentation](https://docs.kdab.com/kdgpu/unstable/index.html).\n\n### What does KDGpu provide?\n\n- The KDGpu library\n- The KDXr library to make OpenXR easier to use\n- An example framework called KDGpuExample that provides integration with [KDGui](https://github.com/KDAB/KDUtils)\n  to make it easy to experiment. Let us take care of the boring bits so you can make pretty pictures.\n- A set of illustrative examples showing how to use KDGpu for common rendering tasks.\n\n### How do I get up and running with KDGpu?\n\n- Install the [Vulkan SDK](https://vulkan.lunarg.com/), setup the runtime environment and verify the\n  SDK as described in the [Vulkan documentation](https://vulkan.lunarg.com/doc/sdk)\n- Clone this repository\n- Open up the directory in VS Code with the CMakeTools extension loaded\n- Configure and Build - all of the dependencies will be pulled down via CMake's FetchContent feature\n  (see cmake/dependencies.cmake)\n- Try running the examples\n\n### What does KDGpu code look like?\n\nA typical render function for KDGPu looks something like this:\n\n```cpp\nauto opaquePass = commandRecorder.beginRenderPass(m_opaquePassOptions);\nopaquePass.setPipeline(m_pipeline);\nopaquePass.setVertexBuffer(0, m_buffer);\nopaquePass.setBindGroup(0, m_textureBindGroup);\nopaquePass.draw(DrawCommand{ .vertexCount = 4 });\nrenderImGuiOverlay(\u0026opaquePass);\nopaquePass.end();\nm_commandBuffer = commandRecorder.finish();\n```\n\nCreating GPU resources is just as easy and intuitive. Creating a Buffer that resides on the GPU\nand can be uploaded to and used as a vertex buffer is as simple as:\n\n```cpp\nconst DeviceSize dataByteSize = vertexData.size() * sizeof(Vertex);\nBufferOptions bufferOptions = {\n    .size = dataByteSize,\n    .usage = BufferUsageFlagBits::VertexBufferBit | BufferUsageFlagBits::TransferDstBit,\n    .memoryUsage = MemoryUsage::GpuOnly\n};\nm_buffer = m_device.createBuffer(bufferOptions);\n```\n\nThis pattern of using options structs and initializing them with C++20 designated initializers\npermeates through the API. It makes it easily discoverable, extensible and trivial to queue up\nfor deferred invocations.\n\nUploading data to the above buffer is just as easy:\n\n```cpp\nconst BufferUploadOptions uploadOptions = {\n    .destinationBuffer = m_buffer,\n    .dstStages = PipelineStageFlagBit::VertexAttributeInputBit,\n    .dstMask = AccessFlagBit::VertexAttributeReadBit,\n    .data = vertexData.data(),\n    .byteSize = dataByteSize\n};\nm_queue.uploadBufferData(uploadOptions);\n```\n\n## Contact\n\n- Visit us on GitHub: \u003chttps://github.com/KDAB/KDGpu\u003e\n- Email info@kdab.com for questions about copyright, licensing or commercial support.\n\nStay up-to-date with KDAB product announcements:\n\n- [KDAB Newsletter](https://news.kdab.com)\n- [KDAB Blogs](https://www.kdab.com/category/blogs)\n- [KDAB on Twitter](https://twitter.com/KDABQt)\n\n## Licensing\n\nKDGpu is © Klarälvdalens Datakonsult AB and is available under the terms of\nthe [MIT](https://github.com/KDAB/KDGpu/blob/main/LICENSES/MIT.txt) license.\n\nContact KDAB at \u003cinfo@kdab.com\u003e if you need different licensing options.\n\nKDGpu includes these source files, also available under the terms of the MIT license:\n\n[doctest.h](https://github.com/onqtam/doctest) - the lightest feature-rich C++ single-header testing\nframework for unit tests and TDD (C) 2016-2021 Viktor Kirilov \u003cvik.kirilov@gmail.com\u003e\n\n## Get Involved\n\nPlease submit your contributions or issue reports from our GitHub space at \u003chttps://github.com/KDAB/KDGpu\u003e.\n\nContact \u003cinfo@kdab.com\u003e for more information.\n\n## About KDAB\n\nKDGpu is supported and maintained by Klarälvdalens Datakonsult AB (KDAB).\n\nThe KDAB Group is the global No.1 software consultancy for Qt, C++ and\nOpenGL applications across desktop, embedded and mobile platforms.\n\nThe KDAB Group provides consulting and mentoring for developing Qt applications\nfrom scratch and in porting from all popular and legacy frameworks to Qt.\nWe continue to help develop parts of Qt and are one of the major contributors\nto the Qt Project. We can give advanced or standard trainings anywhere\naround the globe on Qt as well as C++, OpenGL, 3D and more.\n\nPlease visit \u003chttps://www.kdab.com\u003e to meet the people who write code like this.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkdab%2Fkdgpu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkdab%2Fkdgpu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkdab%2Fkdgpu/lists"}