This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Windows.h> | |
#include <stdio.h> | |
#include <assert.h> | |
#define NANOSECONDS_PER_SECOND ( 1000000000LL ) | |
#define NANOSECONDS_PER_TIMER ( 100LL ) | |
int main() | |
{ | |
LARGE_INTEGER begin; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Windows.h> | |
#include <stdio.h> | |
#include <assert.h> | |
#define NANOSECONDS_PER_SECOND ( 1000000000LL ) | |
#define NANOSECONDS_PER_TIMER ( 100LL ) | |
int main() | |
{ | |
LARGE_INTEGER begin; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Runtime.InteropServices; | |
namespace Protoscratch | |
{ | |
static class Oculus | |
{ | |
[DllImport("LibOVRDll64.dll", EntryPoint = "ovr_Initialize", CallingConvention=CallingConvention.Cdecl)] | |
[return: MarshalAs(UnmanagedType.I1)]//LibOVR uses 1 byte booleans | |
public static extern bool Initialize(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Downloads this texture from the GPU. | |
/// </summary> | |
/// <returns>A bitmap representing this texture. You are responsible for disposing it.</returns> | |
public Bitmap Download() | |
{ | |
Bitmap bitmap = null; | |
try | |
{ | |
bitmap = new Bitmap(Width, Height); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace ObservedSerialization | |
{ | |
/// <summary> | |
/// Like SerializerMode | |
/// </summary> | |
enum ThingMode | |
{ | |
SwapValues, |
NewerOlder