Fix headset types;

This commit is contained in:
bjorn 2017-01-26 02:26:15 -08:00
parent e80f390151
commit 1714804651
2 changed files with 3 additions and 4 deletions

View File

@ -3,8 +3,6 @@
#pragma once
typedef void (*headsetRenderCallback)(int eyeIndex, void* userdata);
typedef enum {
EYE_LEFT,
EYE_RIGHT
@ -34,6 +32,7 @@ typedef struct {
} Controller;
typedef vec_t(Controller*) vec_controller_t;
typedef void (*headsetRenderCallback)(HeadsetEye eye, void* userdata);
typedef struct {
void (*destroy)(void* headset);

View File

@ -499,7 +499,7 @@ void viveRenderTo(void* headset, headsetRenderCallback callback, void* userdata)
mat4_multiply(transform, head);
// Projection
matrix = vive->system->GetProjectionMatrix(eye, vive->clipNear, vive->clipFar).m;
matrix = vive->system->GetProjectionMatrix(vrEye, vive->clipNear, vive->clipFar).m;
mat4_fromMat44(projection, matrix);
// Render
@ -518,7 +518,7 @@ void viveRenderTo(void* headset, headsetRenderCallback callback, void* userdata)
ETextureType textureType = ETextureType_TextureType_OpenGL;
Texture_t eyeTexture = { (void*) texture, textureType, EColorSpace_ColorSpace_Gamma };
EVRSubmitFlags flags = EVRSubmitFlags_Submit_Default;
vive->compositor->Submit(eye, &eyeTexture, NULL, flags);
vive->compositor->Submit(vrEye, &eyeTexture, NULL, flags);
}
vive->isRendering = 0;