stereokit-rust 0.4.0-alpha.22

High-Level Rust bindings around the StereoKitC library for XR
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
#pragma once

#if defined(_MSC_VER)

	#include <wtypes.h>
	#include <winnt.h>
	#define atomic_increment(int_val_ref) InterlockedIncrement((LONG*)int_val_ref)
	#define atomic_decrement(int_val_ref) InterlockedDecrement((LONG*)int_val_ref)
#else
	// gcc and clang both implement these at least
	#define atomic_increment(int_val_ref) __sync_add_and_fetch(int_val_ref, 1)
	#define atomic_decrement(int_val_ref) __sync_sub_and_fetch(int_val_ref, 1)
#endif