RiftSdk.hh 914 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
#pragma once

/**
 * IMPORTANT: DON'T EXPECT THIS CLASS TO HAVE A FINAL AND STABLE API!
 *
 * This class needs the LibOVR version 0.3.2 or higher to work.
 * Headers of this lib need to be placed in the search path.
 *
 * In addition ACGL_USE_OCULUS_RIFT has to be defined.
 *
 *
 */
Robert Menzel's avatar
Robert Menzel committed
13 14
#ifdef ACGL_USE_OCULUS_RIFT

15 16 17 18 19
#include <ACGL/ACGL.hh>
#include <glm/glm.hpp>

#if ACGL_RIFT_SDK_VERSION >= 32

20 21
#include <OVR_CAPI.h>

22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
namespace ACGL{
namespace HardwareSupport{


	bool initRiftSDK();
	void shutdownRiftSDK();

	// create a standard Rift, can be replaced with own, more specialized code:
	ovrHmd createRift(bool _headTrackingIsRequired = false, bool _headTranslationTrackingIsAllowed = true);
	void destroyRift(ovrHmd _hmd);

	// SDK gives different sizes per eye, return the max to make things easier:
	glm::uvec2 getOptimalRenderSizePerEye(ovrHmd _hmd);

}
}

#endif // RIFT_VERSION
Robert Menzel's avatar
Robert Menzel committed
40
#endif // ACGL_USE_OCULUS_RIFT