{"id":19773572,"url":"https://github.com/stereokit/sk_gpu","last_synced_at":"2025-07-02T08:40:09.263Z","repository":{"id":39332905,"uuid":"277989730","full_name":"StereoKit/sk_gpu","owner":"StereoKit","description":"Cross-platform single header graphics library for StereoKit, in progress. Works with OpenXR on Desktop, HoloLens, and Quest.","archived":false,"fork":false,"pushed_at":"2025-06-28T03:10:40.000Z","size":32267,"stargazers_count":34,"open_issues_count":7,"forks_count":12,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-28T03:21:16.699Z","etag":null,"topics":[],"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/StereoKit.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}},"created_at":"2020-07-08T04:31:31.000Z","updated_at":"2025-06-28T03:10:43.000Z","dependencies_parsed_at":"2023-02-14T05:31:37.767Z","dependency_job_id":"99f5492d-1116-42aa-957b-4f8961019eea","html_url":"https://github.com/StereoKit/sk_gpu","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/StereoKit/sk_gpu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StereoKit%2Fsk_gpu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StereoKit%2Fsk_gpu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StereoKit%2Fsk_gpu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StereoKit%2Fsk_gpu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StereoKit","download_url":"https://codeload.github.com/StereoKit/sk_gpu/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StereoKit%2Fsk_gpu/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263105757,"owners_count":23414722,"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":[],"created_at":"2024-11-12T05:10:17.194Z","updated_at":"2025-07-02T08:40:09.215Z","avatar_url":"https://github.com/StereoKit.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sk_gpu.h\n\nsk_gpu.h is a mid-level cross-platform graphics library focused on Mixed Reality rendering, in an amalgamated single file header! It currently uses D3D11 on Windows, GLES on Android, and WebGL on the Web, and works very well with OpenXR.\n\n## Consuming\n\nTo use this project as a dependency, it's recommended use the amalgamated header file and pre-compiled skshaderc executables from the releases hosted here. The release files come with a useful cmake wrapper that makes this pretty straightforward to use in a cmake project:\n\n```cmake\ncmake_minimum_required(VERSION 3.14)\nproject(sk_gpu_test VERSION \"0.1.0\" LANGUAGES CXX C)\n\ninclude(FetchContent)\nFetchContent_Declare(\n  sk_gpu\n  URL https://github.com/StereoKit/sk_gpu/releases/download/v2024.3.31/sk_gpu.v2024.3.31.zip )\nFetchContent_MakeAvailable(sk_gpu)\n\nadd_executable(sk_gpu_test\n  src/main.cpp )\n\nskshaderc_compile_headers(sk_gpu_test\n  ${CMAKE_BINARY_DIR}/shaders/\n  \"-O3 -t xge\"\n  src/test.hlsl\n  src/test2.hlsl )\n\ntarget_link_libraries(sk_gpu_test\n  PRIVATE sk_gpu )\n```\n\n## Building\n\nsk_gpu uses a cmake based workflow, so standard cmake builds will work. This repository also comes with a number of cmake presets to make this process a bit easier!\n\n```sh\ncmake --preset test_Win32_x64\ncmake --build --preset test_Win32_x64_Debug\n\nbin/intermediate/Win32_x64/Debug/skg_flatscreen.exe\n```\n\nVSCode with the cmake plugin works well as an IDE for this project.\n\n### Prerequisites\n\nPython is used for header amalgamation on all platforms.\nNinja is used by the presets for Linux and Mac\n\n## Repository\n\nThere are 3 major sections to this repository!\n\n### 1. [sk_gpu.h source](https://github.com/maluoi/sk_gpu/tree/master/src)\n\nThese files are the core of the project, and they get squished into a single file at the root directory by a Python script! The sk_gpu_flat project in the examples folder is set up to squish these files automatically every time it's built.\n\n### 2. [skshaderc](https://github.com/maluoi/sk_gpu/tree/master/skshaderc)\n\nThis is a shader compiler that uses [glslang](https://github.com/KhronosGroup/glslang) and [Spirv-Cross](https://github.com/KhronosGroup/SPIRV-Cross) and [SPIRV-Tools](https://github.com/KhronosGroup/SPIRV-Tools) to compile and optimize real HLSL shader code into a single file containing HLSL bytecode, SPIRV, GLSL, GLSL ES, and GLSL Web, along with some metadata about buffer layout and uniforms. sk_gpu.h loads these files and picks the right chunk to use on the right platform :)\n\n### 3. [Examples](https://github.com/maluoi/sk_gpu/tree/master/examples)\n\nThese are maybe more my tests or development environments, but these are a set of project I use to test out sk_gpu's features on different platforms! There's an OpenXR powered Oculus Quest project, an OpenXR powered Windows project, and a flatscreen project that will also compile to WASM.\n\n## License\n\nLicense is MIT! Have fun :)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstereokit%2Fsk_gpu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstereokit%2Fsk_gpu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstereokit%2Fsk_gpu/lists"}