Skip to content

Instantly share code, notes, and snippets.

View fredemmott's full-sized avatar

Fred Emmott fredemmott

View GitHub Profile
@fredemmott
fredemmott / HTCCSettingsApp.cpp
Last active November 23, 2024 15:44
HTCCSettingsApp skeleton - example ImGUI with Win32/D3D11
// Copyright 2024 Fred Emmott <fred@fredemmott.com>
// SPDX-License-Identifier: MIT
#include <Windows.h>
#include <d3d11.h>
#include <dxgi1_3.h>
#include <imgui.h>
#include <imgui_impl_dx11.h>
#include <imgui_impl_win32.h>
#include <wil/com.h>
// Copyright 2024 Fred Emmott <fred@fredemmott.com>
// SPDX-License-Identifier: ISC
#include <algorithm>
#include <concepts>
#include <functional>
#include <ranges>
#include <string>
#include <print>
diff --git a/.clang-format b/.clang-format
index 63d4edf..1cd1c88 100644
--- a/.clang-format
+++ b/.clang-format
@@ -23,7 +23,10 @@ IncludeCategories:
- Regex: '^<Windows\.h>$'
Priority: 30
- Regex: '^<Unknwn\.h>'
- Priority: 31
+ Priority: 30
template <size_t... I>
struct drop_last_impl_t {
drop_last_impl_t() = delete;
constexpr drop_last_impl_t(std::index_sequence<I...>) {
}
template <template <class...> class T, class... TArgs>
using next_t = T<std::tuple_element_t<I, std::tuple<TArgs...>>...>;
template <class TIn>
diff --git a/src/injectables/CMakeLists.txt b/src/injectables/CMakeLists.txt
index cf1d951e..3db56d7a 100644
--- a/src/injectables/CMakeLists.txt
+++ b/src/injectables/CMakeLists.txt
@@ -48,6 +48,8 @@ target_link_libraries(
ThirdParty::DirectXTK
detours-ext
oculus-sdk-headers
+ PRIVATE
+ OpenKneeboard-D3D11
using System.Runtime.InteropServices;
using System.Text;
public partial class Program
{
[LibraryImport("OpenKneeboard_CAPI64")]
private static partial void OpenKneeboard_send_utf8(byte[] messageName, UInt64 messageNameBytes, byte[] messageData, UInt64 messageDataBytes);
public static void Main(string[] args)
{
// This is just an example dynamic path; in a real program, follow all the documented steps on the OpenKneeboard web site
#include <array>
#include <tuple>
#include <cstddef> // for size_t
// concatenate multiple arrays - requires C++20
//
// The usual approach is to default-construct `std::array<T, Na + Nb>`, then
// overwrite the elements, e.g. with `std::copy()` or loops.
//
// The problem with that is it requires that `T` is default-constructable;

Plain text

four spaces

More plain text

Triple backtick code block
~~~
Same block
diff --git a/gen-v1.0.32.1/include/OXRTracing/forward_declarations.gen.hpp b/gen-v1.0.34/include/OXRTracing/forward_declarations.gen.hpp
index 3715aa9..8c1082b 100644
--- a/gen-v1.0.32.1/include/OXRTracing/forward_declarations.gen.hpp
+++ b/gen-v1.0.34/include/OXRTracing/forward_declarations.gen.hpp
@@ -46,6 +46,7 @@ extern PFN_xrCreateActionSet next_xrCreateActionSet;
extern PFN_xrCreateActionSpace next_xrCreateActionSpace;
extern PFN_xrCreateBodyTrackerFB next_xrCreateBodyTrackerFB;
extern PFN_xrCreateEyeTrackerFB next_xrCreateEyeTrackerFB;
+extern PFN_xrCreateFaceTracker2FB next_xrCreateFaceTracker2FB;
extern PFN_xrCreateFaceTrackerFB next_xrCreateFaceTrackerFB;

XR_FREDEMMOTT_reflection

Previously XR_FREDEMMOTT_structure_type_sizes

Document version: v2024.01.23.03

Status: Initial draft/RFC. Not started formal process

New structures